#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 *, ...);
void print_usage(char *prog) {
  printf("Usage: %s [ options ]\n\n", prog);
  printf("Options:\n");
  printf("\t-S value : spot price ( default: %0.2lf )\n", 100.00);
  printf("\t-E value : exercise price ( default: %0.2lf )\n", 95.00);
  printf("\t-r value : interest rate ( default: %0.2lf )\n", 0.10 * 100);
  printf("\t-V value : volatility ( default: %0.2lf )\n", 0.30 * 100);
  printf("\t-T value : time to mature in years ( default: %0.2lf )\n\n", 1.00);
  printf("\t-s value : steps in space dimension ( default: %d )\n", 2000000);
  printf("\t-t value : steps in time dimension ( default: %d )\n\n", 10000);
  printf("\t-i               : Run iterative stencil\n\n");
  printf("\t-h               : print this help screen\n\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xf01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf07(%rip),%rdi
movsd  0xed5(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf1d(%rip),%rdi
movsd  0xeb7(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf37(%rip),%rdi
movsd  0xe99(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf50(%rip),%rdi
movsd  0xe7b(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf66(%rip),%rdi
movsd  0xe5d(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf8a(%rip),%rdi
mov    $0x1e8480,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfad(%rip),%rdi
mov    $0x2710,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    %rdi,%rsi
lea    0xefd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1064(%rip),%rdi
call   1030 <puts@plt>
lea    0xefb(%rip),%rdi
movsd  0xeb3(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xf11(%rip),%rdi
movsd  0xea5(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xf2b(%rip),%rdi
movsd  0xe97(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xf44(%rip),%rdi
movsd  0xe89(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xf5a(%rip),%rdi
movsd  0xe7b(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xf7e(%rip),%rdi
mov    $0x1e8480,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfa1(%rip),%rdi
mov    $0x2710,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfcd(%rip),%rdi
call   1030 <puts@plt>
lea    0xfec(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Usage: %s [ options ]\0A\0A\00"
@.str.1 = [10 x i8] c"Options:\0A\00"
@.str.2 = [44 x i8] c"\09-S value : spot price ( default: %0.2lf )\0A\00"
@.str.3 = [48 x i8] c"\09-E value : exercise price ( default: %0.2lf )\0A\00"
@.str.4 = [47 x i8] c"\09-r value : interest rate ( default: %0.2lf )\0A\00"
@.str.5 = [44 x i8] c"\09-V value : volatility ( default: %0.2lf )\0A\00"
@.str.6 = [58 x i8] c"\09-T value : time to mature in years ( default: %0.2lf )\0A\0A\00"
@.str.7 = [54 x i8] c"\09-s value : steps in space dimension ( default: %d )\0A\00"
@.str.8 = [54 x i8] c"\09-t value : steps in time dimension ( default: %d )\0A\0A\00"
@.str.9 = [44 x i8] c"\09-i : Run iterative stencil\0A\0A\00"
@.str.10 = [45 x i8] c"\09-h : print this help screen\0A\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), double 1.000000e+02)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.3, i64 0, i64 0), double 9.500000e+01)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0), double 1.000000e+01)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0), double 3.000000e+01)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.6, i64 0, i64 0), double 1.000000e+00)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.7, i64 0, i64 0), i32 2000000)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0), i32 10000)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.10, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Usage: %s [ options ]\0A\0A\00"
@.str.2 = [44 x i8] c"\09-S value : spot price ( default: %0.2lf )\0A\00"
@.str.3 = [48 x i8] c"\09-E value : exercise price ( default: %0.2lf )\0A\00"
@.str.4 = [47 x i8] c"\09-r value : interest rate ( default: %0.2lf )\0A\00"
@.str.5 = [44 x i8] c"\09-V value : volatility ( default: %0.2lf )\0A\00"
@.str.6 = [58 x i8] c"\09-T value : time to mature in years ( default: %0.2lf )\0A\0A\00"
@.str.7 = [54 x i8] c"\09-s value : steps in space dimension ( default: %d )\0A\00"
@.str.8 = [54 x i8] c"\09-t value : steps in time dimension ( default: %d )\0A\0A\00"
@str = [9 x i8] c"Options:\00"
@str.11 = [43 x i8] c"\09-i : Run iterative stencil\0A\00"
@str.12 = [44 x i8] c"\09-h : print this help screen\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), double 1.000000e+02)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.3, i64 0, i64 0), double 9.500000e+01)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0), double 1.000000e+01)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0), double 3.000000e+01)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.6, i64 0, i64 0), double 1.000000e+00)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.7, i64 0, i64 0), i32 2000000)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0), i32 10000)
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.11, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.12, i64 0, i64 0))
ret void
}