#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*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ *stderr;
void usage(const char *program_invocation_name, FILE *out) {
  fputs("\n", out);
  fputs("Usage:\n", out);
  fprintf(out, "  %s [options] <program> [arguments ...]\n",
          program_invocation_name);
  fputs("\n", out);
  fputs("Options:\n", out);
  fputs("  -w, --wait     wait program to exit, and use the same return\n",
        out);
  fputs("  -c, --ctty     ignored, added for compatibility\n", out);
  fputs("  -h, --help     display this help and exit\n", out);
  fputs("  -V, --version  print version information and exit\n", out);
  fputs("\n", out);
  fputs("For more details see setsid(1).\n", out);
  exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xfe5(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x10(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe99(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rsi
lea    0xfb1(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x10(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x10(%rbp),%rsi
lea    0xe9d(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x10(%rbp),%rsi
lea    0xecd(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x10(%rbp),%rsi
lea    0xef0(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x10(%rbp),%rsi
lea    0xf0d(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x10(%rbp),%rsi
lea    0xf51(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x10(%rbp),%rsi
lea    0xf22(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x10(%rbp),%rax
mov    0x2de1(%rip),%rcx
cmp    (%rcx),%rax
jne    1219 <usage+0xe9>
mov    0x2dc9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1225 <usage+0xf5>
mov    0x2db0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    $0xa,%edi
call   1030 <fputc@plt>
lea    0xea5(%rip),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe94(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1040 <fprintf@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
lea    0xe9f(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe90(%rip),%rdi
mov    $0x3f,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xeb7(%rip),%rdi
mov    $0x32,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xed1(%rip),%rdi
mov    $0x2c,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xee5(%rip),%rdi
mov    $0x34,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
lea    0xef4(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    0x2daa(%rip),%rax
cmp    %rbx,(%rax)
jne    1249 <usage+0x109>
mov    0x2d96(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    0x2d80(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [8 x i8] c"Usage:\0A\00"
@.str.2 = [42 x i8] c" %s [options] <program> [arguments ...]\0A\00"
@.str.3 = [10 x i8] c"Options:\0A\00"
@.str.4 = [64 x i8] c" -w, --wait wait program to exit, and use the same return\0A\00"
@.str.5 = [51 x i8] c" -c, --ctty ignored, added for compatibility\0A\00"
@.str.6 = [45 x i8] c" -h, --help display this help and exit\0A\00"
@.str.7 = [53 x i8] c" -V, --version print version information and exit\0A\00"
@.str.8 = [33 x i8] c"For more details see setsid(1).\0A\00"
@stderr = global i32* null
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
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 i32*, i32** %4
%6 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* %5)
%7 = load i32*, i32** %4
%8 = call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%9 = load i32*, i32** %4
%10 = load i8*, i8** %3
%11 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i8* %10)
%12 = load i32*, i32** %4
%13 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* %12)
%14 = load i32*, i32** %4
%15 = call i32 @fputs(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32* %14)
%16 = load i32*, i32** %4
%17 = call i32 @fputs(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.4, i64 0, i64 0), i32* %16)
%18 = load i32*, i32** %4
%19 = call i32 @fputs(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0), i32* %18)
%20 = load i32*, i32** %4
%21 = call i32 @fputs(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0), i32* %20)
%22 = load i32*, i32** %4
%23 = call i32 @fputs(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.7, i64 0, i64 0), i32* %22)
%24 = load i32*, i32** %4
%25 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* %24)
%26 = load i32*, i32** %4
%27 = call i32 @fputs(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0), i32* %26)
%28 = load i32*, i32** %4
%29 = load i32*, i32** @stderr
%30 = icmp eq i32* %28, %29
br i1 %30, label %31, label %33
31: ; preds = %2
%32 = load i32, i32* @EXIT_FAILURE
br label %35
33: ; preds = %2
%34 = load i32, i32* @EXIT_SUCCESS
br label %35
35: ; preds = %33, %31
%36 = phi i32 [ %32, %31 ], [ %34, %33 ]
%37 = call i32 @exit(i32 %36)
unreachable
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"Usage:\0A\00"
@.str.2 = [42 x i8] c" %s [options] <program> [arguments ...]\0A\00"
@.str.3 = [10 x i8] c"Options:\0A\00"
@.str.4 = [64 x i8] c" -w, --wait wait program to exit, and use the same return\0A\00"
@.str.5 = [51 x i8] c" -c, --ctty ignored, added for compatibility\0A\00"
@.str.6 = [45 x i8] c" -h, --help display this help and exit\0A\00"
@.str.7 = [53 x i8] c" -V, --version print version information and exit\0A\00"
@.str.8 = [33 x i8] c"For more details see setsid(1).\0A\00"
@stderr = global i32* null
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define void @usage(i8* %0, i32* nocapture %1) {
%3 = tail call i32 @fputc(i32 10, i32* %1)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i64 7, i64 1, i32* %1)
%5 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%6 = tail call i32 @fputc(i32 10, i32* %1)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i64 9, i64 1, i32* %1)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.4, i64 0, i64 0), i64 63, i64 1, i32* %1)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0), i64 50, i64 1, i32* %1)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0), i64 44, i64 1, i32* %1)
%11 = tail call i64 @fwrite(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.7, i64 0, i64 0), i64 52, i64 1, i32* %1)
%12 = tail call i32 @fputc(i32 10, i32* %1)
%13 = tail call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0), i64 32, i64 1, i32* %1)
%14 = load i32*, i32** @stderr
%15 = icmp eq i32* %14, %1
%16 = load i32, i32* @EXIT_FAILURE
%17 = load i32, i32* @EXIT_SUCCESS
%18 = select i1 %15, i32 %16, i32 %17
%19 = tail call i32 @exit(i32 %18)
unreachable
}