void usage(argv0, exitcode) char *argv0;
int exitcode;
{
  printf("Usage: %s [options] archive.tgz [filename] ...\n", argv0);
  printf("   or: %s [options] -d filename.gz ...\n", argv0);
  printf("\n");
  printf("Options: -t   Test -- list contents but don't extract\n");
  printf("         -f   Force -- allow existing files to be overwritten\n");
  printf("         -q   Quiet -- suppress the normal chatter\n");
  printf("         -v   Verbose -- output extra information about each file\n");
  printf("         -p   Path -- allow absolute pathnames (don't strip leading "
         "'/')\n");
  printf("         -c   Convert -- convert files to local text format\n");
  printf("         -d   Decompress -- perform \"gunzip\" but not \"tar x\"\n");
  printf("         -n   No-name -- with \"-d\", ignore original name in gzip "
         "header\n");
  printf("\n");
  printf("This program lists/extracts files from a \"*.tar\" or \"*.tgz\" "
         "archive.  You can\n");
  printf("optionally specify certain files or directories to list/extract; "
         "otherwise it\n");
  printf("will list/extract them all.  File attributes are NOT preserved.  "
         "Linked files\n");
  printf("will be restored via COPYING.  This program can also be used (with "
         "-d) to\n");
  printf("gunzip non-tar files.\n");
  printf("\n");
  printf(
      "THIS PROGRAM IS IN THE PUBLIC DOMAIN, AND IS FREELY REDISTRIBUTABLE.\n");
  printf("Report bugs to kirkenda@cs.pdx.edu\n");
  exit(exitcode);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10ae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfa5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1010(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1040(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1030(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x106d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10ae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10ef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1130(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x116d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfdc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1168(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x11a0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xeb1(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xed0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xedd(%rip),%rdi
call   1040 <puts@plt>
lea    0xf07(%rip),%rdi
call   1040 <puts@plt>
lea    0xf39(%rip),%rdi
call   1040 <puts@plt>
lea    0xf60(%rip),%rdi
call   1040 <puts@plt>
lea    0xf96(%rip),%rdi
call   1040 <puts@plt>
lea    0xfd3(%rip),%rdi
call   1040 <puts@plt>
lea    0x1003(%rip),%rdi
call   1040 <puts@plt>
lea    0x1034(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1066(%rip),%rdi
call   1040 <puts@plt>
lea    0x10a8(%rip),%rdi
call   1040 <puts@plt>
lea    0x10ea(%rip),%rdi
call   1040 <puts@plt>
lea    0x112c(%rip),%rdi
call   1040 <puts@plt>
lea    0x116a(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x116a(%rip),%rdi
call   1040 <puts@plt>
lea    0x11a3(%rip),%rdi
call   1040 <puts@plt>
mov    %ebp,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"Usage: %s [options] archive.tgz [filename] ...\0A\00"
@.str.1 = [40 x i8] c" or: %s [options] -d filename.gz ...\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [55 x i8] c"Options: -t Test -- list contents but don't extract\0A\00"
@.str.4 = [63 x i8] c" -f Force -- allow existing files to be overwritten\0A\00"
@.str.5 = [52 x i8] c" -q Quiet -- suppress the normal chatter\0A\00"
@.str.6 = [67 x i8] c" -v Verbose -- output extra information about each file\0A\00"
@.str.7 = [74 x i8] c" -p Path -- allow absolute pathnames (don't strip leading '/')\0A\00"
@.str.8 = [61 x i8] c" -c Convert -- convert files to local text format\0A\00"
@.str.9 = [62 x i8] c" -d Decompress -- perform \22gunzip\22 but not \22tar x\22\0A\00"
@.str.10 = [73 x i8] c" -n No-name -- with \22-d\22, ignore original name in gzip header\0A\00"
@.str.11 = [79 x i8] c"This program lists/extracts files from a \22*.tar\22 or \22*.tgz\22 archive. You can\0A\00"
@.str.12 = [79 x i8] c"optionally specify certain files or directories to list/extract; otherwise it\0A\00"
@.str.13 = [79 x i8] c"will list/extract them all. File attributes are NOT preserved. Linked files\0A\00"
@.str.14 = [75 x i8] c"will be restored via COPYING. This program can also be used (with -d) to\0A\00"
@.str.15 = [23 x i8] c"gunzip non-tar files.\0A\00"
@.str.16 = [70 x i8] c"THIS PROGRAM IS IN THE PUBLIC DOMAIN, AND IS FREELY REDISTRIBUTABLE.\0A\00"
@.str.17 = [36 x i8] c"Report bugs to kirkenda@cs.pdx.edu\0A\00"
define void @usage(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.7, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.8, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.9, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.10, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.11, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.12, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.13, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.14, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.16, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.17, i64 0, i64 0))
%27 = load i32, i32* %4
unreachable
}

LLVM IR (-O2):
@.str = [48 x i8] c"Usage: %s [options] archive.tgz [filename] ...\0A\00"
@.str.1 = [40 x i8] c" or: %s [options] -d filename.gz ...\0A\00"
@str = [54 x i8] c"Options: -t Test -- list contents but don't extract\00"
@str.18 = [62 x i8] c" -f Force -- allow existing files to be overwritten\00"
@str.19 = [51 x i8] c" -q Quiet -- suppress the normal chatter\00"
@str.20 = [66 x i8] c" -v Verbose -- output extra information about each file\00"
@str.21 = [73 x i8] c" -p Path -- allow absolute pathnames (don't strip leading '/')\00"
@str.22 = [60 x i8] c" -c Convert -- convert files to local text format\00"
@str.23 = [61 x i8] c" -d Decompress -- perform \22gunzip\22 but not \22tar x\22\00"
@str.24 = [72 x i8] c" -n No-name -- with \22-d\22, ignore original name in gzip header\00"
@str.25 = [78 x i8] c"This program lists/extracts files from a \22*.tar\22 or \22*.tgz\22 archive. You can\00"
@str.26 = [78 x i8] c"optionally specify certain files or directories to list/extract; otherwise it\00"
@str.27 = [78 x i8] c"will list/extract them all. File attributes are NOT preserved. Linked files\00"
@str.28 = [74 x i8] c"will be restored via COPYING. This program can also be used (with -d) to\00"
@str.29 = [22 x i8] c"gunzip non-tar files.\00"
@str.30 = [69 x i8] c"THIS PROGRAM IS IN THE PUBLIC DOMAIN, AND IS FREELY REDISTRIBUTABLE.\00"
@str.31 = [35 x i8] c"Report bugs to kirkenda@cs.pdx.edu\00"
define void @usage(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.18, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.19, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.20, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.21, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.22, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.23, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.24, i64 0, i64 0))
%14 = tail call i32 @putchar(i32 10)
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.25, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.26, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.27, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.28, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.29, i64 0, i64 0))
%20 = tail call i32 @putchar(i32 10)
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.30, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.31, i64 0, i64 0))
tail call void @exit(i32 %1)
unreachable
}