#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void usage(const char *argv0) {
  printf("usage: %s\n\n", argv0);
  printf("  %-18s %s\n", "-m, --mhz",
         "Manually define the clock speed of the test target");
  printf("  %-18s %s\n", "--clk",
         "Disable IPC measurement, only measure in clock cycles");
  printf("  %-18s %s\n", "--none",
         "Disable all tests. Append other arguments to enable test groups "
         "individually.");
  printf("  %-18s %s\n", "--simple", "Enable the simple instruction tests");
  printf("  %-18s %s\n", "--kernel", "Enable the kernel-level tests");
  printf("  %-18s %s\n", "-h, --help", "Print this list of options");
  printf("  %-18s %s\n", "-v, --version",
         "Print the program license and version information");
  printf("\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
lea    0xecc(%rip),%rsi
lea    0xecf(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeab(%rip),%rdi
lea    0xeed(%rip),%rsi
lea    0xeec(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
lea    0xf0d(%rip),%rsi
lea    0xf0d(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe73(%rip),%rdi
lea    0xf46(%rip),%rsi
lea    0xf48(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe57(%rip),%rdi
lea    0xf57(%rip),%rsi
lea    0xf59(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe3b(%rip),%rdi
lea    0xf62(%rip),%rsi
lea    0xf66(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe1f(%rip),%rdi
lea    0xf6c(%rip),%rsi
lea    0xf73(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec3(%rip),%rbx
lea    0xec8(%rip),%rsi
lea    0xecb(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeed(%rip),%rsi
lea    0xeec(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf11(%rip),%rsi
lea    0xf11(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf4e(%rip),%rsi
lea    0xf50(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf63(%rip),%rsi
lea    0xf65(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf72(%rip),%rsi
lea    0xf76(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf80(%rip),%rsi
lea    0xf87(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"usage: %s\0A\0A\00"
@.str.1 = [12 x i8] c" %-18s %s\0A\00"
@.str.2 = [10 x i8] c"-m, --mhz\00"
@.str.3 = [51 x i8] c"Manually define the clock speed of the test target\00"
@.str.4 = [6 x i8] c"--clk\00"
@.str.5 = [54 x i8] c"Disable IPC measurement, only measure in clock cycles\00"
@.str.6 = [7 x i8] c"--none\00"
@.str.7 = [78 x i8] c"Disable all tests. Append other arguments to enable test groups individually.\00"
@.str.8 = [9 x i8] c"--simple\00"
@.str.9 = [36 x i8] c"Enable the simple instruction tests\00"
@.str.10 = [9 x i8] c"--kernel\00"
@.str.11 = [30 x i8] c"Enable the kernel-level tests\00"
@.str.12 = [11 x i8] c"-h, --help\00"
@.str.13 = [27 x i8] c"Print this list of options\00"
@.str.14 = [14 x i8] c"-v, --version\00"
@.str.15 = [50 x i8] c"Print the program license and version information\00"
@.str.16 = [2 x i8] c"\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.7, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.13, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.15, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%13 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [12 x i8] c"usage: %s\0A\0A\00"
@.str.1 = [12 x i8] c" %-18s %s\0A\00"
@.str.2 = [10 x i8] c"-m, --mhz\00"
@.str.3 = [51 x i8] c"Manually define the clock speed of the test target\00"
@.str.4 = [6 x i8] c"--clk\00"
@.str.5 = [54 x i8] c"Disable IPC measurement, only measure in clock cycles\00"
@.str.6 = [7 x i8] c"--none\00"
@.str.7 = [78 x i8] c"Disable all tests. Append other arguments to enable test groups individually.\00"
@.str.8 = [9 x i8] c"--simple\00"
@.str.9 = [36 x i8] c"Enable the simple instruction tests\00"
@.str.10 = [9 x i8] c"--kernel\00"
@.str.11 = [30 x i8] c"Enable the kernel-level tests\00"
@.str.12 = [11 x i8] c"-h, --help\00"
@.str.13 = [27 x i8] c"Print this list of options\00"
@.str.14 = [14 x i8] c"-v, --version\00"
@.str.15 = [50 x i8] c"Print the program license and version information\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.5, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.7, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.13, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.15, i64 0, i64 0))
%10 = tail call i32 @putchar(i32 10)
%11 = tail call i32 @exit(i32 0)
unreachable
}