#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(
      "Usage: %s [-i INTERVAL] [-w W_THRESHOLD] [-c C_THRESHOLD] [-h] [-V]\n",
      argv[0]);
  printf("\n");
  printf("-i INTERVAL\tinterval in seconds (default %d)\n", 60);
  printf(
      "-c C_THRESHOLD\tnumber of pages for critical threshold (default %d)\n",
      60);
  printf("-w W_THRESHOLD\tnumber of pages for warning threshold (default %d)\n",
         30);
  printf("-h \t\tthis help\n");
  printf("-V \t\tversion\n");
  printf("\n");
  printf("\nExamples: \n");
  printf("\t%s -i 2 -c 2 -w 1          # critical: 1 page/s  warning: 0.5 "
         "page/s\n",
         argv[0]);
  printf("\t%s -i 600 -c 1200 -w 300   # critical: 2 page/s  warning: 0.5 "
         "page/s\n",
         argv[0]);
}


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    0xfeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
mov    $0x3c,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1a(%rip),%rdi
mov    $0x3c,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4b(%rip),%rdi
mov    $0x1e,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xf67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xf99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rsi
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeef(%rip),%rdi
mov    $0x3c,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf0a(%rip),%rdi
mov    $0x3c,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf3b(%rip),%rdi
mov    $0x1e,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xff9(%rip),%rdi
call   1040 <puts@plt>
lea    0xffc(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xff3(%rip),%rdi
call   1040 <puts@plt>
mov    (%rbx),%rsi
lea    0xf3a(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xf70(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [69 x i8] c"Usage: %s [-i INTERVAL] [-w W_THRESHOLD] [-c C_THRESHOLD] [-h] [-V]\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [46 x i8] c"-i INTERVAL\09interval in seconds (default %d)\0A\00"
@.str.3 = [68 x i8] c"-c C_THRESHOLD\09number of pages for critical threshold (default %d)\0A\00"
@.str.4 = [67 x i8] c"-w W_THRESHOLD\09number of pages for warning threshold (default %d)\0A\00"
@.str.5 = [16 x i8] c"-h \09\09this help\0A\00"
@.str.6 = [14 x i8] c"-V \09\09version\0A\00"
@.str.7 = [13 x i8] c"\0AExamples: \0A\00"
@.str.8 = [71 x i8] c"\09%s -i 2 -c 2 -w 1 # critical: 1 page/s warning: 0.5 page/s\0A\00"
@.str.9 = [71 x i8] c"\09%s -i 600 -c 1200 -w 300 # critical: 2 page/s warning: 0.5 page/s\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 ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i32 60)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.3, i64 0, i64 0), i32 60)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.4, i64 0, i64 0), i32 30)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%15 = load i8**, i8*** %2
%16 = getelementptr inbounds i8*, i8** %15, i64 0
%17 = load i8*, i8** %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.8, i64 0, i64 0), i8* %17)
%19 = load i8**, i8*** %2
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.9, i64 0, i64 0), i8* %21)
ret void
}

LLVM IR (-O2):
@.str = [69 x i8] c"Usage: %s [-i INTERVAL] [-w W_THRESHOLD] [-c C_THRESHOLD] [-h] [-V]\0A\00"
@.str.2 = [46 x i8] c"-i INTERVAL\09interval in seconds (default %d)\0A\00"
@.str.3 = [68 x i8] c"-c C_THRESHOLD\09number of pages for critical threshold (default %d)\0A\00"
@.str.4 = [67 x i8] c"-w W_THRESHOLD\09number of pages for warning threshold (default %d)\0A\00"
@.str.8 = [71 x i8] c"\09%s -i 2 -c 2 -w 1 # critical: 1 page/s warning: 0.5 page/s\0A\00"
@.str.9 = [71 x i8] c"\09%s -i 600 -c 1200 -w 300 # critical: 2 page/s warning: 0.5 page/s\0A\00"
@str = [15 x i8] c"-h \09\09this help\00"
@str.10 = [13 x i8] c"-V \09\09version\00"
@str.11 = [12 x i8] c"\0AExamples: \00"
define void @usage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i32 60)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.3, i64 0, i64 0), i32 60)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str.4, i64 0, i64 0), i32 30)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.10, i64 0, i64 0))
%10 = tail call i32 @putchar(i32 10)
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.11, i64 0, i64 0))
%12 = load i8*, i8** %0
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @.str.8, i64 0, i64 0), i8* %12)
%14 = load i8*, i8** %0
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @.str.9, i64 0, i64 0), i8* %14)
ret void
}