#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void print_usage(FILE *stream, int exit_code) {
  fprintf(stream, "Usage: xsw [options] FILE\n");
  fprintf(stream, "Start a presentation.\n");
  fprintf(stream, "\n");
  fprintf(stream, "To learn more about xsw, start with xsw --tutorial.\n");
  fprintf(stream, "\n");
  fprintf(stream, "Basic options:\n");
  fprintf(stream, "  -T, --tutorial      display a brief tutorial about xsw\n");
  fprintf(stream, "  -h, --help          see this help\n");
  fprintf(stream, "  -v, --version       show version\n");
  fprintf(stream, "\n");
  fprintf(stream, "User options:\n");
  fprintf(stream, "  -f, --fullscreen    start presentation in fullscreen\n");
  fprintf(stream, "\n");
  fprintf(stream, "Developer options:\n");
  fprintf(stream, "  -d, --developer     developer mode\n");
  fprintf(stream, "  -s, --slide [NUM]   start at the slide NUM\n");
  fprintf(stream, "  -l, --last          start at the last slide\n");
  exit(exit_code);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf0b(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeeb(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xedd(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xedd(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf07(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf1c(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe9b(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf20(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf1f(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe6b(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf37(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf3b(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf51(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf6f(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xec1(%rip),%rdi
mov    $0x1a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xec3(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
lea    0xeb4(%rip),%rdi
mov    $0x34,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
lea    0xec3(%rip),%rdi
mov    $0xf,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xeba(%rip),%rdi
mov    $0x39,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xedb(%rip),%rdi
mov    $0x24,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xee7(%rip),%rdi
mov    $0x23,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
lea    0xee5(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xedb(%rip),%rdi
mov    $0x37,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
lea    0xeed(%rip),%rdi
mov    $0x13,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xee8(%rip),%rdi
mov    $0x25,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xef5(%rip),%rdi
mov    $0x2d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf0a(%rip),%rdi
mov    $0x2e,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
mov    %ebp,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Usage: xsw [options] FILE\0A\00"
@.str.1 = [23 x i8] c"Start a presentation.\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [53 x i8] c"To learn more about xsw, start with xsw --tutorial.\0A\00"
@.str.4 = [16 x i8] c"Basic options:\0A\00"
@.str.5 = [58 x i8] c" -T, --tutorial display a brief tutorial about xsw\0A\00"
@.str.6 = [37 x i8] c" -h, --help see this help\0A\00"
@.str.7 = [36 x i8] c" -v, --version show version\0A\00"
@.str.8 = [15 x i8] c"User options:\0A\00"
@.str.9 = [56 x i8] c" -f, --fullscreen start presentation in fullscreen\0A\00"
@.str.10 = [20 x i8] c"Developer options:\0A\00"
@.str.11 = [38 x i8] c" -d, --developer developer mode\0A\00"
@.str.12 = [46 x i8] c" -s, --slide [NUM] start at the slide NUM\0A\00"
@.str.13 = [47 x i8] c" -l, --last start at the last slide\0A\00"
define void @print_usage(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%7 = load i32*, i32** %3
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32*, i32** %3
%10 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32*, i32** %3
%12 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0))
%13 = load i32*, i32** %3
%14 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%15 = load i32*, i32** %3
%16 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%17 = load i32*, i32** %3
%18 = call i32 @fprintf(i32* %17, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.5, i64 0, i64 0))
%19 = load i32*, i32** %3
%20 = call i32 @fprintf(i32* %19, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0))
%21 = load i32*, i32** %3
%22 = call i32 @fprintf(i32* %21, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%23 = load i32*, i32** %3
%24 = call i32 @fprintf(i32* %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%25 = load i32*, i32** %3
%26 = call i32 @fprintf(i32* %25, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0))
%27 = load i32*, i32** %3
%28 = call i32 @fprintf(i32* %27, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.9, i64 0, i64 0))
%29 = load i32*, i32** %3
%30 = call i32 @fprintf(i32* %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%31 = load i32*, i32** %3
%32 = call i32 @fprintf(i32* %31, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
%33 = load i32*, i32** %3
%34 = call i32 @fprintf(i32* %33, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0))
%35 = load i32*, i32** %3
%36 = call i32 @fprintf(i32* %35, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.12, i64 0, i64 0))
%37 = load i32*, i32** %3
%38 = call i32 @fprintf(i32* %37, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.13, i64 0, i64 0))
%39 = load i32, i32* %4
%40 = call i32 @exit(i32 %39)
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"Usage: xsw [options] FILE\0A\00"
@.str.1 = [23 x i8] c"Start a presentation.\0A\00"
@.str.3 = [53 x i8] c"To learn more about xsw, start with xsw --tutorial.\0A\00"
@.str.4 = [16 x i8] c"Basic options:\0A\00"
@.str.5 = [58 x i8] c" -T, --tutorial display a brief tutorial about xsw\0A\00"
@.str.6 = [37 x i8] c" -h, --help see this help\0A\00"
@.str.7 = [36 x i8] c" -v, --version show version\0A\00"
@.str.8 = [15 x i8] c"User options:\0A\00"
@.str.9 = [56 x i8] c" -f, --fullscreen start presentation in fullscreen\0A\00"
@.str.10 = [20 x i8] c"Developer options:\0A\00"
@.str.11 = [38 x i8] c" -d, --developer developer mode\0A\00"
@.str.12 = [46 x i8] c" -s, --slide [NUM] start at the slide NUM\0A\00"
@.str.13 = [47 x i8] c" -l, --last start at the last slide\0A\00"
define void @print_usage(i32* nocapture %0, i32 %1) {
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i64 26, i64 1, i32* %0)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i64 22, i64 1, i32* %0)
%5 = tail call i32 @fputc(i32 10, i32* %0)
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0), i64 52, i64 1, i32* %0)
%7 = tail call i32 @fputc(i32 10, i32* %0)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i64 15, i64 1, i32* %0)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.5, i64 0, i64 0), i64 57, i64 1, i32* %0)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0), i64 36, i64 1, i32* %0)
%11 = tail call i64 @fwrite(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i64 35, i64 1, i32* %0)
%12 = tail call i32 @fputc(i32 10, i32* %0)
%13 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i64 14, i64 1, i32* %0)
%14 = tail call i64 @fwrite(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.9, i64 0, i64 0), i64 55, i64 1, i32* %0)
%15 = tail call i32 @fputc(i32 10, i32* %0)
%16 = tail call i64 @fwrite(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), i64 19, i64 1, i32* %0)
%17 = tail call i64 @fwrite(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0), i64 37, i64 1, i32* %0)
%18 = tail call i64 @fwrite(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.12, i64 0, i64 0), i64 45, i64 1, i32* %0)
%19 = tail call i64 @fwrite(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.13, i64 0, i64 0), i64 46, i64 1, i32* %0)
%20 = tail call i32 @exit(i32 %1)
unreachable
}