#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*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void print_usage(FILE *stream, const char *program_name) {
  fprintf(stream, "Usage: %s [OPTION]...\n", program_name);
  fprintf(stream, "\n");
  fprintf(stream,
          "  -t, --tty=/dev/*           tty the arduino is connected to.\n");
  fprintf(stream, "  -b, --baudrate=N           baudrate of tty.\n");
  fprintf(stream, "  -n, --num_bytes=N          the number of bytes to read "
                  "from the tty.\n");
  fprintf(stream, "  -f, --format               output format (a = ascii, d = "
                  "dec, h = hex).\n");
  fprintf(stream, "  -h, --help                 print this screen.\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfc5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeb4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xee1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xefe(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf34(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf6d(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e27(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %rsi,%rdx
mov    %rdi,%rbx
lea    0xeb2(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
lea    0xeae(%rip),%rdi
mov    $0x3e,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xed4(%rip),%rdi
mov    $0x2e,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xeea(%rip),%rdi
mov    $0x47,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xf19(%rip),%rdi
mov    $0x4a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xf4b(%rip),%rdi
mov    $0x30,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    0x2dfa(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Usage: %s [OPTION]...\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [63 x i8] c" -t, --tty=/dev/* tty the arduino is connected to.\0A\00"
@.str.3 = [47 x i8] c" -b, --baudrate=N baudrate of tty.\0A\00"
@.str.4 = [72 x i8] c" -n, --num_bytes=N the number of bytes to read from the tty.\0A\00"
@.str.5 = [75 x i8] c" -f, --format output format (a = ascii, d = dec, h = hex).\0A\00"
@.str.6 = [49 x i8] c" -h, --help print this screen.\0A\00"
@EXIT_FAILURE = global i32 0
define void @print_usage(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32*, i32** %3
%9 = call i32 (i32*, i8*, ...) @fprintf(i32* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32*, i32** %3
%11 = call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32*, i32** %3
%13 = call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
%14 = load i32*, i32** %3
%15 = call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.4, i64 0, i64 0))
%16 = load i32*, i32** %3
%17 = call i32 (i32*, i8*, ...) @fprintf(i32* %16, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.5, i64 0, i64 0))
%18 = load i32*, i32** %3
%19 = call i32 (i32*, i8*, ...) @fprintf(i32* %18, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0))
%20 = load i32, i32* @EXIT_FAILURE
%21 = call i32 @exit(i32 %20)
unreachable
}

LLVM IR (-O2):
@.str = [23 x i8] c"Usage: %s [OPTION]...\0A\00"
@.str.2 = [63 x i8] c" -t, --tty=/dev/* tty the arduino is connected to.\0A\00"
@.str.3 = [47 x i8] c" -b, --baudrate=N baudrate of tty.\0A\00"
@.str.4 = [72 x i8] c" -n, --num_bytes=N the number of bytes to read from the tty.\0A\00"
@.str.5 = [75 x i8] c" -f, --format output format (a = ascii, d = dec, h = hex).\0A\00"
@.str.6 = [49 x i8] c" -h, --help print this screen.\0A\00"
@EXIT_FAILURE = global i32 0
define void @print_usage(i32* nocapture %0, i8* %1) {
%3 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @fputc(i32 10, i32* %0)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), i64 62, i64 1, i32* %0)
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), i64 46, i64 1, i32* %0)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.4, i64 0, i64 0), i64 71, i64 1, i32* %0)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.5, i64 0, i64 0), i64 74, i64 1, i32* %0)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0), i64 48, i64 1, i32* %0)
%10 = load i32, i32* @EXIT_FAILURE
%11 = tail call i32 @exit(i32 %10)
unreachable
}