#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(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void usage(FILE *fp, int rc) {
  fprintf(fp, "Usage: iwrap_boot [-?vbhu] serial-device\n");
  fprintf(fp, "        -b             Serial BCSP HCI\n");
  fprintf(fp, "        -h             Serial H4 HCI\n");
  fprintf(fp, "        -u             USB HCI\n");
  fprintf(fp, "        -h?            this help\n");
  fprintf(fp, "        -v             print version info\n");
  exit(rc);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xee0(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xef8(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf0e(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf1e(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf30(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xed1(%rip),%rdi
mov    $0x29,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xee2(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xef1(%rip),%rdi
mov    $0x25,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xefe(%rip),%rdi
mov    $0x1f,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf05(%rip),%rdi
mov    $0x21,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf0e(%rip),%rdi
mov    $0x2a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    %ebp,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Usage: iwrap_boot [-?vbhu] serial-device\0A\00"
@.str.1 = [40 x i8] c" -b Serial BCSP HCI\0A\00"
@.str.2 = [38 x i8] c" -h Serial H4 HCI\0A\00"
@.str.3 = [32 x i8] c" -u USB HCI\0A\00"
@.str.4 = [34 x i8] c" -h? this help\0A\00"
@.str.5 = [43 x i8] c" -v print version info\0A\00"
define void @usage(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%7 = load i32*, i32** %3
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32*, i32** %3
%10 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32*, i32** %3
%12 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%13 = load i32*, i32** %3
%14 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%15 = load i32*, i32** %3
%16 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%17 = load i32, i32* %4
%18 = call i32 @exit(i32 %17)
unreachable
}

LLVM IR (-O2):
@.str = [42 x i8] c"Usage: iwrap_boot [-?vbhu] serial-device\0A\00"
@.str.1 = [40 x i8] c" -b Serial BCSP HCI\0A\00"
@.str.2 = [38 x i8] c" -h Serial H4 HCI\0A\00"
@.str.3 = [32 x i8] c" -u USB HCI\0A\00"
@.str.4 = [34 x i8] c" -h? this help\0A\00"
@.str.5 = [43 x i8] c" -v print version info\0A\00"
define void @usage(i32* nocapture %0, i32 %1) {
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i64 41, i64 1, i32* %0)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i64 39, i64 1, i32* %0)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i64 37, i64 1, i32* %0)
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i64 31, i64 1, i32* %0)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i64 33, i64 1, i32* %0)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0), i64 42, i64 1, i32* %0)
%9 = tail call i32 @exit(i32 %1)
unreachable
}