#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(int);
int /*<<< orphan*/ printf(char *);
void helpme(char **argv) {
  printf(" parameters: \n");
  printf("   --port PORT  - port of Logic Sniffer, needs to be specified. Same "
         "as  -p Port \n");
  printf(
      "   --speed SPEED  - sets speed of the serial port. Same as -t Speed\n");
  printf("   --wH FILE - HEX file to be uploaded to OLS\n");
  printf("   --wB FILE - BIN file to be uploaded to OLS\n");
  printf("   --rH FILE - HEX file to be downloaded from OLS\n");
  printf("   --rB FILE - BIN file to be downloaded from OLS\n");
  printf("   --l X  or -l X   - send only first X paged \n");
  printf(" commands:\n");
  printf("   --erase  - erases Flash, also same as using -e \n");
  printf("   --write  - writes data to Flash, as  -w \n");
  printf("   --read   - reads data from Flash, same as -r \n");
  printf("   --ignore_jedec  - ignore jedec id, same as -i \n");
  printf("   --run    - enter run mode after finished, same as -r \n");
  printf("   --status - get OLS status, same as -s \n");
  printf("   --boot   - enter bootloader mode - ignore other commands, same as "
         "-b\n");
  printf("   --selftest - run self-test - ignore other commands\n");
  printf("\n\n");
  printf("   When no command specified, program will check FW version, and "
         "Flash ID\n\n");
  printf("   Usage examples:\n");
  printf("   To read Flash to HEX file 'OLS.hex' from OLS on /dev/ttyS1: \n");
  printf("   ols-loader --port /dev/ttyS1 --rH OLS.hex --read\n");
  printf("   or\n");
  printf("   ols-loader -p /dev/ttyS1 --rH OLS.hex -r\n");
  printf("   To erase and write flash, data in BIN file 'OLS.bin', OLS on "
         "/dev/ttyS1:\n");
  printf("   ols-loader --p /dev/ttyS1 --wB OLS.hex --write --erase\n");
  printf("   To get status, and jump to run mode, OLS on /dev/ttyS1:\n");
  printf("   ols-loader --p /dev/ttyS1 --run --status\n");
  printf("   Take note of the use of long options (--) and short options (-) "
         "in specifying parameters.\n");
  printf("   options and parameter are case-sensitive\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<helpme>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
lea    0xf17(%rip),%rdi
call   1030 <printf@plt>
lea    0xf50(%rip),%rdi
call   1030 <printf@plt>
lea    0xf73(%rip),%rdi
call   1030 <printf@plt>
lea    0xf96(%rip),%rdi
call   1030 <printf@plt>
lea    0xfbd(%rip),%rdi
call   1030 <printf@plt>
lea    0xfe4(%rip),%rdi
call   1030 <printf@plt>
lea    0x1008(%rip),%rdi
call   1030 <printf@plt>
lea    0x1008(%rip),%rdi
call   1030 <printf@plt>
lea    0x1030(%rip),%rdi
call   1030 <printf@plt>
lea    0x1051(%rip),%rdi
call   1030 <printf@plt>
lea    0x1077(%rip),%rdi
call   1030 <printf@plt>
lea    0x109e(%rip),%rdi
call   1030 <printf@plt>
lea    0x10cc(%rip),%rdi
call   1030 <printf@plt>
lea    0x10eb(%rip),%rdi
call   1030 <printf@plt>
lea    0x1128(%rip),%rdi
call   1030 <printf@plt>
lea    0x119c(%rip),%rdi
call   1030 <printf@plt>
lea    0x1147(%rip),%rdi
call   1030 <printf@plt>
lea    0x1187(%rip),%rdi
call   1030 <printf@plt>
lea    0x118f(%rip),%rdi
call   1030 <printf@plt>
lea    0x11c4(%rip),%rdi
call   1030 <printf@plt>
lea    0x11ed(%rip),%rdi
call   1030 <printf@plt>
lea    0x11e8(%rip),%rdi
call   1030 <printf@plt>
lea    0x1209(%rip),%rdi
call   1030 <printf@plt>
lea    0x124a(%rip),%rdi
call   1030 <printf@plt>
lea    0x1279(%rip),%rdi
call   1030 <printf@plt>
lea    0x12a9(%rip),%rdi
call   1030 <printf@plt>
lea    0x12ca(%rip),%rdi
call   1030 <printf@plt>
lea    0x131c(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<helpme>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
lea    0xf20(%rip),%rdi
call   1030 <puts@plt>
lea    0xf58(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9c(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc2(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe8(%rip),%rdi
call   1030 <puts@plt>
lea    0x100b(%rip),%rdi
call   1030 <puts@plt>
lea    0x100a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1031(%rip),%rdi
call   1030 <puts@plt>
lea    0x1051(%rip),%rdi
call   1030 <puts@plt>
lea    0x1076(%rip),%rdi
call   1030 <puts@plt>
lea    0x109c(%rip),%rdi
call   1030 <puts@plt>
lea    0x10c9(%rip),%rdi
call   1030 <puts@plt>
lea    0x10e7(%rip),%rdi
call   1030 <puts@plt>
lea    0x1123(%rip),%rdi
call   1030 <puts@plt>
lea    0x1196(%rip),%rdi
call   1030 <puts@plt>
lea    0x1141(%rip),%rdi
call   1030 <puts@plt>
lea    0x1180(%rip),%rdi
call   1030 <puts@plt>
lea    0x1187(%rip),%rdi
call   1030 <puts@plt>
lea    0x11bb(%rip),%rdi
call   1030 <puts@plt>
lea    0x11e3(%rip),%rdi
call   1030 <puts@plt>
lea    0x11dd(%rip),%rdi
call   1030 <puts@plt>
lea    0x11fd(%rip),%rdi
call   1030 <puts@plt>
lea    0x123d(%rip),%rdi
call   1030 <puts@plt>
lea    0x126b(%rip),%rdi
call   1030 <puts@plt>
lea    0x129a(%rip),%rdi
call   1030 <puts@plt>
lea    0x12ba(%rip),%rdi
call   1030 <puts@plt>
lea    0x130b(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c" parameters: \0A\00"
@.str.1 = [83 x i8] c" --port PORT - port of Logic Sniffer, needs to be specified. Same as -p Port \0A\00"
@.str.2 = [69 x i8] c" --speed SPEED - sets speed of the serial port. Same as -t Speed\0A\00"
@.str.3 = [47 x i8] c" --wH FILE - HEX file to be uploaded to OLS\0A\00"
@.str.4 = [47 x i8] c" --wB FILE - BIN file to be uploaded to OLS\0A\00"
@.str.5 = [51 x i8] c" --rH FILE - HEX file to be downloaded from OLS\0A\00"
@.str.6 = [51 x i8] c" --rB FILE - BIN file to be downloaded from OLS\0A\00"
@.str.7 = [48 x i8] c" --l X or -l X - send only first X paged \0A\00"
@.str.8 = [12 x i8] c" commands:\0A\00"
@.str.9 = [52 x i8] c" --erase - erases Flash, also same as using -e \0A\00"
@.str.10 = [45 x i8] c" --write - writes data to Flash, as -w \0A\00"
@.str.11 = [50 x i8] c" --read - reads data from Flash, same as -r \0A\00"
@.str.12 = [51 x i8] c" --ignore_jedec - ignore jedec id, same as -i \0A\00"
@.str.13 = [58 x i8] c" --run - enter run mode after finished, same as -r \0A\00"
@.str.14 = [43 x i8] c" --status - get OLS status, same as -s \0A\00"
@.str.15 = [73 x i8] c" --boot - enter bootloader mode - ignore other commands, same as -b\0A\00"
@.str.16 = [55 x i8] c" --selftest - run self-test - ignore other commands\0A\00"
@.str.17 = [3 x i8] c"\0A\0A\00"
@.str.18 = [76 x i8] c" When no command specified, program will check FW version, and Flash ID\0A\0A\00"
@.str.19 = [20 x i8] c" Usage examples:\0A\00"
@.str.20 = [65 x i8] c" To read Flash to HEX file 'OLS.hex' from OLS on /dev/ttyS1: \0A\00"
@.str.21 = [53 x i8] c" ols-loader --port /dev/ttyS1 --rH OLS.hex --read\0A\00"
@.str.22 = [7 x i8] c" or\0A\00"
@.str.23 = [45 x i8] c" ols-loader -p /dev/ttyS1 --rH OLS.hex -r\0A\00"
@.str.24 = [77 x i8] c" To erase and write flash, data in BIN file 'OLS.bin', OLS on /dev/ttyS1:\0A\00"
@.str.25 = [59 x i8] c" ols-loader --p /dev/ttyS1 --wB OLS.hex --write --erase\0A\00"
@.str.26 = [60 x i8] c" To get status, and jump to run mode, OLS on /dev/ttyS1:\0A\00"
@.str.27 = [45 x i8] c" ols-loader --p /dev/ttyS1 --run --status\0A\00"
@.str.28 = [94 x i8] c" Take note of the use of long options (--) and short options (-) in specifying parameters.\0A\00"
@.str.29 = [45 x i8] c" options and parameter are case-sensitive\0A\00"
define void @helpme(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.6, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.9, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.10, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.12, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.13, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.14, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.15, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.16, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.18, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.19, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.20, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.21, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i64 0, i64 0))
%26 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.23, i64 0, i64 0))
%27 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.24, i64 0, i64 0))
%28 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.25, i64 0, i64 0))
%29 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.26, i64 0, i64 0))
%30 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.27, i64 0, i64 0))
%31 = call i32 @printf(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.28, i64 0, i64 0))
%32 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.29, i64 0, i64 0))
%33 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [14 x i8] c" parameters: \00"
@str.30 = [82 x i8] c" --port PORT - port of Logic Sniffer, needs to be specified. Same as -p Port \00"
@str.31 = [68 x i8] c" --speed SPEED - sets speed of the serial port. Same as -t Speed\00"
@str.32 = [46 x i8] c" --wH FILE - HEX file to be uploaded to OLS\00"
@str.33 = [46 x i8] c" --wB FILE - BIN file to be uploaded to OLS\00"
@str.34 = [50 x i8] c" --rH FILE - HEX file to be downloaded from OLS\00"
@str.35 = [50 x i8] c" --rB FILE - BIN file to be downloaded from OLS\00"
@str.36 = [47 x i8] c" --l X or -l X - send only first X paged \00"
@str.37 = [11 x i8] c" commands:\00"
@str.38 = [51 x i8] c" --erase - erases Flash, also same as using -e \00"
@str.39 = [44 x i8] c" --write - writes data to Flash, as -w \00"
@str.40 = [49 x i8] c" --read - reads data from Flash, same as -r \00"
@str.41 = [50 x i8] c" --ignore_jedec - ignore jedec id, same as -i \00"
@str.42 = [57 x i8] c" --run - enter run mode after finished, same as -r \00"
@str.43 = [42 x i8] c" --status - get OLS status, same as -s \00"
@str.44 = [72 x i8] c" --boot - enter bootloader mode - ignore other commands, same as -b\00"
@str.45 = [54 x i8] c" --selftest - run self-test - ignore other commands\00"
@str.46 = [2 x i8] c"\0A\00"
@str.47 = [75 x i8] c" When no command specified, program will check FW version, and Flash ID\0A\00"
@str.48 = [19 x i8] c" Usage examples:\00"
@str.49 = [64 x i8] c" To read Flash to HEX file 'OLS.hex' from OLS on /dev/ttyS1: \00"
@str.50 = [52 x i8] c" ols-loader --port /dev/ttyS1 --rH OLS.hex --read\00"
@str.51 = [6 x i8] c" or\00"
@str.52 = [44 x i8] c" ols-loader -p /dev/ttyS1 --rH OLS.hex -r\00"
@str.53 = [76 x i8] c" To erase and write flash, data in BIN file 'OLS.bin', OLS on /dev/ttyS1:\00"
@str.54 = [58 x i8] c" ols-loader --p /dev/ttyS1 --wB OLS.hex --write --erase\00"
@str.55 = [59 x i8] c" To get status, and jump to run mode, OLS on /dev/ttyS1:\00"
@str.56 = [44 x i8] c" ols-loader --p /dev/ttyS1 --run --status\00"
@str.57 = [93 x i8] c" Take note of the use of long options (--) and short options (-) in specifying parameters.\00"
@str.58 = [44 x i8] c" options and parameter are case-sensitive\00"
define void @helpme(i8** nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str.30, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.31, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.32, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.33, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.34, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.35, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.36, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.37, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.38, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.39, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.40, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.41, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.42, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.43, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.44, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.45, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.46, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str.47, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.48, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.49, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.50, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.51, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.52, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.53, i64 0, i64 0))
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.54, i64 0, i64 0))
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.55, i64 0, i64 0))
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.56, i64 0, i64 0))
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([93 x i8], [93 x i8]* @str.57, i64 0, i64 0))
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.58, i64 0, i64 0))
%32 = tail call i32 @exit(i32 -1)
unreachable
}