#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 */
char *basename(int /*<<< orphan*/);
int /*<<< orphan*/ getprogname();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
void usage() {
  char *cmd = basename(getprogname());
  printf("usage: %s [-c] [-d] [-f] [-#] [FILE...]\n", cmd);
  printf("\n");
  if (!strcmp(cmd, "zcat")) {
    printf("Decompress files to stdout. Like `gzip -dc`.\n");
    printf("\n");
    printf("-c\tOutput to stdout\n");
    printf("-f\tForce: allow read from tty\n");
  } else if (!strcmp(cmd, "gunzip")) {
    printf("Decompress files. With no files, decompresses stdin to stdout.\n");
    printf("On success, the input files are removed and replaced by new\n");
    printf("files without the .gz suffix.\n");
    printf("\n");
    printf("-c\tOutput to stdout\n");
    printf("-f\tForce: allow read from tty\n");
    printf("-k\tKeep input files (don't remove)\n");
  } else {
    printf("Compress files. With no files, compresses stdin to stdout.\n");
    printf("On success, the input files are removed and replaced by new\n");
    printf("files with the .gz suffix.\n");
    printf("\n");
    printf("-c\tOutput to stdout\n");
    printf("-d\tDecompress (act as gunzip)\n");
    printf("-f\tForce: allow overwrite of output file\n");
    printf("-k\tKeep input files (don't remove)\n");
    printf("-#\tCompression level 1-9 (1:fastest, 6:default, 9:best)\n");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    %eax,%edi
call   1060 <basename@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfe2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xea4(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11d0 <usage+0x90>
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfad(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12d3 <usage+0x193>
mov    -0x8(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1250 <usage+0x110>
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf08(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf3b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe3b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeef(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12ce <usage+0x18e>
lea    0xf00(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf20(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdcd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf12(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf23(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf31(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12d3 <usage+0x193>
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
xor    %eax,%eax
call   1050 <getprogname@plt>
mov    %eax,%edi
call   1080 <basename@plt>
mov    %rax,%rbx
lea    0xe87(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe95(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     1219 <usage+0xb9>
lea    0xe87(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     123f <usage+0xdf>
lea    0xf1f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf4e(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7e(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf83(%rip),%rdi
call   1040 <puts@plt>
lea    0xf8b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf9d(%rip),%rdi
call   1040 <puts@plt>
lea    0xfdd(%rip),%rbx
lea    0xfb3(%rip),%rdi
jmp    1287 <usage+0x127>
lea    0xe15(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe89(%rip),%rbx
lea    0xf32(%rip),%rdi
jmp    1287 <usage+0x127>
lea    0xe1c(%rip),%rdi
call   1040 <puts@plt>
lea    0xec6(%rip),%rdi
call   1040 <puts@plt>
lea    0xe43(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xefb(%rip),%rdi
call   1040 <puts@plt>
lea    0xf4a(%rip),%rbx
lea    0xe38(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"usage: %s [-c] [-d] [-f] [-#] [FILE...]\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [5 x i8] c"zcat\00"
@.str.3 = [46 x i8] c"Decompress files to stdout. Like `gzip -dc`.\0A\00"
@.str.4 = [21 x i8] c"-c\09Output to stdout\0A\00"
@.str.5 = [31 x i8] c"-f\09Force: allow read from tty\0A\00"
@.str.6 = [7 x i8] c"gunzip\00"
@.str.7 = [64 x i8] c"Decompress files. With no files, decompresses stdin to stdout.\0A\00"
@.str.8 = [61 x i8] c"On success, the input files are removed and replaced by new\0A\00"
@.str.9 = [31 x i8] c"files without the .gz suffix.\0A\00"
@.str.10 = [36 x i8] c"-k\09Keep input files (don't remove)\0A\00"
@.str.11 = [60 x i8] c"Compress files. With no files, compresses stdin to stdout.\0A\00"
@.str.12 = [28 x i8] c"files with the .gz suffix.\0A\00"
@.str.13 = [31 x i8] c"-d\09Decompress (act as gunzip)\0A\00"
@.str.14 = [42 x i8] c"-f\09Force: allow overwrite of output file\0A\00"
@.str.15 = [57 x i8] c"-#\09Compression level 1-9 (1:fastest, 6:default, 9:best)\0A\00"
define void @usage() {
%1 = alloca i8*
%2 = call i32 (...) @getprogname()
%3 = call i8* @basename(i32 %2)
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = load i8*, i8** %1
%8 = call i32 @strcmp(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%9 = icmp ne i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
br label %38
15: ; preds = %0
%16 = load i8*, i8** %1
%17 = call i32 @strcmp(i8* %16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%18 = icmp ne i32 %17, 0
br i1 %18, label %27, label %19
19: ; preds = %15
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.7, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.8, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
br label %37
27: ; preds = %15
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.11, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.8, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.13, i64 0, i64 0))
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.14, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.15, i64 0, i64 0))
br label %37
37: ; preds = %27, %19
br label %38
38: ; preds = %37, %10
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"usage: %s [-c] [-d] [-f] [-#] [FILE...]\0A\00"
@.str.2 = [5 x i8] c"zcat\00"
@.str.6 = [7 x i8] c"gunzip\00"
@str = [45 x i8] c"Decompress files to stdout. Like `gzip -dc`.\00"
@str.18 = [63 x i8] c"Decompress files. With no files, decompresses stdin to stdout.\00"
@str.20 = [30 x i8] c"files without the .gz suffix.\00"
@str.22 = [30 x i8] c"-f\09Force: allow read from tty\00"
@str.24 = [59 x i8] c"Compress files. With no files, compresses stdin to stdout.\00"
@str.25 = [60 x i8] c"On success, the input files are removed and replaced by new\00"
@str.26 = [27 x i8] c"files with the .gz suffix.\00"
@str.27 = [20 x i8] c"-c\09Output to stdout\00"
@str.28 = [30 x i8] c"-d\09Decompress (act as gunzip)\00"
@str.29 = [41 x i8] c"-f\09Force: allow overwrite of output file\00"
@str.30 = [35 x i8] c"-k\09Keep input files (don't remove)\00"
@str.31 = [56 x i8] c"-#\09Compression level 1-9 (1:fastest, 6:default, 9:best)\00"
define void @usage() {
%1 = tail call i32 (...) @getprogname()
%2 = tail call i8* @basename(i32 %1)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @putchar(i32 10)
br label %27
10: ; preds = %0
%11 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %10
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.18, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.25, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.20, i64 0, i64 0))
%17 = tail call i32 @putchar(i32 10)
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.27, i64 0, i64 0))
br label %27
19: ; preds = %10
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.24, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.25, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.26, i64 0, i64 0))
%23 = tail call i32 @putchar(i32 10)
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.27, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.28, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.29, i64 0, i64 0))
br label %27
27: ; preds = %13, %19, %7
%28 = phi i8* [ getelementptr inbounds ([30 x i8], [30 x i8]* @str.22, i64 0, i64 0), %13 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @str.30, i64 0, i64 0), %19 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @str.27, i64 0, i64 0), %7 ]
%29 = phi i8* [ getelementptr inbounds ([35 x i8], [35 x i8]* @str.30, i64 0, i64 0), %13 ], [ getelementptr inbounds ([56 x i8], [56 x i8]* @str.31, i64 0, i64 0), %19 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @str.22, i64 0, i64 0), %7 ]
%30 = tail call i32 @puts(i8* dereferenceable(1) %28)
%31 = tail call i32 @puts(i8* dereferenceable(1) %29)
%32 = tail call i32 @putchar(i32 10)
ret void
}