#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 */
typedef int /*<<< orphan*/ item;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage() {
  int i = 0;
  char *item[6] = {"usage:",
                   "Find the central tendency of a list of numbers.",
                   "(list is CSV with no spaces)\n",
                   "mean [list of numbers]",
                   "median [list of numbers]",
                   "mode [list of numbers]"};
  for (; i < (sizeof(item) / sizeof(char *)); i++) {
    printf("%s\n", item[i]);
  }
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1040 <memset@plt>
lea    0xeba(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xeb6(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xedb(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xeee(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xefa(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xf08(%rip),%rax
mov    %rax,-0x18(%rbp)
movslq -0x4(%rbp),%rax
cmp    $0x6,%rax
jae    11b2 <usage+0x92>
movslq -0x4(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rsi
lea    0xefd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1181 <usage+0x61>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
lea    0xf84(%rip),%rbx
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xefa(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf09(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf11(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf1b(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"usage:\00"
@.str.1 = [48 x i8] c"Find the central tendency of a list of numbers.\00"
@.str.2 = [30 x i8] c"(list is CSV with no spaces)\0A\00"
@.str.3 = [23 x i8] c"mean [list of numbers]\00"
@.str.4 = [25 x i8] c"median [list of numbers]\00"
@.str.5 = [23 x i8] c"mode [list of numbers]\00"
@.str.6 = [4 x i8] c"%s\0A\00"
define void @usage() {
%1 = alloca i32
%2 = alloca [6 x i8*]
store i32 0, i32* %1
%3 = bitcast [6 x i8*]* %2 to i8*
%4 = bitcast i8* %3 to [6 x i8*]*
%5 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i32 0, i32 0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8** %5
%6 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i32 0, i32 1
store i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i32 0, i32 0), i8** %6
%7 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i32 0, i32 2
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i32 0, i32 0), i8** %7
%8 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i32 0, i32 3
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i32 0, i32 0), i8** %8
%9 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i32 0, i32 4
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i32 0, i32 0), i8** %9
%10 = getelementptr inbounds [6 x i8*], [6 x i8*]* %4, i32 0, i32 5
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i32 0, i32 0), i8** %10
br label %11
11: ; preds = %21, %0
%12 = load i32, i32* %1
%13 = sext i32 %12 to i64
%14 = icmp ult i64 %13, 6
br i1 %14, label %15, label %24
15: ; preds = %11
%16 = load i32, i32* %1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 %17
%19 = load i8*, i8** %18
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %19)
br label %21
21: ; preds = %15
%22 = load i32, i32* %1
%23 = add nsw i32 %22, 1
store i32 %23, i32* %1
br label %11
24: ; preds = %11
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"usage:\00"
@.str.1 = [48 x i8] c"Find the central tendency of a list of numbers.\00"
@.str.2 = [30 x i8] c"(list is CSV with no spaces)\0A\00"
@.str.3 = [23 x i8] c"mean [list of numbers]\00"
@.str.4 = [25 x i8] c"median [list of numbers]\00"
@.str.5 = [23 x i8] c"mode [list of numbers]\00"
@.str.6 = [4 x i8] c"%s\0A\00"
define void @usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
ret void
}