#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*/ _algorithm_help();
char *_longopt(char *);
char *_zlibhelp();
int /*<<< orphan*/ printf(char *, ...);
void options_print_help() {
  printf("Usage: vmsim [OPTIONS] ALGORITHM [TRACEFILE|-]\n");
  printf("Process TRACEFILE, simulating a VM system. Reports stats on paging "
         "behavior.\n");
  printf(_zlibhelp());
  printf("If TRACEFILE is not specified or is '-', input will be taken from "
         "stdin.\n");
  printf("\n");
  printf("ALGORITHM specifies the fault handler, and should be one of:\n");
  _algorithm_help();
  printf("\n");
  printf("Options:\n");
  printf("-h%s               Print this message and exit.\n",
         _longopt("|--help"));
  printf("-V%s            Print the version information.\n",
         _longopt("|--version"));
  printf("-v%s            Verbose output. Includes progress output.\n",
         _longopt("|--verbose"));
  printf("-t%s               Run self tests.\n", _longopt("|--test"));
  printf("-o FILE%s   Append statistics output to the given file.\n",
         _longopt("|--output=FILE"));
  printf("-l REFS%s    Stop after first REFS refs.\n",
         _longopt("|--limit=REFS"));
  printf("-p PAGES%s  Simulate PAGES physical pages.\n",
         _longopt("|--pages=PAGES"));
  printf("                        Minimum value %d.\n", 4);
  printf("-s SIZE%s     Simulate a page size of SIZE bytes.\n",
         _longopt("|--size=SIZE"));
  printf("                        Size must be a power of 2.\n");
}


x86 assembly (clang, -O0):
<options_print_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <_zlibhelp@plt>
mov    %rax,%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x11c8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf34(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <_algorithm_help@plt>
lea    0x11a5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf4f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf7c(%rip),%rdi
call   1040 <_longopt@plt>
mov    %rax,%rsi
lea    0xf3c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf97(%rip),%rdi
call   1040 <_longopt@plt>
mov    %rax,%rsi
lea    0xf58(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xfc0(%rip),%rdi
call   1040 <_longopt@plt>
mov    %rax,%rsi
lea    0xf76(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xfd2(%rip),%rdi
call   1040 <_longopt@plt>
mov    %rax,%rsi
lea    0xf9f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xff6(%rip),%rdi
call   1040 <_longopt@plt>
mov    %rax,%rsi
lea    0xfae(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x1012(%rip),%rdi
call   1040 <_longopt@plt>
mov    %rax,%rsi
lea    0xfd9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x102f(%rip),%rdi
call   1040 <_longopt@plt>
mov    %rax,%rsi
lea    0xff4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x1021(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x106c(%rip),%rdi
call   1040 <_longopt@plt>
mov    %rax,%rsi
lea    0x102a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x105c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<options_print_help>:
push   %rax
lea    0x10a4(%rip),%rdi
call   1060 <puts@plt>
lea    0x10c7(%rip),%rdi
call   1060 <puts@plt>
xor    %eax,%eax
call   1040 <_zlibhelp@plt>
mov    %rax,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0x10f7(%rip),%rdi
call   1060 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x112a(%rip),%rdi
call   1060 <puts@plt>
xor    %eax,%eax
call   1080 <_algorithm_help@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x114a(%rip),%rdi
call   1060 <puts@plt>
lea    0xe61(%rip),%rdi
call   1050 <_longopt@plt>
lea    0xe24(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xe7c(%rip),%rdi
call   1050 <_longopt@plt>
lea    0xe40(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xea5(%rip),%rdi
call   1050 <_longopt@plt>
lea    0xe5e(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xeb7(%rip),%rdi
call   1050 <_longopt@plt>
lea    0xe87(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xedb(%rip),%rdi
call   1050 <_longopt@plt>
lea    0xe96(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xef7(%rip),%rdi
call   1050 <_longopt@plt>
lea    0xec1(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xf14(%rip),%rdi
call   1050 <_longopt@plt>
lea    0xedc(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xf51(%rip),%rdi
call   1050 <_longopt@plt>
lea    0xf12(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0x104c(%rip),%rdi
pop    %rax
jmp    1060 <puts@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"Usage: vmsim [OPTIONS] ALGORITHM [TRACEFILE|-]\0A\00"
@.str.1 = [78 x i8] c"Process TRACEFILE, simulating a VM system. Reports stats on paging behavior.\0A\00"
@.str.2 = [74 x i8] c"If TRACEFILE is not specified or is '-', input will be taken from stdin.\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [62 x i8] c"ALGORITHM specifies the fault handler, and should be one of:\0A\00"
@.str.5 = [10 x i8] c"Options:\0A\00"
@.str.6 = [49 x i8] c"-h%s Print this message and exit.\0A\00"
@.str.7 = [8 x i8] c"|--help\00"
@.str.8 = [48 x i8] c"-V%s Print the version information.\0A\00"
@.str.9 = [11 x i8] c"|--version\00"
@.str.10 = [59 x i8] c"-v%s Verbose output. Includes progress output.\0A\00"
@.str.11 = [11 x i8] c"|--verbose\00"
@.str.12 = [36 x i8] c"-t%s Run self tests.\0A\00"
@.str.13 = [8 x i8] c"|--test\00"
@.str.14 = [57 x i8] c"-o FILE%s Append statistics output to the given file.\0A\00"
@.str.15 = [15 x i8] c"|--output=FILE\00"
@.str.16 = [42 x i8] c"-l REFS%s Stop after first REFS refs.\0A\00"
@.str.17 = [14 x i8] c"|--limit=REFS\00"
@.str.18 = [44 x i8] c"-p PAGES%s Simulate PAGES physical pages.\0A\00"
@.str.19 = [15 x i8] c"|--pages=PAGES\00"
@.str.20 = [43 x i8] c" Minimum value %d.\0A\00"
@.str.21 = [51 x i8] c"-s SIZE%s Simulate a page size of SIZE bytes.\0A\00"
@.str.22 = [13 x i8] c"|--size=SIZE\00"
@.str.23 = [52 x i8] c" Size must be a power of 2.\0A\00"
define void @options_print_help() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.1, i64 0, i64 0))
%3 = call i8* (...) @_zlibhelp()
%4 = call i32 (i8*, ...) @printf(i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 (...) @_algorithm_help()
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%11 = call i8* @_longopt(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0), i8* %11)
%13 = call i8* @_longopt(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0), i8* %13)
%15 = call i8* @_longopt(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.10, i64 0, i64 0), i8* %15)
%17 = call i8* @_longopt(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.12, i64 0, i64 0), i8* %17)
%19 = call i8* @_longopt(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.14, i64 0, i64 0), i8* %19)
%21 = call i8* @_longopt(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.16, i64 0, i64 0), i8* %21)
%23 = call i8* @_longopt(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.18, i64 0, i64 0), i8* %23)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.20, i64 0, i64 0), i32 4)
%26 = call i8* @_longopt(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.22, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.21, i64 0, i64 0), i8* %26)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.23, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.6 = [49 x i8] c"-h%s Print this message and exit.\0A\00"
@.str.7 = [8 x i8] c"|--help\00"
@.str.8 = [48 x i8] c"-V%s Print the version information.\0A\00"
@.str.9 = [11 x i8] c"|--version\00"
@.str.10 = [59 x i8] c"-v%s Verbose output. Includes progress output.\0A\00"
@.str.11 = [11 x i8] c"|--verbose\00"
@.str.12 = [36 x i8] c"-t%s Run self tests.\0A\00"
@.str.13 = [8 x i8] c"|--test\00"
@.str.14 = [57 x i8] c"-o FILE%s Append statistics output to the given file.\0A\00"
@.str.15 = [15 x i8] c"|--output=FILE\00"
@.str.16 = [42 x i8] c"-l REFS%s Stop after first REFS refs.\0A\00"
@.str.17 = [14 x i8] c"|--limit=REFS\00"
@.str.18 = [44 x i8] c"-p PAGES%s Simulate PAGES physical pages.\0A\00"
@.str.19 = [15 x i8] c"|--pages=PAGES\00"
@.str.20 = [43 x i8] c" Minimum value %d.\0A\00"
@.str.21 = [51 x i8] c"-s SIZE%s Simulate a page size of SIZE bytes.\0A\00"
@.str.22 = [13 x i8] c"|--size=SIZE\00"
@str = [47 x i8] c"Usage: vmsim [OPTIONS] ALGORITHM [TRACEFILE|-]\00"
@str.24 = [77 x i8] c"Process TRACEFILE, simulating a VM system. Reports stats on paging behavior.\00"
@str.25 = [73 x i8] c"If TRACEFILE is not specified or is '-', input will be taken from stdin.\00"
@str.26 = [61 x i8] c"ALGORITHM specifies the fault handler, and should be one of:\00"
@str.27 = [9 x i8] c"Options:\00"
@str.28 = [51 x i8] c" Size must be a power of 2.\00"
define void @options_print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str.24, i64 0, i64 0))
%3 = tail call i8* (...) @_zlibhelp()
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.25, i64 0, i64 0))
%6 = tail call i32 @putchar(i32 10)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.26, i64 0, i64 0))
%8 = tail call i32 (...) @_algorithm_help()
%9 = tail call i32 @putchar(i32 10)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.27, i64 0, i64 0))
%11 = tail call i8* @_longopt(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0), i8* %11)
%13 = tail call i8* @_longopt(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0), i8* %13)
%15 = tail call i8* @_longopt(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.10, i64 0, i64 0), i8* %15)
%17 = tail call i8* @_longopt(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.12, i64 0, i64 0), i8* %17)
%19 = tail call i8* @_longopt(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0))
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.14, i64 0, i64 0), i8* %19)
%21 = tail call i8* @_longopt(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i64 0, i64 0))
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.16, i64 0, i64 0), i8* %21)
%23 = tail call i8* @_longopt(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0))
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.18, i64 0, i64 0), i8* %23)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.20, i64 0, i64 0), i32 4)
%26 = tail call i8* @_longopt(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.22, i64 0, i64 0))
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.21, i64 0, i64 0), i8* %26)
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.28, i64 0, i64 0))
ret void
}