#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 *, char *);
void print_usage(char *progname) {
  printf("Usage:\n"
         "%s [-h]\n"
         "\t-h  This help message\n"
         "\t-v  Read out the version code of the FPGA\n"
         "\t-da <value> set DAC A to value (0-1024 decimal)\n"
         "\t-db <value> set DAC B to value (0-1024 decimal)\n"
         "\t-a  <chan> set and read channel <chan> from ADC\n"
         "\t-hv set VDD-IO to high (5V) voltage\n"
         "\t-lv set VDD-IO to low (nom 3.3V unless you trimmed it) voltage\n"
         "\t* GPBB has two 8-bit output-only ports (A,B), and one 8-bit input "
         "port\n"
         "\t-oea <value> drive I/O bank A (value = 1 means drive, 0 means "
         "tristate)\n"
         "\t-oeb <value> drive I/O bank B (value = 1 means drive, 0 means "
         "tristate)\n"
         "\t-p <port> return last written <port> value in hex, port is [a,b] "
         "(note these ports are output-only)\n"
         "\t-p <port> <hex value> set <port> to <hex value>\n"
         "\t-p_set <port> <bit>  set <port> <bit>\n"
         "\t-p_clr <port> <bit>  clear <port> <bit>\n"
         "\t-rp return the value of the 8-bit input port\n"
         "\t* CS1 isn't useful in the design, but loopback code provided as a "
         "template\n"
         "\t-testcs1 Check that burst-access area (CS1) works\n"
         "",
         progname);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [951 x i8] c"Usage:\0A%s [-h]\0A\09-h This help message\0A\09-v Read out the version code of the FPGA\0A\09-da <value> set DAC A to value (0-1024 decimal)\0A\09-db <value> set DAC B to value (0-1024 decimal)\0A\09-a <chan> set and read channel <chan> from ADC\0A\09-hv set VDD-IO to high (5V) voltage\0A\09-lv set VDD-IO to low (nom 3.3V unless you trimmed it) voltage\0A\09* GPBB has two 8-bit output-only ports (A,B), and one 8-bit input port\0A\09-oea <value> drive I/O bank A (value = 1 means drive, 0 means tristate)\0A\09-oeb <value> drive I/O bank B (value = 1 means drive, 0 means tristate)\0A\09-p <port> return last written <port> value in hex, port is [a,b] (note these ports are output-only)\0A\09-p <port> <hex value> set <port> to <hex value>\0A\09-p_set <port> <bit> set <port> <bit>\0A\09-p_clr <port> <bit> clear <port> <bit>\0A\09-rp return the value of the 8-bit input port\0A\09* CS1 isn't useful in the design, but loopback code provided as a template\0A\09-testcs1 Check that burst-access area (CS1) works\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([951 x i8], [951 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [951 x i8] c"Usage:\0A%s [-h]\0A\09-h This help message\0A\09-v Read out the version code of the FPGA\0A\09-da <value> set DAC A to value (0-1024 decimal)\0A\09-db <value> set DAC B to value (0-1024 decimal)\0A\09-a <chan> set and read channel <chan> from ADC\0A\09-hv set VDD-IO to high (5V) voltage\0A\09-lv set VDD-IO to low (nom 3.3V unless you trimmed it) voltage\0A\09* GPBB has two 8-bit output-only ports (A,B), and one 8-bit input port\0A\09-oea <value> drive I/O bank A (value = 1 means drive, 0 means tristate)\0A\09-oeb <value> drive I/O bank B (value = 1 means drive, 0 means tristate)\0A\09-p <port> return last written <port> value in hex, port is [a,b] (note these ports are output-only)\0A\09-p <port> <hex value> set <port> to <hex value>\0A\09-p_set <port> <bit> set <port> <bit>\0A\09-p_clr <port> <bit> clear <port> <bit>\0A\09-rp return the value of the 8-bit input port\0A\09* CS1 isn't useful in the design, but loopback code provided as a template\0A\09-testcs1 Check that burst-access area (CS1) works\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([951 x i8], [951 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}