#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 usage(char *prg_name) {
  printf("\nUsage: %s [-d device]\n", prg_name);
  printf("General options:\n");
  printf("	-V/--version	Get programmer version\n");
  printf("	-1/--d100		Use D100 board (default D200)\n");
  printf("Operating modes:\n");
  printf("	-b/--bios to get programmer BIOS version\n");
  printf("	-P/--program [ihex file]	Do a complete programming "
         "sequence (write and verify)\n");
  printf("	-v/--verify [ihex file]		Verify against ihex file\n");
  printf(
      "	-r/--read [ihex file]		Read program code into ihex file\n");
  printf("	-m/--mac	Read device MAC address\n");
  printf("	-Q/--write-mac [MAC address]	Write device MAC address\n");
  printf(
      "	-e/--erase			Erase flash (erases MAC address!)\n");
  printf("Programming options:\n");
  printf("	-l/--linear Force linear model for extended addresses (not "
         "SDCC file)\n");
  printf(
      "	-s/--sdcc   Force SDCC model for extended addresses (SDCC file)\n");
  printf("Defaults:\n");
  printf("device /dev/ttyUSB0\n");
}


x86 assembly (clang, -O0):
<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    0xee3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfa6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1011(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1034(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x103c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1076(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10aa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10a7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
lea    0xee4(%rip),%rdi
call   1030 <puts@plt>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf20(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf82(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa9(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd6(%rip),%rdi
call   1030 <puts@plt>
lea    0xfec(%rip),%rdi
call   1030 <puts@plt>
lea    0x1017(%rip),%rdi
call   1030 <puts@plt>
lea    0x103b(%rip),%rdi
call   1030 <puts@plt>
lea    0x1044(%rip),%rdi
call   1030 <puts@plt>
lea    0x107f(%rip),%rdi
call   1030 <puts@plt>
lea    0x10b4(%rip),%rdi
call   1030 <puts@plt>
lea    0x10b2(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"\0AUsage: %s [-d device]\0A\00"
@.str.1 = [18 x i8] c"General options:\0A\00"
@.str.2 = [38 x i8] c"\09-V/--version\09Get programmer version\0A\00"
@.str.3 = [43 x i8] c"\09-1/--d100\09\09Use D100 board (default D200)\0A\00"
@.str.4 = [18 x i8] c"Operating modes:\0A\00"
@.str.5 = [43 x i8] c"\09-b/--bios to get programmer BIOS version\0A\00"
@.str.6 = [81 x i8] c"\09-P/--program [ihex file]\09Do a complete programming sequence (write and verify)\0A\00"
@.str.7 = [52 x i8] c"\09-v/--verify [ihex file]\09\09Verify against ihex file\0A\00"
@.str.8 = [58 x i8] c"\09-r/--read [ihex file]\09\09Read program code into ihex file\0A\00"
@.str.9 = [35 x i8] c"\09-m/--mac\09Read device MAC address\0A\00"
@.str.10 = [56 x i8] c"\09-Q/--write-mac [MAC address]\09Write device MAC address\0A\00"
@.str.11 = [49 x i8] c"\09-e/--erase\09\09\09Erase flash (erases MAC address!)\0A\00"
@.str.12 = [22 x i8] c"Programming options:\0A\00"
@.str.13 = [72 x i8] c"\09-l/--linear Force linear model for extended addresses (not SDCC file)\0A\00"
@.str.14 = [66 x i8] c"\09-s/--sdcc Force SDCC model for extended addresses (SDCC file)\0A\00"
@.str.15 = [11 x i8] c"Defaults:\0A\00"
@.str.16 = [21 x i8] c"device /dev/ttyUSB0\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.13, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.14, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"\0AUsage: %s [-d device]\0A\00"
@str = [17 x i8] c"General options:\00"
@str.17 = [37 x i8] c"\09-V/--version\09Get programmer version\00"
@str.18 = [42 x i8] c"\09-1/--d100\09\09Use D100 board (default D200)\00"
@str.19 = [17 x i8] c"Operating modes:\00"
@str.20 = [42 x i8] c"\09-b/--bios to get programmer BIOS version\00"
@str.21 = [80 x i8] c"\09-P/--program [ihex file]\09Do a complete programming sequence (write and verify)\00"
@str.22 = [51 x i8] c"\09-v/--verify [ihex file]\09\09Verify against ihex file\00"
@str.23 = [57 x i8] c"\09-r/--read [ihex file]\09\09Read program code into ihex file\00"
@str.24 = [34 x i8] c"\09-m/--mac\09Read device MAC address\00"
@str.25 = [55 x i8] c"\09-Q/--write-mac [MAC address]\09Write device MAC address\00"
@str.26 = [48 x i8] c"\09-e/--erase\09\09\09Erase flash (erases MAC address!)\00"
@str.27 = [21 x i8] c"Programming options:\00"
@str.28 = [71 x i8] c"\09-l/--linear Force linear model for extended addresses (not SDCC file)\00"
@str.29 = [65 x i8] c"\09-s/--sdcc Force SDCC model for extended addresses (SDCC file)\00"
@str.30 = [10 x i8] c"Defaults:\00"
@str.31 = [20 x i8] c"device /dev/ttyUSB0\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.17, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.18, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.19, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.20, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.21, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.22, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.23, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.24, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.25, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.26, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.27, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.28, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.29, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.30, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.31, i64 0, i64 0))
ret void
}