#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 *);
int /*<<< orphan*/ problemUsage();
int /*<<< orphan*/ reportUsage();
void usage() {
  printf("usage: timing [-n NumElements] [-v]\n");
  printf("   -n declares the problem size         [default: 100,000]\n");
  printf("   -v verbose output                    [default: false]\n");
  printf("   -s # set the seed for random values  [default: no seed]\n");
  printf("   -h print usage information\n");
  printf("problem flags (if any)\n");
  problemUsage();
  printf("report flags (if any)\n");
  reportUsage();
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
lea    0xf0e(%rip),%rdi
call   1030 <printf@plt>
lea    0xf3c(%rip),%rdi
call   1030 <printf@plt>
lea    0xf6c(%rip),%rdi
call   1030 <printf@plt>
lea    0xf7f(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <problemUsage@plt>
lea    0xf84(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <reportUsage@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf6b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7d(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <problemUsage@plt>
lea    0xf81(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <reportUsage@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"usage: timing [-n NumElements] [-v]\0A\00"
@.str.1 = [60 x i8] c" -n declares the problem size [default: 100,000]\0A\00"
@.str.2 = [58 x i8] c" -v verbose output [default: false]\0A\00"
@.str.3 = [60 x i8] c" -s # set the seed for random values [default: no seed]\0A\00"
@.str.4 = [31 x i8] c" -h print usage information\0A\00"
@.str.5 = [24 x i8] c"problem flags (if any)\0A\00"
@.str.6 = [23 x i8] c"report flags (if any)\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 (...) @problemUsage()
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%9 = call i32 (...) @reportUsage()
ret void
}

LLVM IR (-O2):
@str = [36 x i8] c"usage: timing [-n NumElements] [-v]\00"
@str.7 = [59 x i8] c" -n declares the problem size [default: 100,000]\00"
@str.8 = [57 x i8] c" -v verbose output [default: false]\00"
@str.9 = [59 x i8] c" -s # set the seed for random values [default: no seed]\00"
@str.10 = [30 x i8] c" -h print usage information\00"
@str.11 = [23 x i8] c"problem flags (if any)\00"
@str.12 = [22 x i8] c"report flags (if any)\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.7, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.8, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.9, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.10, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.11, i64 0, i64 0))
%7 = tail call i32 (...) @problemUsage()
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.12, i64 0, i64 0))
%9 = tail call i32 (...) @reportUsage()
ret void
}