#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 *);
void showhelp() {
  printf("putin v0.1 - versatile ROM file corruption utility\n\n"
         "Command line parameters:\n"
         "------------------------\n"
         "\t-i<file>    - input ROM file name\n"
         "\t-O<file>    - output ROM file name\n"
         "\t-o<bytes>   - offset in bytes\n"
         "\t-s<seed>    - random seed to use\n"
         "\t-e<exec>    - program (emulator) to execute with output file as "
         "parameter\n"
         "\t-m<method>  - corruption method: 0 - set random bytes, 1 - add "
         "value to bytes, 2 - set bytes to value\n"
         "\t-c<bytes>   - size of area to corrupt\n"
         "\t-p<prob>    - probability that a byte in area will be modified\n"
         "\t-v<value>   - value to set bytes to or shift bytes by\n"
         "\t-h or -?    - show this help message\n"
         "\t-V          - show version info\n");
}


x86 assembly (clang, -O0):
<showhelp>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<showhelp>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [646 x i8] c"putin v0.1 - versatile ROM file corruption utility\0A\0ACommand line parameters:\0A------------------------\0A\09-i<file> - input ROM file name\0A\09-O<file> - output ROM file name\0A\09-o<bytes> - offset in bytes\0A\09-s<seed> - random seed to use\0A\09-e<exec> - program (emulator) to execute with output file as parameter\0A\09-m<method> - corruption method: 0 - set random bytes, 1 - add value to bytes, 2 - set bytes to value\0A\09-c<bytes> - size of area to corrupt\0A\09-p<prob> - probability that a byte in area will be modified\0A\09-v<value> - value to set bytes to or shift bytes by\0A\09-h or -? - show this help message\0A\09-V - show version info\0A\00"
define void @showhelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([646 x i8], [646 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [645 x i8] c"putin v0.1 - versatile ROM file corruption utility\0A\0ACommand line parameters:\0A------------------------\0A\09-i<file> - input ROM file name\0A\09-O<file> - output ROM file name\0A\09-o<bytes> - offset in bytes\0A\09-s<seed> - random seed to use\0A\09-e<exec> - program (emulator) to execute with output file as parameter\0A\09-m<method> - corruption method: 0 - set random bytes, 1 - add value to bytes, 2 - set bytes to value\0A\09-c<bytes> - size of area to corrupt\0A\09-p<prob> - probability that a byte in area will be modified\0A\09-v<value> - value to set bytes to or shift bytes by\0A\09-h or -? - show this help message\0A\09-V - show version info\00"
define void @showhelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([645 x i8], [645 x i8]* @str, i64 0, i64 0))
ret void
}