#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 *, char *);
int /*<<< orphan*/ puts(char *);
int help(char *progname) {
  printf("Usage: %s [OPTION]... [FILE]\n", progname);
  puts("Print the last 10 lines of FILE to standard output.");
  puts("If no FILE given or FILE is -, use standard input.");
  puts("");
  puts("Options:");
  puts("  -b         with -r, begin at first matching line, not last.");
  puts("  -c N       print the last N bytes; -c +N will begin with");
  puts("             the Nth byte");
  puts("  -f         continue reading from file as data is appended");
  puts("  -n N       output the last N lines; -n +N will begin with");
  puts("             the Nth line");
  puts("  -r REGEX   output lines beginning with last line matching");
  puts("             extended regular expression REGEX");
  puts("  -u REGEX   stop following file when a line matches extended");
  puts("             regular expression REGEX, and exit.");
  puts("  --help     display help and exit");
  puts("  --version  display version information and exit");
  puts("");
  puts("The -r and -u options take an extended POSIX regular expression as");
  puts("argument. These expressions are matched against each line without");
  puts("implicit anchoring. ^ and $ will match the start and end of a line");
  puts("respectively. -u is meaningful only when joined with -f, and will");
  puts("output the matching line before terminating.");
  return 0;
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
lea    0xf03(%rip),%rdi
call   1030 <puts@plt>
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf8a(%rip),%rdi
call   1030 <puts@plt>
lea    0xfba(%rip),%rdi
call   1030 <puts@plt>
lea    0xfea(%rip),%rdi
call   1030 <puts@plt>
lea    0xff8(%rip),%rdi
call   1030 <puts@plt>
lea    0x1028(%rip),%rdi
call   1030 <puts@plt>
lea    0x104b(%rip),%rdi
call   1030 <puts@plt>
lea    0x107d(%rip),%rdi
call   1030 <puts@plt>
lea    0x10a2(%rip),%rdi
call   1030 <puts@plt>
lea    0x10b9(%rip),%rdi
call   1030 <puts@plt>
lea    0xe1a(%rip),%rdi
call   1030 <puts@plt>
lea    0x10d3(%rip),%rdi
call   1030 <puts@plt>
lea    0x110a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1140(%rip),%rdi
call   1030 <puts@plt>
lea    0x1177(%rip),%rdi
call   1030 <puts@plt>
lea    0x11ad(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
call   1050 <printf@plt>
lea    0xed7(%rip),%rdi
call   1040 <puts@plt>
lea    0xeff(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf1c(%rip),%rdi
call   1040 <puts@plt>
lea    0xf19(%rip),%rdi
call   1040 <puts@plt>
lea    0xf4b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7a(%rip),%rdi
call   1040 <puts@plt>
lea    0xf88(%rip),%rdi
call   1040 <puts@plt>
lea    0xfb8(%rip),%rdi
call   1040 <puts@plt>
lea    0xfe8(%rip),%rdi
call   1040 <puts@plt>
lea    0xff6(%rip),%rdi
call   1040 <puts@plt>
lea    0x1026(%rip),%rdi
call   1040 <puts@plt>
lea    0x1049(%rip),%rdi
call   1040 <puts@plt>
lea    0x107b(%rip),%rdi
call   1040 <puts@plt>
lea    0x10a0(%rip),%rdi
call   1040 <puts@plt>
lea    0x10b7(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x10d3(%rip),%rdi
call   1040 <puts@plt>
lea    0x110a(%rip),%rdi
call   1040 <puts@plt>
lea    0x1140(%rip),%rdi
call   1040 <puts@plt>
lea    0x1177(%rip),%rdi
call   1040 <puts@plt>
lea    0x11ad(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Usage: %s [OPTION]... [FILE]\0A\00"
@.str.1 = [52 x i8] c"Print the last 10 lines of FILE to standard output.\00"
@.str.2 = [51 x i8] c"If no FILE given or FILE is -, use standard input.\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [9 x i8] c"Options:\00"
@.str.5 = [62 x i8] c" -b with -r, begin at first matching line, not last.\00"
@.str.6 = [59 x i8] c" -c N print the last N bytes; -c +N will begin with\00"
@.str.7 = [26 x i8] c" the Nth byte\00"
@.str.8 = [60 x i8] c" -f continue reading from file as data is appended\00"
@.str.9 = [60 x i8] c" -n N output the last N lines; -n +N will begin with\00"
@.str.10 = [26 x i8] c" the Nth line\00"
@.str.11 = [60 x i8] c" -r REGEX output lines beginning with last line matching\00"
@.str.12 = [47 x i8] c" extended regular expression REGEX\00"
@.str.13 = [62 x i8] c" -u REGEX stop following file when a line matches extended\00"
@.str.14 = [49 x i8] c" regular expression REGEX, and exit.\00"
@.str.15 = [35 x i8] c" --help display help and exit\00"
@.str.16 = [50 x i8] c" --version display version information and exit\00"
@.str.17 = [67 x i8] c"The -r and -u options take an extended POSIX regular expression as\00"
@.str.18 = [66 x i8] c"argument. These expressions are matched against each line without\00"
@.str.19 = [67 x i8] c"implicit anchoring. ^ and $ will match the start and end of a line\00"
@.str.20 = [66 x i8] c"respectively. -u is meaningful only when joined with -f, and will\00"
@.str.21 = [45 x i8] c"output the matching line before terminating.\00"
define i32 @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @puts(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 @puts(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 @puts(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 @puts(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 @puts(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 @puts(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 @puts(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 @puts(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.13, i64 0, i64 0))
%18 = call i32 @puts(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.14, i64 0, i64 0))
%19 = call i32 @puts(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0))
%20 = call i32 @puts(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.16, i64 0, i64 0))
%21 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%22 = call i32 @puts(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.17, i64 0, i64 0))
%23 = call i32 @puts(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.18, i64 0, i64 0))
%24 = call i32 @puts(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.19, i64 0, i64 0))
%25 = call i32 @puts(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.20, i64 0, i64 0))
%26 = call i32 @puts(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.21, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Usage: %s [OPTION]... [FILE]\0A\00"
@.str.1 = [52 x i8] c"Print the last 10 lines of FILE to standard output.\00"
@.str.2 = [51 x i8] c"If no FILE given or FILE is -, use standard input.\00"
@.str.4 = [9 x i8] c"Options:\00"
@.str.5 = [62 x i8] c" -b with -r, begin at first matching line, not last.\00"
@.str.6 = [59 x i8] c" -c N print the last N bytes; -c +N will begin with\00"
@.str.7 = [26 x i8] c" the Nth byte\00"
@.str.8 = [60 x i8] c" -f continue reading from file as data is appended\00"
@.str.9 = [60 x i8] c" -n N output the last N lines; -n +N will begin with\00"
@.str.10 = [26 x i8] c" the Nth line\00"
@.str.11 = [60 x i8] c" -r REGEX output lines beginning with last line matching\00"
@.str.12 = [47 x i8] c" extended regular expression REGEX\00"
@.str.13 = [62 x i8] c" -u REGEX stop following file when a line matches extended\00"
@.str.14 = [49 x i8] c" regular expression REGEX, and exit.\00"
@.str.15 = [35 x i8] c" --help display help and exit\00"
@.str.16 = [50 x i8] c" --version display version information and exit\00"
@.str.17 = [67 x i8] c"The -r and -u options take an extended POSIX regular expression as\00"
@.str.18 = [66 x i8] c"argument. These expressions are matched against each line without\00"
@.str.19 = [67 x i8] c"implicit anchoring. ^ and $ will match the start and end of a line\00"
@.str.20 = [66 x i8] c"respectively. -u is meaningful only when joined with -f, and will\00"
@.str.21 = [45 x i8] c"output the matching line before terminating.\00"
define i32 @help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.5, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.6, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.8, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.11, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.12, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.13, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.14, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.16, i64 0, i64 0))
%19 = tail call i32 @putchar(i32 10)
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str.17, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.18, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str.19, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.20, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.21, i64 0, i64 0))
ret i32 0
}