#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 /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ puts(char *);
void usage(const char *arg) {
  if (arg)
    printf("testdest: Unknown option \"%s\".\n", arg);
  puts("Usage:");
  puts("  ./testdest [--device] name [operation ...]");
  puts("  ./testdest [--device] ipp://... [operation ...]");
  puts("  ./testdest [--device] ipps://... [operation ...]");
  puts("  ./testdest --get");
  puts("  ./testdest --enum [grayscale] [color] [duplex] [staple] [small]\n"
       "                    [medium] [large]");
  puts("");
  puts("Operations:");
  puts("  conflicts options");
  puts("  default option");
  puts("  localize option [value]");
  puts("  media [borderless] [duplex] [exact] [ready] [name or size]");
  puts("  print filename [options]");
  puts("  supported [option [value]]");
  exit(arg != NULL);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1157 <usage+0x27>
mov    -0x8(%rbp),%rsi
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf32(%rip),%rdi
call   1030 <puts@plt>
lea    0xe79(%rip),%rdi
call   1030 <puts@plt>
lea    0xf81(%rip),%rdi
call   1030 <puts@plt>
lea    0xf81(%rip),%rdi
call   1030 <puts@plt>
lea    0xf89(%rip),%rdi
call   1030 <puts@plt>
lea    0xf8e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9c(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcd(%rip),%rdi
call   1030 <puts@plt>
lea    0xfdc(%rip),%rdi
call   1030 <puts@plt>
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
test   %rdi,%rdi
je     115a <usage+0x1a>
lea    0xeae(%rip),%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
xor    %ebp,%ebp
test   %rbx,%rbx
setne  %bpl
lea    0xeb6(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb1(%rip),%rdi
call   1040 <puts@plt>
lea    0xed2(%rip),%rdi
call   1040 <puts@plt>
lea    0xef8(%rip),%rdi
call   1040 <puts@plt>
lea    0xf1f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf26(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf77(%rip),%rdi
call   1040 <puts@plt>
lea    0xf77(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf84(%rip),%rdi
call   1040 <puts@plt>
lea    0xf92(%rip),%rdi
call   1040 <puts@plt>
lea    0xfc3(%rip),%rdi
call   1040 <puts@plt>
lea    0xfd2(%rip),%rdi
call   1040 <puts@plt>
mov    %ebp,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"testdest: Unknown option \22%s\22.\0A\00"
@.str.1 = [7 x i8] c"Usage:\00"
@.str.2 = [45 x i8] c" ./testdest [--device] name [operation ...]\00"
@.str.3 = [50 x i8] c" ./testdest [--device] ipp://... [operation ...]\00"
@.str.4 = [51 x i8] c" ./testdest [--device] ipps://... [operation ...]\00"
@.str.5 = [19 x i8] c" ./testdest --get\00"
@.str.6 = [103 x i8] c" ./testdest --enum [grayscale] [color] [duplex] [staple] [small]\0A [medium] [large]\00"
@.str.7 = [1 x i8] zeroinitializer
@.str.8 = [12 x i8] c"Operations:\00"
@.str.9 = [20 x i8] c" conflicts options\00"
@.str.10 = [17 x i8] c" default option\00"
@.str.11 = [26 x i8] c" localize option [value]\00"
@.str.12 = [61 x i8] c" media [borderless] [duplex] [exact] [ready] [name or size]\00"
@.str.13 = [27 x i8] c" print filename [options]\00"
@.str.14 = [29 x i8] c" supported [option [value]]\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %5, %1
%9 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @puts(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @puts(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @puts(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 @puts(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.6, i64 0, i64 0))
%15 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
%17 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%18 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
%19 = call i32 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0))
%20 = call i32 @puts(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.12, i64 0, i64 0))
%21 = call i32 @puts(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.13, i64 0, i64 0))
%22 = call i32 @puts(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0))
%23 = load i8*, i8** %2
%24 = icmp ne i8* %23, null
%25 = zext i1 %24 to i32
%26 = call i32 @exit(i32 %25)
unreachable
}

LLVM IR (-O2):
@.str = [32 x i8] c"testdest: Unknown option \22%s\22.\0A\00"
@.str.1 = [7 x i8] c"Usage:\00"
@.str.2 = [45 x i8] c" ./testdest [--device] name [operation ...]\00"
@.str.3 = [50 x i8] c" ./testdest [--device] ipp://... [operation ...]\00"
@.str.4 = [51 x i8] c" ./testdest [--device] ipps://... [operation ...]\00"
@.str.5 = [19 x i8] c" ./testdest --get\00"
@.str.6 = [103 x i8] c" ./testdest --enum [grayscale] [color] [duplex] [staple] [small]\0A [medium] [large]\00"
@.str.8 = [12 x i8] c"Operations:\00"
@.str.9 = [20 x i8] c" conflicts options\00"
@.str.10 = [17 x i8] c" default option\00"
@.str.11 = [26 x i8] c" localize option [value]\00"
@.str.12 = [61 x i8] c" media [borderless] [duplex] [exact] [ready] [name or size]\00"
@.str.13 = [27 x i8] c" print filename [options]\00"
@.str.14 = [29 x i8] c" supported [option [value]]\00"
define void @usage(i8* %0) {
%2 = icmp ne i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.3, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([103 x i8], [103 x i8]* @.str.6, i64 0, i64 0))
%12 = tail call i32 @putchar(i32 10)
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str.12, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.13, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0))
%20 = zext i1 %2 to i32
%21 = tail call i32 @exit(i32 %20)
unreachable
}