#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*/ EX_USAGE;
int /*<<< orphan*/ errx(int /*<<< orphan*/, char *, int /*<<< orphan*/, char *,
                        int);
int /*<<< orphan*/ getprogname();
void usage(void) {
  errx(EX_USAGE,
       "Usage: %s [-d cua-device] [-s speed] [-o] [-t] [-h]\n"
       "Only cua[.+] and /dev/cua[.+] are accepted\n"
       "Speed range: 9600 to 1000000 [bps] (default: 115200)\n"
       "Default output device: %s (use -o to output to stdout)\n"
       "The first %d bytes from tty input are discarded when without -o\n"
       "The output will be hashed with SHA512 without -t\n"
       "(when with -t, output is transparent to tty input)\n"
       "Use -h for help",
       getprogname(), "/dev/trng", (512));
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%edx
lea    0xeb9(%rip),%rsi
lea    0x1031(%rip),%rcx
mov    $0x200,%r8d
call   1040 <errx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ec0(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1030 <getprogname@plt>
lea    0xec8(%rip),%rsi
lea    0x1040(%rip),%rcx
mov    %ebx,%edi
mov    %eax,%edx
mov    $0x200,%r8d
pop    %rbx
jmp    1040 <errx@plt>

LLVM IR (-O0):
@EX_USAGE = global i32 0
@.str = [383 x i8] c"Usage: %s [-d cua-device] [-s speed] [-o] [-t] [-h]\0AOnly cua[.+] and /dev/cua[.+] are accepted\0ASpeed range: 9600 to 1000000 [bps] (default: 115200)\0ADefault output device: %s (use -o to output to stdout)\0AThe first %d bytes from tty input are discarded when without -o\0AThe output will be hashed with SHA512 without -t\0A(when with -t, output is transparent to tty input)\0AUse -h for help\00"
@.str.1 = [10 x i8] c"/dev/trng\00"
define void @usage() {
%1 = load i32, i32* @EX_USAGE
%2 = call i32 (...) @getprogname()
%3 = call i32 @errx(i32 %1, i8* getelementptr inbounds ([383 x i8], [383 x i8]* @.str, i64 0, i64 0), i32 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 512)
ret void
}

LLVM IR (-O2):
@EX_USAGE = global i32 0
@.str = [383 x i8] c"Usage: %s [-d cua-device] [-s speed] [-o] [-t] [-h]\0AOnly cua[.+] and /dev/cua[.+] are accepted\0ASpeed range: 9600 to 1000000 [bps] (default: 115200)\0ADefault output device: %s (use -o to output to stdout)\0AThe first %d bytes from tty input are discarded when without -o\0AThe output will be hashed with SHA512 without -t\0A(when with -t, output is transparent to tty input)\0AUse -h for help\00"
@.str.1 = [10 x i8] c"/dev/trng\00"
define void @usage() {
%1 = load i32, i32* @EX_USAGE
%2 = tail call i32 (...) @getprogname()
%3 = tail call i32 @errx(i32 %1, i8* getelementptr inbounds ([383 x i8], [383 x i8]* @.str, i64 0, i64 0), i32 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 512)
ret void
}