#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_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void display_help(void) {
  printf("Usage: nanddump [OPTIONS] MTD-device\n"
         "Dumps the contents of a nand mtd partition.\n"
         "\n"
         "           --help               Display this help and exit\n"
         "           --version            Output version information and exit\n"
         "-f file    --file=file          Dump to file\n"
         "-i         --ignoreerrors       Ignore errors\n"
         "-l length  --length=length      Length\n"
         "-n         --noecc              Read without error correction\n"
         "-o         --omitoob            Omit oob data\n"
         "-b         --omitbad            Omit bad blocks from the dump\n"
         "-p         --prettyprint        Print nice (hexdump)\n"
         "-q         --quiet              Don't display progress and status "
         "messages\n"
         "-s addr    --startaddress=addr  Start address\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<display_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<display_help>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [684 x i8] c"Usage: nanddump [OPTIONS] MTD-device\0ADumps the contents of a nand mtd partition.\0A\0A --help Display this help and exit\0A --version Output version information and exit\0A-f file --file=file Dump to file\0A-i --ignoreerrors Ignore errors\0A-l length --length=length Length\0A-n --noecc Read without error correction\0A-o --omitoob Omit oob data\0A-b --omitbad Omit bad blocks from the dump\0A-p --prettyprint Print nice (hexdump)\0A-q --quiet Don't display progress and status messages\0A-s addr --startaddress=addr Start address\0A\00"
@EXIT_SUCCESS = global i32 0
define void @display_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([684 x i8], [684 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [683 x i8] c"Usage: nanddump [OPTIONS] MTD-device\0ADumps the contents of a nand mtd partition.\0A\0A --help Display this help and exit\0A --version Output version information and exit\0A-f file --file=file Dump to file\0A-i --ignoreerrors Ignore errors\0A-l length --length=length Length\0A-n --noecc Read without error correction\0A-o --omitoob Omit oob data\0A-b --omitbad Omit bad blocks from the dump\0A-p --prettyprint Print nice (hexdump)\0A-q --quiet Don't display progress and status messages\0A-s addr --startaddress=addr Start address\00"
define void @display_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([683 x i8], [683 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}