#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 *, char const *,
                           char const *, char const *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *program) {
  fprintf(
      stderr,
      "Usage:\n\n"
      "%s [options] check\n"
      "%s [options] erase\n"
      "%s [options] program <filename.jed>\n"
      "%s [options] verify  <filename.jed>\n"
      "\n"
      "  -c, --chip=type[,options] Chip type (\"help\" lists all chips\n"
      "  -t, --tool=type[,options] Programming tool (\"help\" lists all tools "
      "for\n"
      "                            the selected chip type.\n"
      "  -h, -?, --help            This help.\n"
      "\n"
      "  check                     Check that the chip is operational\n"
      "  erase                     Erase the chip\n"
      "  program                   Program the chip with the JEDEC fuse map\n"
      "  verify                    Verify the chip against the JEDEC fuse "
      "map\n",
      program, program, program, program);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    -0x8(%rbp),%r9
lea    0xeb4(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rcx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
mov    %rcx,%rdx
mov    %rcx,%r8
mov    %rcx,%r9
call   1030 <fprintf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [593 x i8] c"Usage:\0A\0A%s [options] check\0A%s [options] erase\0A%s [options] program <filename.jed>\0A%s [options] verify <filename.jed>\0A\0A -c, --chip=type[,options] Chip type (\22help\22 lists all chips\0A -t, --tool=type[,options] Programming tool (\22help\22 lists all tools for\0A the selected chip type.\0A -h, -?, --help This help.\0A\0A check Check that the chip is operational\0A erase Erase the chip\0A program Program the chip with the JEDEC fuse map\0A verify Verify the chip against the JEDEC fuse map\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([593 x i8], [593 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5, i8* %6, i8* %7)
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [593 x i8] c"Usage:\0A\0A%s [options] check\0A%s [options] erase\0A%s [options] program <filename.jed>\0A%s [options] verify <filename.jed>\0A\0A -c, --chip=type[,options] Chip type (\22help\22 lists all chips\0A -t, --tool=type[,options] Programming tool (\22help\22 lists all tools for\0A the selected chip type.\0A -h, -?, --help This help.\0A\0A check Check that the chip is operational\0A erase Erase the chip\0A program Program the chip with the JEDEC fuse map\0A verify Verify the chip against the JEDEC fuse map\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([593 x i8], [593 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0, i8* %0, i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}