#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 */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void usage(const char *prog, int status) {
  fprintf(status == 0 ? stdout : stderr,
          "Usage: %s [OPTION]... FILE\n"
          "  -d, --device=DEV  use device number DEV\n"
          "  -h, --help        dispaly help\n"
          "  -m, --mode=MODE   use mode MODE\n"
          "  -M, --major=MAJOR use device major MAJOR\n"
          "  -N, --minor=MINOR use device minor MINOR\n",
          prog);
  exit(status);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    114a <usage+0x2a>
mov    0x2e98(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
jmp    1156 <usage+0x36>
mov    0x2e8f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%rdx
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
test   %esi,%esi
jne    1133 <usage+0x13>
mov    0x2ea7(%rip),%rax
jmp    113a <usage+0x1a>
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@stderr = global i32 0
@.str = [223 x i8] c"Usage: %s [OPTION]... FILE\0A -d, --device=DEV use device number DEV\0A -h, --help dispaly help\0A -m, --mode=MODE use mode MODE\0A -M, --major=MAJOR use device major MAJOR\0A -N, --minor=MINOR use device minor MINOR\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 i32, i32* %4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i32, i32* @stdout
br label %11
9: ; preds = %2
%10 = load i32, i32* @stderr
br label %11
11: ; preds = %9, %7
%12 = phi i32 [ %8, %7 ], [ %10, %9 ]
%13 = load i8*, i8** %3
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([223 x i8], [223 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = load i32, i32* %4
%16 = call i32 @exit(i32 %15)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@stderr = global i32 0
@.str = [223 x i8] c"Usage: %s [OPTION]... FILE\0A -d, --device=DEV use device number DEV\0A -h, --help dispaly help\0A -m, --mode=MODE use mode MODE\0A -M, --major=MAJOR use device major MAJOR\0A -N, --minor=MINOR use device minor MINOR\0A\00"
define void @usage(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = load i32, i32* @stdout
%5 = load i32, i32* @stderr
%6 = select i1 %3, i32 %4, i32 %5
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([223 x i8], [223 x i8]* @.str, i64 0, i64 0), i8* %0)
%8 = tail call i32 @exit(i32 %1)
unreachable
}