#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void print_usage(const char *name, FILE *o) {
  fprintf(o, "Usage: %s [options]\n", name);
  fprintf(o, "  -o <file>     output file (stdout)\n");
  fprintf(o, "  -s <w:h:d>    image width (512x512x6)\n");
  fprintf(o, "  -S <seed>     select a specific random seed\n");
  fprintf(o, "  -n            steps between video frames (0)\n");
  fprintf(o, "  -p <x,y>      add a start point, may be repeated\n");
  fprintf(o, "  -N            use naive color matcher\n");
  fprintf(o, "  -O            use octree color matcher\n");
  fprintf(o, "  -K            use kdtree color matcher (default)\n");
  fprintf(o, "  -g <gamma>    select gamma (2.2)\n");
  fprintf(o, "  -v            verbose\n");
  fprintf(o, "  -h            print this help\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xed1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xee8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xeff(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xf1c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xf3a(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xf5c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xf73(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xf8b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xfad(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xfbf(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xfc6(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rdx
lea    0xed2(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xed6(%rip),%rdi
mov    $0x25,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xee3(%rip),%rdi
mov    $0x28,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xef3(%rip),%rdi
mov    $0x2e,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf09(%rip),%rdi
mov    $0x2f,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf20(%rip),%rdi
mov    $0x33,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf3b(%rip),%rdi
mov    $0x28,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf4b(%rip),%rdi
mov    $0x29,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf5c(%rip),%rdi
mov    $0x33,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf77(%rip),%rdi
mov    $0x23,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf82(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf82(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@.str.1 = [38 x i8] c" -o <file> output file (stdout)\0A\00"
@.str.2 = [41 x i8] c" -s <w:h:d> image width (512x512x6)\0A\00"
@.str.3 = [47 x i8] c" -S <seed> select a specific random seed\0A\00"
@.str.4 = [48 x i8] c" -n steps between video frames (0)\0A\00"
@.str.5 = [52 x i8] c" -p <x,y> add a start point, may be repeated\0A\00"
@.str.6 = [41 x i8] c" -N use naive color matcher\0A\00"
@.str.7 = [42 x i8] c" -O use octree color matcher\0A\00"
@.str.8 = [52 x i8] c" -K use kdtree color matcher (default)\0A\00"
@.str.9 = [36 x i8] c" -g <gamma> select gamma (2.2)\0A\00"
@.str.10 = [25 x i8] c" -v verbose\0A\00"
@.str.11 = [33 x i8] c" -h print this help\0A\00"
define void @print_usage(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i8*, i8** %3
%7 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32*, i32** %4
%9 = call i32 (i32*, i8*, ...) @fprintf(i32* %8, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32*, i32** %4
%11 = call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32*, i32** %4
%13 = call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
%14 = load i32*, i32** %4
%15 = call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0))
%16 = load i32*, i32** %4
%17 = call i32 (i32*, i8*, ...) @fprintf(i32* %16, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0))
%18 = load i32*, i32** %4
%19 = call i32 (i32*, i8*, ...) @fprintf(i32* %18, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0))
%20 = load i32*, i32** %4
%21 = call i32 (i32*, i8*, ...) @fprintf(i32* %20, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0))
%22 = load i32*, i32** %4
%23 = call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0))
%24 = load i32*, i32** %4
%25 = call i32 (i32*, i8*, ...) @fprintf(i32* %24, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
%26 = load i32*, i32** %4
%27 = call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
%28 = load i32*, i32** %4
%29 = call i32 (i32*, i8*, ...) @fprintf(i32* %28, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@.str.1 = [38 x i8] c" -o <file> output file (stdout)\0A\00"
@.str.2 = [41 x i8] c" -s <w:h:d> image width (512x512x6)\0A\00"
@.str.3 = [47 x i8] c" -S <seed> select a specific random seed\0A\00"
@.str.4 = [48 x i8] c" -n steps between video frames (0)\0A\00"
@.str.5 = [52 x i8] c" -p <x,y> add a start point, may be repeated\0A\00"
@.str.6 = [41 x i8] c" -N use naive color matcher\0A\00"
@.str.7 = [42 x i8] c" -O use octree color matcher\0A\00"
@.str.8 = [52 x i8] c" -K use kdtree color matcher (default)\0A\00"
@.str.9 = [36 x i8] c" -g <gamma> select gamma (2.2)\0A\00"
@.str.10 = [25 x i8] c" -v verbose\0A\00"
@.str.11 = [33 x i8] c" -h print this help\0A\00"
define void @print_usage(i8* %0, i32* nocapture %1) {
%3 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i64 37, i64 1, i32* %1)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0), i64 40, i64 1, i32* %1)
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), i64 46, i64 1, i32* %1)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0), i64 47, i64 1, i32* %1)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0), i64 51, i64 1, i32* %1)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0), i64 40, i64 1, i32* %1)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0), i64 41, i64 1, i32* %1)
%11 = tail call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0), i64 51, i64 1, i32* %1)
%12 = tail call i64 @fwrite(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), i64 35, i64 1, i32* %1)
%13 = tail call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i64 24, i64 1, i32* %1)
%14 = tail call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0), i64 32, i64 1, i32* %1)
ret void
}