#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*/ list_programmers_linebreak(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void cli_classic_usage(const char *name) {
  printf("Usage: %s [-h|-R|-L|"
         "\n\t-p <programmername>[:<parameters>] [-c <chipname>]\n"
         "\t\t(--flash-name|--flash-size|\n"
         "\t\t [-E|-x|(-r|-w|-v) <file>]\n"
         "\t\t [(-l <layoutfile>|--ifd| --fmap|--fmap-file <file>) [-i "
         "<region>[:<file>]]...]\n"
         "\t\t [-n] [-N] [-f])]\n"
         "\t[-V[V[V]]] [-o <logfile>]\n\n",
         name);
  printf(
      " -h | --help                        print this help text\n"
      " -R | --version                     print version (release)\n"
      " -r | --read <file>                 read flash and save to <file>\n"
      " -w | --write <file|->              write <file> or the content "
      "provided\n"
      "                                    on the standard input to flash\n"
      " -v | --verify <file|->             verify flash against <file>\n"
      "                                    or the content provided on the "
      "standard input\n"
      " -E | --erase                       erase flash memory\n"
      " -V | --verbose                     more verbose output\n"
      " -c | --chip <chipname>             probe only for specified flash "
      "chip\n"
      " -f | --force                       force specific operations (see man "
      "page)\n"
      " -n | --noverify                    don't auto-verify\n"
      " -N | --noverify-all                verify included regions only (cf. "
      "-i)\n"
      " -x | --extract                     extract regions to files\n"
      " -l | --layout <layoutfile>         read ROM layout from <layoutfile>\n"
      "      --wp-disable                  disable write protection\n"
      "      --wp-enable                   enable write protection\n"
      "      --wp-list                     list write protect range\n"
      "      --wp-status                   show write protect status\n"
      "      --wp-range=<start>,<len>      set write protect range\n"
      "      --wp-region <region>          set write protect region\n"
      "      --flash-name                  read out the detected flash name\n"
      "      --flash-size                  read out the detected flash size\n"
      "      --fmap                        read ROM layout from fmap embedded "
      "in ROM\n"
      "      --fmap-file <fmapfile>        read ROM layout from fmap in "
      "<fmapfile>\n"
      "      --ifd                         read layout from an Intel Firmware "
      "Descriptor\n"
      " -i | --image <region>[:<file>]     only read/write image <region> from "
      "layout\n"
      "                                    (optionally with data from <file>)\n"
      " -o | --output <logfile>            log output to <logfile>\n"
      "      --flash-contents <ref-file>   assume flash contents to be "
      "<ref-file>\n"
      " -L | --list-supported              print supported devices\n"
      " -p | --programmer <name>[:<param>] specify the programmer device. One "
      "of\n");
  list_programmers_linebreak(4, 80, 0);
  printf(".\n\nYou can specify one of -h, -R, -L, "
         "-E, -r, -w, -v or no operation.\n"
         "If no operation is specified, flashrom will only probe for flash "
         "chips.\n");
}


x86 assembly (clang, -O0):
<cli_classic_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfc2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x4,%edi
mov    $0x50,%esi
xor    %edx,%edx
call   1040 <list_programmers_linebreak@plt>
lea    0x1806(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cli_classic_usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfbe(%rip),%rdi
call   1030 <puts@plt>
mov    $0x4,%edi
mov    $0x50,%esi
xor    %edx,%edx
call   1050 <list_programmers_linebreak@plt>
lea    0x1803(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [263 x i8] c"Usage: %s [-h|-R|-L|\0A\09-p <programmername>[:<parameters>] [-c <chipname>]\0A\09\09(--flash-name|--flash-size|\0A\09\09 [-E|-x|(-r|-w|-v) <file>]\0A\09\09 [(-l <layoutfile>|--ifd| --fmap|--fmap-file <file>) [-i <region>[:<file>]]...]\0A\09\09 [-n] [-N] [-f])]\0A\09[-V[V[V]]] [-o <logfile>]\0A\0A\00"
@.str.1 = [2147 x i8] c" -h | --help print this help text\0A -R | --version print version (release)\0A -r | --read <file> read flash and save to <file>\0A -w | --write <file|-> write <file> or the content provided\0A on the standard input to flash\0A -v | --verify <file|-> verify flash against <file>\0A or the content provided on the standard input\0A -E | --erase erase flash memory\0A -V | --verbose more verbose output\0A -c | --chip <chipname> probe only for specified flash chip\0A -f | --force force specific operations (see man page)\0A -n | --noverify don't auto-verify\0A -N | --noverify-all verify included regions only (cf. -i)\0A -x | --extract extract regions to files\0A -l | --layout <layoutfile> read ROM layout from <layoutfile>\0A --wp-disable disable write protection\0A --wp-enable enable write protection\0A --wp-list list write protect range\0A --wp-status show write protect status\0A --wp-range=<start>,<len> set write protect range\0A --wp-region <region> set write protect region\0A --flash-name read out the detected flash name\0A --flash-size read out the detected flash size\0A --fmap read ROM layout from fmap embedded in ROM\0A --fmap-file <fmapfile> read ROM layout from fmap in <fmapfile>\0A --ifd read layout from an Intel Firmware Descriptor\0A -i | --image <region>[:<file>] only read/write image <region> from layout\0A (optionally with data from <file>)\0A -o | --output <logfile> log output to <logfile>\0A --flash-contents <ref-file> assume flash contents to be <ref-file>\0A -L | --list-supported print supported devices\0A -p | --programmer <name>[:<param>] specify the programmer device. One of\0A\00"
@.str.2 = [143 x i8] c".\0A\0AYou can specify one of -h, -R, -L, -E, -r, -w, -v or no operation.\0AIf no operation is specified, flashrom will only probe for flash chips.\0A\00"
define void @cli_classic_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([263 x i8], [263 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2147 x i8], [2147 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @list_programmers_linebreak(i32 4, i32 80, i32 0)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [263 x i8] c"Usage: %s [-h|-R|-L|\0A\09-p <programmername>[:<parameters>] [-c <chipname>]\0A\09\09(--flash-name|--flash-size|\0A\09\09 [-E|-x|(-r|-w|-v) <file>]\0A\09\09 [(-l <layoutfile>|--ifd| --fmap|--fmap-file <file>) [-i <region>[:<file>]]...]\0A\09\09 [-n] [-N] [-f])]\0A\09[-V[V[V]]] [-o <logfile>]\0A\0A\00"
@str = [2146 x i8] c" -h | --help print this help text\0A -R | --version print version (release)\0A -r | --read <file> read flash and save to <file>\0A -w | --write <file|-> write <file> or the content provided\0A on the standard input to flash\0A -v | --verify <file|-> verify flash against <file>\0A or the content provided on the standard input\0A -E | --erase erase flash memory\0A -V | --verbose more verbose output\0A -c | --chip <chipname> probe only for specified flash chip\0A -f | --force force specific operations (see man page)\0A -n | --noverify don't auto-verify\0A -N | --noverify-all verify included regions only (cf. -i)\0A -x | --extract extract regions to files\0A -l | --layout <layoutfile> read ROM layout from <layoutfile>\0A --wp-disable disable write protection\0A --wp-enable enable write protection\0A --wp-list list write protect range\0A --wp-status show write protect status\0A --wp-range=<start>,<len> set write protect range\0A --wp-region <region> set write protect region\0A --flash-name read out the detected flash name\0A --flash-size read out the detected flash size\0A --fmap read ROM layout from fmap embedded in ROM\0A --fmap-file <fmapfile> read ROM layout from fmap in <fmapfile>\0A --ifd read layout from an Intel Firmware Descriptor\0A -i | --image <region>[:<file>] only read/write image <region> from layout\0A (optionally with data from <file>)\0A -o | --output <logfile> log output to <logfile>\0A --flash-contents <ref-file> assume flash contents to be <ref-file>\0A -L | --list-supported print supported devices\0A -p | --programmer <name>[:<param>] specify the programmer device. One of\00"
@str.3 = [142 x i8] c".\0A\0AYou can specify one of -h, -R, -L, -E, -r, -w, -v or no operation.\0AIf no operation is specified, flashrom will only probe for flash chips.\00"
define void @cli_classic_usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([263 x i8], [263 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2146 x i8], [2146 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @list_programmers_linebreak(i32 4, i32 80, i32 0)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([142 x i8], [142 x i8]* @str.3, i64 0, i64 0))
ret void
}