#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*/ printf(char *, ...);
void cmd_show_usage(const char *name) {
  printf("Usage: %s [options]\n", name);
  printf("Options:\n");
  printf("  -d, --device <bus>-<port>\n");
  printf("        Choose which USB device to use\n");
  printf("  -r, --read-flash <filename>\n");
  printf("        Reads flash memory and write to filename\n");
  printf("  -w, --write-flash <filename>\n");
  printf("        Writes flash memory from filename\n");
  printf("  -c, --erase-flash\n");
  printf("        Erases flash memory\n");
  printf("  -x,  --lock\n");
  printf("        Enable flash readback protection\n");
  printf("  --fsr[=new_value]\n");
  printf("        Reads or writes FSR status register (hex value)\n");
  printf("  --read-ip <filename>\n");
  printf("        Reads InfoPage contents and write to filaname\n");
  printf("  --write-ip <filename>\n");
  printf("        Writes InfoPage contents from filename\n");
  printf("  --erase-all\n");
  printf("        Erases flash memory and InforPage!!!\n");
  printf("  --erase-code\n");
  printf("        Erases only code part of the flash memory\n");
  printf("  --erase-data\n");
  printf("        Erases only data part of the flash memory\n");
}


x86 assembly (clang, -O0):
<cmd_show_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf3a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfa3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfce(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1001(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x100c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x102e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x102f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x104f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1051(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1076(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1078(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_show_usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
lea    0xf16(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf6c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf74(%rip),%rdi
call   1030 <puts@plt>
lea    0xf84(%rip),%rdi
call   1030 <puts@plt>
lea    0xf86(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa3(%rip),%rdi
call   1030 <puts@plt>
lea    0xfab(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd7(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe2(%rip),%rdi
call   1030 <puts@plt>
lea    0x100c(%rip),%rdi
call   1030 <puts@plt>
lea    0x1018(%rip),%rdi
call   1030 <puts@plt>
lea    0x103b(%rip),%rdi
call   1030 <puts@plt>
lea    0x103d(%rip),%rdi
call   1030 <puts@plt>
lea    0x105e(%rip),%rdi
call   1030 <puts@plt>
lea    0x1061(%rip),%rdi
call   1030 <puts@plt>
lea    0x1087(%rip),%rdi
call   1030 <puts@plt>
lea    0x108a(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@.str.1 = [10 x i8] c"Options:\0A\00"
@.str.2 = [29 x i8] c" -d, --device <bus>-<port>\0A\00"
@.str.3 = [40 x i8] c" Choose which USB device to use\0A\00"
@.str.4 = [31 x i8] c" -r, --read-flash <filename>\0A\00"
@.str.5 = [50 x i8] c" Reads flash memory and write to filename\0A\00"
@.str.6 = [32 x i8] c" -w, --write-flash <filename>\0A\00"
@.str.7 = [43 x i8] c" Writes flash memory from filename\0A\00"
@.str.8 = [21 x i8] c" -c, --erase-flash\0A\00"
@.str.9 = [29 x i8] c" Erases flash memory\0A\00"
@.str.10 = [15 x i8] c" -x, --lock\0A\00"
@.str.11 = [42 x i8] c" Enable flash readback protection\0A\00"
@.str.12 = [21 x i8] c" --fsr[=new_value]\0A\00"
@.str.13 = [57 x i8] c" Reads or writes FSR status register (hex value)\0A\00"
@.str.14 = [24 x i8] c" --read-ip <filename>\0A\00"
@.str.15 = [55 x i8] c" Reads InfoPage contents and write to filaname\0A\00"
@.str.16 = [25 x i8] c" --write-ip <filename>\0A\00"
@.str.17 = [48 x i8] c" Writes InfoPage contents from filename\0A\00"
@.str.18 = [15 x i8] c" --erase-all\0A\00"
@.str.19 = [46 x i8] c" Erases flash memory and InforPage!!!\0A\00"
@.str.20 = [16 x i8] c" --erase-code\0A\00"
@.str.21 = [51 x i8] c" Erases only code part of the flash memory\0A\00"
@.str.22 = [16 x i8] c" --erase-data\0A\00"
@.str.23 = [51 x i8] c" Erases only data part of the flash memory\0A\00"
define void @cmd_show_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.13, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.15, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.17, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.18, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.19, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.20, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.21, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.22, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.23, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@str = [9 x i8] c"Options:\00"
@str.24 = [28 x i8] c" -d, --device <bus>-<port>\00"
@str.25 = [39 x i8] c" Choose which USB device to use\00"
@str.26 = [30 x i8] c" -r, --read-flash <filename>\00"
@str.27 = [49 x i8] c" Reads flash memory and write to filename\00"
@str.28 = [31 x i8] c" -w, --write-flash <filename>\00"
@str.29 = [42 x i8] c" Writes flash memory from filename\00"
@str.30 = [20 x i8] c" -c, --erase-flash\00"
@str.31 = [28 x i8] c" Erases flash memory\00"
@str.32 = [14 x i8] c" -x, --lock\00"
@str.33 = [41 x i8] c" Enable flash readback protection\00"
@str.34 = [20 x i8] c" --fsr[=new_value]\00"
@str.35 = [56 x i8] c" Reads or writes FSR status register (hex value)\00"
@str.36 = [23 x i8] c" --read-ip <filename>\00"
@str.37 = [54 x i8] c" Reads InfoPage contents and write to filaname\00"
@str.38 = [24 x i8] c" --write-ip <filename>\00"
@str.39 = [47 x i8] c" Writes InfoPage contents from filename\00"
@str.40 = [14 x i8] c" --erase-all\00"
@str.41 = [45 x i8] c" Erases flash memory and InforPage!!!\00"
@str.42 = [15 x i8] c" --erase-code\00"
@str.43 = [50 x i8] c" Erases only code part of the flash memory\00"
@str.44 = [15 x i8] c" --erase-data\00"
@str.45 = [50 x i8] c" Erases only data part of the flash memory\00"
define void @cmd_show_usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.24, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.25, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.26, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.27, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.28, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.29, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.30, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.31, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.32, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.33, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.34, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.35, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.36, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.37, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.38, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.39, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.40, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.41, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.42, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.43, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.44, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.45, i64 0, i64 0))
ret void
}