#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void help(FILE *fp, const char *argv0) {
  fprintf(fp, "Usage: %s NAME [SUFFIX]\n", argv0);
  fprintf(fp, "  or:  %s OPTION... NAME...\n", argv0);
  fprintf(fp, "Print NAME with any leading directory components removed.\n");
  fprintf(fp, "If specified, also remove a trailing SUFFIX.\n");
  fprintf(fp, "\n");
  fprintf(fp, "  -a, --multiple       support multiple arguments and treat "
              "each as a NAME\n");
  fprintf(fp, "  -s, --suffix=SUFFIX  remove a trailing SUFFIX\n");
  fprintf(
      fp,
      "  -z, --zero           separate output with NUL rather than newline\n");
  fprintf(fp, "      --help           display this help and exit\n");
  fprintf(fp, "      --version        output version information and exit\n");
  fprintf(fp, "\n");
  fprintf(fp, "Examples:\n");
  fprintf(fp, "  %s /usr/bin/sort          -> \"sort\"\n", argv0);
  fprintf(fp, "  %s include/stdio.h .h     -> \"stdio\"\n", argv0);
  fprintf(fp, "  %s -s .h include/stdio.h  -> \"stdio\"\n", argv0);
  fprintf(fp, "  %s -a any/str1 any/str2   -> \"str1\" followed by \"str2\"\n",
          argv0);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xedf(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf08(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x110f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf12(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf4c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf6b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf9e(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfbf(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x10a3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfd7(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xfcc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xfdd(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xfef(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0x1001(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xebf(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xec7(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xed0(%rip),%rdi
mov    $0x3a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xef2(%rip),%rdi
mov    $0x2d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
lea    0xefa(%rip),%rdi
mov    $0x4b,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf2d(%rip),%rdi
mov    $0x30,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf45(%rip),%rdi
mov    $0x44,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf71(%rip),%rdi
mov    $0x32,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf8b(%rip),%rdi
mov    $0x3b,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
lea    0xfa1(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf93(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xfa6(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xfba(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xfce(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Usage: %s NAME [SUFFIX]\0A\00"
@.str.1 = [29 x i8] c" or: %s OPTION... NAME...\0A\00"
@.str.2 = [59 x i8] c"Print NAME with any leading directory components removed.\0A\00"
@.str.3 = [46 x i8] c"If specified, also remove a trailing SUFFIX.\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [76 x i8] c" -a, --multiple support multiple arguments and treat each as a NAME\0A\00"
@.str.6 = [49 x i8] c" -s, --suffix=SUFFIX remove a trailing SUFFIX\0A\00"
@.str.7 = [69 x i8] c" -z, --zero separate output with NUL rather than newline\0A\00"
@.str.8 = [51 x i8] c" --help display this help and exit\0A\00"
@.str.9 = [60 x i8] c" --version output version information and exit\0A\00"
@.str.10 = [11 x i8] c"Examples:\0A\00"
@.str.11 = [39 x i8] c" %s /usr/bin/sort -> \22sort\22\0A\00"
@.str.12 = [40 x i8] c" %s include/stdio.h .h -> \22stdio\22\0A\00"
@.str.13 = [40 x i8] c" %s -s .h include/stdio.h -> \22stdio\22\0A\00"
@.str.14 = [58 x i8] c" %s -a any/str1 any/str2 -> \22str1\22 followed by \22str2\22\0A\00"
define void @help(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32*, i32** %3
%9 = load i8*, i8** %4
%10 = call i32 (i32*, i8*, ...) @fprintf(i32* %8, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = load i32*, i32** %3
%12 = call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0))
%13 = load i32*, i32** %3
%14 = call i32 (i32*, i8*, ...) @fprintf(i32* %13, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0))
%15 = load i32*, i32** %3
%16 = call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%17 = load i32*, i32** %3
%18 = call i32 (i32*, i8*, ...) @fprintf(i32* %17, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.5, i64 0, i64 0))
%19 = load i32*, i32** %3
%20 = call i32 (i32*, i8*, ...) @fprintf(i32* %19, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0))
%21 = load i32*, i32** %3
%22 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.7, i64 0, i64 0))
%23 = load i32*, i32** %3
%24 = call i32 (i32*, i8*, ...) @fprintf(i32* %23, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.8, i64 0, i64 0))
%25 = load i32*, i32** %3
%26 = call i32 (i32*, i8*, ...) @fprintf(i32* %25, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
%27 = load i32*, i32** %3
%28 = call i32 (i32*, i8*, ...) @fprintf(i32* %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%29 = load i32*, i32** %3
%30 = call i32 (i32*, i8*, ...) @fprintf(i32* %29, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%31 = load i32*, i32** %3
%32 = load i8*, i8** %4
%33 = call i32 (i32*, i8*, ...) @fprintf(i32* %31, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.11, i64 0, i64 0), i8* %32)
%34 = load i32*, i32** %3
%35 = load i8*, i8** %4
%36 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), i8* %35)
%37 = load i32*, i32** %3
%38 = load i8*, i8** %4
%39 = call i32 (i32*, i8*, ...) @fprintf(i32* %37, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.13, i64 0, i64 0), i8* %38)
%40 = load i32*, i32** %3
%41 = load i8*, i8** %4
%42 = call i32 (i32*, i8*, ...) @fprintf(i32* %40, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.14, i64 0, i64 0), i8* %41)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Usage: %s NAME [SUFFIX]\0A\00"
@.str.1 = [29 x i8] c" or: %s OPTION... NAME...\0A\00"
@.str.2 = [59 x i8] c"Print NAME with any leading directory components removed.\0A\00"
@.str.3 = [46 x i8] c"If specified, also remove a trailing SUFFIX.\0A\00"
@.str.5 = [76 x i8] c" -a, --multiple support multiple arguments and treat each as a NAME\0A\00"
@.str.6 = [49 x i8] c" -s, --suffix=SUFFIX remove a trailing SUFFIX\0A\00"
@.str.7 = [69 x i8] c" -z, --zero separate output with NUL rather than newline\0A\00"
@.str.8 = [51 x i8] c" --help display this help and exit\0A\00"
@.str.9 = [60 x i8] c" --version output version information and exit\0A\00"
@.str.10 = [11 x i8] c"Examples:\0A\00"
@.str.11 = [39 x i8] c" %s /usr/bin/sort -> \22sort\22\0A\00"
@.str.12 = [40 x i8] c" %s include/stdio.h .h -> \22stdio\22\0A\00"
@.str.13 = [40 x i8] c" %s -s .h include/stdio.h -> \22stdio\22\0A\00"
@.str.14 = [58 x i8] c" %s -a any/str1 any/str2 -> \22str1\22 followed by \22str2\22\0A\00"
define void @help(i32* nocapture %0, i8* %1) {
%3 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0), i64 58, i64 1, i32* %0)
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), i64 45, i64 1, i32* %0)
%7 = tail call i32 @fputc(i32 10, i32* %0)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.5, i64 0, i64 0), i64 75, i64 1, i32* %0)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0), i64 48, i64 1, i32* %0)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.7, i64 0, i64 0), i64 68, i64 1, i32* %0)
%11 = tail call i64 @fwrite(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.8, i64 0, i64 0), i64 50, i64 1, i32* %0)
%12 = tail call i64 @fwrite(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0), i64 59, i64 1, i32* %0)
%13 = tail call i32 @fputc(i32 10, i32* %0)
%14 = tail call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i64 10, i64 1, i32* %0)
%15 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.11, i64 0, i64 0), i8* %1)
%16 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), i8* %1)
%17 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.13, i64 0, i64 0), i8* %1)
%18 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.14, i64 0, i64 0), i8* %1)
ret void
}