#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(int);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *name) {
  printf("%s [-d /dev/ttyS0] [-b 9600] -[v|p] file.hex\n"
         "-d /dev/ttynn   Device (use e.g. /dev/serial/by-id/usb-FTDI* for "
         "FT232)\n"
         "-b nn           Baudrate\n"
         "-t nn           TxD Blocksize (i.e. number of bytes written in one "
         "block)\n"
         "-w nn           do not use tcdrain, wait nn times byte transmission "
         "time instead\n"
         "-r              switch reset off, DTR will not be changed\n"
         "-R (default)    toggle DTR to reset device: DTR will toggle\n"
         "                during sending of password until connection is "
         "established\n"
         "-v              Verify\n"
         "-p              Program\n"
         "-e              Erase, use together with -p to erase controller,\n"
         "                with -v to check if it is erased\n"
         "-P pwd          Password\n"
         "-T              enter terminal mode\n"
         "Author: Bernhard Michler (based on code from Andreas Butti)\n",
         name);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [773 x i8] c"%s [-d /dev/ttyS0] [-b 9600] -[v|p] file.hex\0A-d /dev/ttynn Device (use e.g. /dev/serial/by-id/usb-FTDI* for FT232)\0A-b nn Baudrate\0A-t nn TxD Blocksize (i.e. number of bytes written in one block)\0A-w nn do not use tcdrain, wait nn times byte transmission time instead\0A-r switch reset off, DTR will not be changed\0A-R (default) toggle DTR to reset device: DTR will toggle\0A during sending of password until connection is established\0A-v Verify\0A-p Program\0A-e Erase, use together with -p to erase controller,\0A with -v to check if it is erased\0A-P pwd Password\0A-T enter terminal mode\0AAuthor: Bernhard Michler (based on code from Andreas Butti)\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([773 x i8], [773 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [773 x i8] c"%s [-d /dev/ttyS0] [-b 9600] -[v|p] file.hex\0A-d /dev/ttynn Device (use e.g. /dev/serial/by-id/usb-FTDI* for FT232)\0A-b nn Baudrate\0A-t nn TxD Blocksize (i.e. number of bytes written in one block)\0A-w nn do not use tcdrain, wait nn times byte transmission time instead\0A-r switch reset off, DTR will not be changed\0A-R (default) toggle DTR to reset device: DTR will toggle\0A during sending of password until connection is established\0A-v Verify\0A-p Program\0A-e Erase, use together with -p to erase controller,\0A with -v to check if it is erased\0A-P pwd Password\0A-T enter terminal mode\0AAuthor: Bernhard Michler (based on code from Andreas Butti)\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([773 x i8], [773 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}