#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_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ stdout;
void __attribute__((noreturn)) usage(void) {
  fprintf(stdout, "Usage: ./usage -[rwi] [PIN]                   \n");
  fprintf(stdout, "       -r -> read PIN                         \n");
  fprintf(stdout, "       -w -> toogle PIN                       \n");
  fprintf(stdout, "       -[rw] - [PIN] -> use PIN for write    \n");
  putchar('\n');
  fprintf(stdout, "Examples:                                     \n");
  fprintf(stdout, "       ./usage -r (read from default pin)     \n");
  fprintf(stdout, "       ./usage -w (write to default pin)      \n");
  fprintf(stdout, "       ./usage -w -p 123 (write to pin 123)   \n");
  fprintf(stdout, "       ./usage -rp 321 (read from pin 321)    \n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
lea    0xed7(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
lea    0xef2(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e5e(%rip),%rax
mov    (%rax),%edi
lea    0xf0d(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e3f(%rip),%rax
mov    (%rax),%edi
lea    0xf1d(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e2a(%rip),%rax
mov    (%rax),%edi
lea    0xf38(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e15(%rip),%rax
mov    (%rax),%edi
lea    0xf53(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e00(%rip),%rax
mov    (%rax),%edi
lea    0xf6e(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2deb(%rip),%rax
mov    (%rax),%edi
lea    0xf89(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2dde(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ea0(%rip),%rbx
mov    (%rbx),%edi
lea    0xebf(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xee1(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf03(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf25(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rbx),%edi
lea    0xf3c(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf5e(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf80(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfa2(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfc4(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e19(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [48 x i8] c"Usage: ./usage -[rwi] [PIN] \0A\00"
@.str.1 = [48 x i8] c" -r -> read PIN \0A\00"
@.str.2 = [48 x i8] c" -w -> toogle PIN \0A\00"
@.str.3 = [47 x i8] c" -[rw] - [PIN] -> use PIN for write \0A\00"
@.str.4 = [48 x i8] c"Examples: \0A\00"
@.str.5 = [48 x i8] c" ./usage -r (read from default pin) \0A\00"
@.str.6 = [48 x i8] c" ./usage -w (write to default pin) \0A\00"
@.str.7 = [48 x i8] c" ./usage -w -p 123 (write to pin 123) \0A\00"
@.str.8 = [48 x i8] c" ./usage -rp 321 (read from pin 321) \0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @putchar(i8 signext 10)
%10 = load i32, i32* @stdout
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0))
%12 = load i32, i32* @stdout
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0))
%14 = load i32, i32* @stdout
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
%16 = load i32, i32* @stdout
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
%18 = load i32, i32* @stdout
%19 = call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0))
%20 = load i32, i32* @EXIT_FAILURE
%21 = call i32 @exit(i32 %20)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [48 x i8] c"Usage: ./usage -[rwi] [PIN] \0A\00"
@.str.1 = [48 x i8] c" -r -> read PIN \0A\00"
@.str.2 = [48 x i8] c" -w -> toogle PIN \0A\00"
@.str.3 = [47 x i8] c" -[rw] - [PIN] -> use PIN for write \0A\00"
@.str.4 = [48 x i8] c"Examples: \0A\00"
@.str.5 = [48 x i8] c" ./usage -r (read from default pin) \0A\00"
@.str.6 = [48 x i8] c" ./usage -w (write to default pin) \0A\00"
@.str.7 = [48 x i8] c" ./usage -w -p 123 (write to pin 123) \0A\00"
@.str.8 = [48 x i8] c" ./usage -rp 321 (read from pin 321) \0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
%9 = tail call i32 @putchar(i8 signext 10)
%10 = load i32, i32* @stdout
%11 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0))
%12 = load i32, i32* @stdout
%13 = tail call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0))
%14 = load i32, i32* @stdout
%15 = tail call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
%16 = load i32, i32* @stdout
%17 = tail call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
%18 = load i32, i32* @stdout
%19 = tail call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0))
%20 = load i32, i32* @EXIT_FAILURE
%21 = tail call i32 @exit(i32 %20)
unreachable
}