#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(char *);
int /*<<< orphan*/ printf(char *, ...);
void _usage(char *arg, char *message) {
  char *command = basename(arg);
  printf("Usage: %s [OPTIONS]\n\n", command);
  printf("OPTIONS:\n");
  printf("  --file    [ -f ] <filename>          input file name.\n");
  printf("  --label   [ -l ] <name1[,name2 ...]> label names.\n");
  printf("  --buffer  [ -b ] <size>              read line buffer size.\n");
  printf("  --color   [ -c ]                     output ansi color.\n");
  printf("  --verbose [ -v ]                     output null value.\n");
  if (message) {
    printf("\nINFO: %s\n", message);
  }
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <basename@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x10(%rbp)
je     11c0 <_usage+0xa0>
mov    -0x10(%rbp),%rsi
lea    0xf8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_usage>:
push   %rbx
mov    %rsi,%rbx
call   1050 <basename@plt>
lea    0xec0(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
lea    0xf21(%rip),%rdi
call   1030 <puts@plt>
lea    0xf53(%rip),%rdi
call   1030 <puts@plt>
lea    0xf81(%rip),%rdi
call   1030 <puts@plt>
test   %rbx,%rbx
je     11a9 <_usage+0x79>
lea    0xe78(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Usage: %s [OPTIONS]\0A\0A\00"
@.str.1 = [10 x i8] c"OPTIONS:\0A\00"
@.str.2 = [57 x i8] c" --file [ -f ] <filename> input file name.\0A\00"
@.str.3 = [53 x i8] c" --label [ -l ] <name1[,name2 ...]> label names.\0A\00"
@.str.4 = [63 x i8] c" --buffer [ -b ] <size> read line buffer size.\0A\00"
@.str.5 = [59 x i8] c" --color [ -c ] output ansi color.\0A\00"
@.str.6 = [59 x i8] c" --verbose [ -v ] output null value.\0A\00"
@.str.7 = [11 x i8] c"\0AINFO: %s\0A\00"
define void @_usage(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i8* @basename(i8* %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.4, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.5, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.6, i64 0, i64 0))
%16 = load i8*, i8** %4
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %21
18: ; preds = %2
%19 = load i8*, i8** %4
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* %19)
br label %21
21: ; preds = %18, %2
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Usage: %s [OPTIONS]\0A\0A\00"
@.str.7 = [11 x i8] c"\0AINFO: %s\0A\00"
@str = [9 x i8] c"OPTIONS:\00"
@str.8 = [56 x i8] c" --file [ -f ] <filename> input file name.\00"
@str.9 = [52 x i8] c" --label [ -l ] <name1[,name2 ...]> label names.\00"
@str.10 = [62 x i8] c" --buffer [ -b ] <size> read line buffer size.\00"
@str.11 = [58 x i8] c" --color [ -c ] output ansi color.\00"
@str.12 = [58 x i8] c" --verbose [ -v ] output null value.\00"
define void @_usage(i8* %0, i8* %1) {
%3 = tail call i8* @basename(i8* %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.8, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.9, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.10, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.11, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.12, i64 0, i64 0))
%11 = icmp eq i8* %1, null
br i1 %11, label %14, label %12
12: ; preds = %2
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* %1)
br label %14
14: ; preds = %12, %2
ret void
}