#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*/ EX_OK;
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void usage(int err) {
  FILE *f = err ? stderr : stdout;
  fputs("usage:\n", f);
  fputs("	play [-lrv] [-f file-list] [path ...]\n", f);
  exit(err ? EX_USAGE : EX_OK);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1148 <usage+0x28>
mov    0x2e9c(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1156 <usage+0x36>
mov    0x2e81(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe97(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x10(%rbp),%rsi
lea    0xe8f(%rip),%rdi
call   1030 <fputs@plt>
cmpl   $0x0,-0x4(%rbp)
je     1199 <usage+0x79>
mov    0x2e59(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
jmp    11a5 <usage+0x85>
mov    0x2e28(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
mov    0x2eaa(%rip),%rax
cmove  0x2e9a(%rip),%rax
mov    (%rax),%r15
lea    0xec0(%rip),%rdi
lea    0xec1(%rip),%r14
mov    0x2e9a(%rip),%rbx
cmove  0x2e72(%rip),%rbx
mov    $0x7,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1040 <fwrite@plt>
mov    $0x27,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %r15,%rcx
call   1040 <fwrite@plt>
mov    (%rbx),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@stderr = global i32* null
@stdout = global i32* null
@.str = [8 x i8] c"usage:\0A\00"
@.str.1 = [40 x i8] c"\09play [-lrv] [-f file-list] [path ...]\0A\00"
@EX_USAGE = global i32 0
@EX_OK = global i32 0
define void @usage(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i32*, i32** @stderr
br label %10
8: ; preds = %1
%9 = load i32*, i32** @stdout
br label %10
10: ; preds = %8, %6
%11 = phi i32* [ %7, %6 ], [ %9, %8 ]
store i32* %11, i32** %3
%12 = load i32*, i32** %3
%13 = call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32* %12)
%14 = load i32*, i32** %3
%15 = call i32 @fputs(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i32* %14)
%16 = load i32, i32* %2
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %10
%19 = load i32, i32* @EX_USAGE
br label %22
20: ; preds = %10
%21 = load i32, i32* @EX_OK
br label %22
22: ; preds = %20, %18
%23 = phi i32 [ %19, %18 ], [ %21, %20 ]
%24 = call i32 @exit(i32 %23)
unreachable
}

LLVM IR (-O2):
@stderr = global i32* null
@stdout = global i32* null
@.str = [8 x i8] c"usage:\0A\00"
@.str.1 = [40 x i8] c"\09play [-lrv] [-f file-list] [path ...]\0A\00"
@EX_USAGE = global i32 0
@EX_OK = global i32 0
define void @usage(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = load i32*, i32** @stderr
%4 = load i32*, i32** @stdout
%5 = select i1 %2, i32* %4, i32* %3
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 7, i64 1, i32* %5)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i64 39, i64 1, i32* %5)
%8 = load i32, i32* @EX_USAGE
%9 = load i32, i32* @EX_OK
%10 = select i1 %2, i32 %9, i32 %8
%11 = tail call i32 @exit(i32 %10)
unreachable
}