#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(int argc, char *argv[]) {
  printf("Usage: tail [-e EOL] [-m pipe|read|mmap] [-n <L>] file\n");
  printf("options:\n");
  printf(" -n L        output no more than L last lines (default 5)\n");
  printf(" -e CHAR     end-of-line char (default '\\n')\n");
  printf(" -m METHOD   use specified method to process the file\n");
  printf("    pipe     read file from the begining to find trailing lines\n");
  printf("    read     read file from end, using read and seek\n");
  printf("    mmap     read file from end, using mmap(2)\n");
  printf(" file        file name or '-' for stdin\n");
  printf("\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
call   1030 <printf@plt>
lea    0xf33(%rip),%rdi
call   1030 <printf@plt>
lea    0xf55(%rip),%rdi
call   1030 <printf@plt>
lea    0xf80(%rip),%rdi
call   1030 <printf@plt>
lea    0xfb5(%rip),%rdi
call   1030 <printf@plt>
lea    0xfdf(%rip),%rdi
call   1030 <printf@plt>
lea    0x1003(%rip),%rdi
call   1030 <printf@plt>
lea    0xf17(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xf03(%rip),%rdi
call   1040 <puts@plt>
lea    0xf00(%rip),%rdi
call   1040 <puts@plt>
lea    0xf2e(%rip),%rdi
call   1040 <puts@plt>
lea    0xf4f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf79(%rip),%rdi
call   1040 <puts@plt>
lea    0xfad(%rip),%rdi
call   1040 <puts@plt>
lea    0xfd6(%rip),%rdi
call   1040 <puts@plt>
lea    0xff9(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Usage: tail [-e EOL] [-m pipe|read|mmap] [-n <L>] file\0A\00"
@.str.1 = [10 x i8] c"options:\0A\00"
@.str.2 = [59 x i8] c" -n L output no more than L last lines (default 5)\0A\00"
@.str.3 = [46 x i8] c" -e CHAR end-of-line char (default '\\n')\0A\00"
@.str.4 = [55 x i8] c" -m METHOD use specified method to process the file\0A\00"
@.str.5 = [65 x i8] c" pipe read file from the begining to find trailing lines\0A\00"
@.str.6 = [54 x i8] c" read read file from end, using read and seek\0A\00"
@.str.7 = [48 x i8] c" mmap read file from end, using mmap(2)\0A\00"
@.str.8 = [41 x i8] c" file file name or '-' for stdin\0A\00"
@.str.9 = [2 x i8] c"\0A\00"
define void @usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.6, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [55 x i8] c"Usage: tail [-e EOL] [-m pipe|read|mmap] [-n <L>] file\00"
@str.10 = [9 x i8] c"options:\00"
@str.11 = [58 x i8] c" -n L output no more than L last lines (default 5)\00"
@str.12 = [45 x i8] c" -e CHAR end-of-line char (default '\\n')\00"
@str.13 = [54 x i8] c" -m METHOD use specified method to process the file\00"
@str.14 = [64 x i8] c" pipe read file from the begining to find trailing lines\00"
@str.15 = [53 x i8] c" read read file from end, using read and seek\00"
@str.16 = [47 x i8] c" mmap read file from end, using mmap(2)\00"
@str.17 = [40 x i8] c" file file name or '-' for stdin\00"
define void @usage(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.10, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.11, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.12, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.13, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.14, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.15, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.16, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.17, i64 0, i64 0))
%12 = tail call i32 @putchar(i32 10)
ret void
}