#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 usage(char *argv[]) {
  printf("\n%s [-c ncols] [-r nrows] [-t num_thr] [-s nsteps] [-G ngpu] [-d "
         "debug] [-f filename] [-W 1|0] [-C CKPTsteps] [-v] [-h]",
         argv[0]);
  printf("\n -d <0|1|2> : <no output | debug info (default) | display "
         "interactively> ");
  printf("\n -s <int>   : steps  (step num. default=1000)");
  printf("\n -n <int>   : Computation load  (default=1000)");
  printf("\n -G <int>   : GPU (default 0)");
  printf("\n -C <int>   : CheckPoint freq. (step num. default=500)");
  printf("\n -t <int>   : Threads num ( default = OMP_NUM_THREADS if set, "
         "otherwise = cores num");
  printf("\n -W <1|0>   : Write yes|no(default) the grid config into a file  ");
  printf("\n -f <string>: filename  (default: life_ <filesize>.dat) ");
  printf("\n -v   : version ");
  printf("\n -h   : help ");
  printf("\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf40(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfc0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xffb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1042(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1077(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10a3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10a7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10a8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    (%rdi),%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf3f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf7c(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf9d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfbf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfd0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xffa(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1041(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1076(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10a2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10a6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [120 x i8] c"\0A%s [-c ncols] [-r nrows] [-t num_thr] [-s nsteps] [-G ngpu] [-d debug] [-f filename] [-W 1|0] [-C CKPTsteps] [-v] [-h]\00"
@.str.1 = [75 x i8] c"\0A -d <0|1|2> : <no output | debug info (default) | display interactively> \00"
@.str.2 = [47 x i8] c"\0A -s <int> : steps (step num. default=1000)\00"
@.str.3 = [48 x i8] c"\0A -n <int> : Computation load (default=1000)\00"
@.str.4 = [31 x i8] c"\0A -G <int> : GPU (default 0)\00"
@.str.5 = [56 x i8] c"\0A -C <int> : CheckPoint freq. (step num. default=500)\00"
@.str.6 = [85 x i8] c"\0A -t <int> : Threads num ( default = OMP_NUM_THREADS if set, otherwise = cores num\00"
@.str.7 = [67 x i8] c"\0A -W <1|0> : Write yes|no(default) the grid config into a file \00"
@.str.8 = [58 x i8] c"\0A -f <string>: filename (default: life_ <filesize>.dat) \00"
@.str.9 = [18 x i8] c"\0A -v : version \00"
@.str.10 = [15 x i8] c"\0A -h : help \00"
@.str.11 = [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 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.6, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.7, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.8, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [120 x i8] c"\0A%s [-c ncols] [-r nrows] [-t num_thr] [-s nsteps] [-G ngpu] [-d debug] [-f filename] [-W 1|0] [-C CKPTsteps] [-v] [-h]\00"
@.str.1 = [75 x i8] c"\0A -d <0|1|2> : <no output | debug info (default) | display interactively> \00"
@.str.2 = [47 x i8] c"\0A -s <int> : steps (step num. default=1000)\00"
@.str.3 = [48 x i8] c"\0A -n <int> : Computation load (default=1000)\00"
@.str.4 = [31 x i8] c"\0A -G <int> : GPU (default 0)\00"
@.str.5 = [56 x i8] c"\0A -C <int> : CheckPoint freq. (step num. default=500)\00"
@.str.6 = [85 x i8] c"\0A -t <int> : Threads num ( default = OMP_NUM_THREADS if set, otherwise = cores num\00"
@.str.7 = [67 x i8] c"\0A -W <1|0> : Write yes|no(default) the grid config into a file \00"
@.str.8 = [58 x i8] c"\0A -f <string>: filename (default: life_ <filesize>.dat) \00"
@.str.9 = [18 x i8] c"\0A -v : version \00"
@.str.10 = [15 x i8] c"\0A -h : help \00"
define void @usage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([120 x i8], [120 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @.str.6, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str.7, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.8, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0))
%14 = tail call i32 @putchar(i32 10)
ret void
}