#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*/ println(char *, ...);
int usage(const char *cmdname) {
  println("%s command:", cmdname);
  println("usage: %s [-v][test]", cmdname);
  println("Avaible tests:");
  println("\t--heap          [test the heap]");
  println("\t--stack         [test the memory stack with recursive function "
          "and big local array]");
  println("\t--thread        [test the native implementation of the MeetiX's "
          "threads]");
  println("\t--pthread       [test the implementation of the Posix thread on "
          "MeetiX]");
  println("\t--fs            [open many files and reads it]");
  return 0;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <println@plt>
mov    -0x8(%rbp),%rsi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <println@plt>
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <println@plt>
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <println@plt>
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1030 <println@plt>
lea    0xf35(%rip),%rdi
mov    $0x0,%al
call   1030 <println@plt>
lea    0xf71(%rip),%rdi
mov    $0x0,%al
call   1030 <println@plt>
lea    0xfac(%rip),%rdi
mov    $0x0,%al
call   1030 <println@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <println@plt>
lea    0xee0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <println@plt>
lea    0xee4(%rip),%rdi
xor    %eax,%eax
call   1030 <println@plt>
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <println@plt>
lea    0xef8(%rip),%rdi
xor    %eax,%eax
call   1030 <println@plt>
lea    0xf3f(%rip),%rdi
xor    %eax,%eax
call   1030 <println@plt>
lea    0xf7b(%rip),%rdi
xor    %eax,%eax
call   1030 <println@plt>
lea    0xfb6(%rip),%rdi
xor    %eax,%eax
call   1030 <println@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%s command:\00"
@.str.1 = [21 x i8] c"usage: %s [-v][test]\00"
@.str.2 = [15 x i8] c"Avaible tests:\00"
@.str.3 = [33 x i8] c"\09--heap [test the heap]\00"
@.str.4 = [85 x i8] c"\09--stack [test the memory stack with recursive function and big local array]\00"
@.str.5 = [74 x i8] c"\09--thread [test the native implementation of the MeetiX's threads]\00"
@.str.6 = [73 x i8] c"\09--pthread [test the implementation of the Posix thread on MeetiX]\00"
@.str.7 = [48 x i8] c"\09--fs [open many files and reads it]\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @println(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 (i8*, ...) @println(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = call i32 (i8*, ...) @println(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @println(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 (i8*, ...) @println(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 (i8*, ...) @println(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 (i8*, ...) @println(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.6, i64 0, i64 0))
%12 = call i32 (i8*, ...) @println(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s command:\00"
@.str.1 = [21 x i8] c"usage: %s [-v][test]\00"
@.str.2 = [15 x i8] c"Avaible tests:\00"
@.str.3 = [33 x i8] c"\09--heap [test the heap]\00"
@.str.4 = [85 x i8] c"\09--stack [test the memory stack with recursive function and big local array]\00"
@.str.5 = [74 x i8] c"\09--thread [test the native implementation of the MeetiX's threads]\00"
@.str.6 = [73 x i8] c"\09--pthread [test the implementation of the Posix thread on MeetiX]\00"
@.str.7 = [48 x i8] c"\09--fs [open many files and reads it]\00"
define i32 @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @println(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, ...) @println(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 (i8*, ...) @println(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @println(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @println(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @println(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.5, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @println(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.6, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @println(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}