#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*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
void cmd_help() {
  fprintf(stderr,
          " - An open source programmer for Atmel 8051 MCUs.\nCurrently "
          "supporting %s.\n(c) 2011 by J. Schmitz. This is free software. See "
          "source for details.\n\n",
          "AT89C51AC3, AT98C51CC03");
  printf("Usage: at89flash <options>\n\n");
  printf("  -b <rate>           Baud rate to set the serial port to (Default: "
         "9600).\n");
  printf("                      Valid rates are: 2400, 4800, 9600, 19200, "
         "38400, 57600, 115200.\n");
  printf("  -B                  Perform blank check on Flash.\n");
  printf("  -e                  Operate on EEPROM rather than Flash.\n");
  printf("  -E                  Perform full chip erase (clear Flash and reset "
         "boot and security options).\n");
  printf("                      Use with -e to clear EEPROM data.\n");
  printf("  -h, --help          Display usage information.\n");
  printf("  -i                  Read Intel-Hex from standard input and write "
         "binary buffer to standard output.\n");
  printf("  -m <addr> <data>    Modify Flash or EEPROM memory at the given "
         "address. At maximum one page (128 bytes).\n");
  printf("                      Address ranges are 0h-FFFFh for Flash and "
         "0h-7FFh for EEPROM.\n");
  printf("  -p <device>         Serial port to use for communication with the "
         "device.\n");
  printf("  -P                  Trigger watchdog reset pulse.\n");
  printf("  -q                  Skip verification after writing.\n");
  printf("  -r                  Read contents of Flash or EEPROM and write "
         "Intel-Hex to standard output.\n");
  printf("  -R                  Dump binary data from Flash or EEPROM to "
         "standard output.\n");
  printf(
      "  -s <set> [...]      Apply settings in the form <option[:value]>.\n");
  printf("                      Available options are: rstb, ssb, bsb, sbv, "
         "eb, bljb, x2.\n");
  printf("  -S [addr]           Start application at the given address "
         "(0h-FFFFh, Default: 0).\n");
  printf("  -T <1|2>            Change stop-bit mode of serial port. Try this "
         "if you're having problems with USB converters.\n");
  printf("  -v                  Compare Intel-Hex from standard input to Flash "
         "or EEPROM contents.\n");
  printf("  -V                  Compare contents of Flash or EEPROM to binary "
         "data from standard input.\n");
  printf("  -w                  Write Intel-Hex from standard input to Flash "
         "or EEPROM.\n");
  printf("  -W                  Write binary data from standard input to Flash "
         "or EEPROM.\n");
  printf("\nIf no other operation is specified the device configuration is "
         "read and dumped to standard output.\nThe -p option must always be "
         "given unless -i is used.\n\n");
}


x86 assembly (clang, -O0):
<cmd_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xf59(%rip),%rdx
call   1040 <fprintf@plt>
lea    0xf65(%rip),%rdi
call   1030 <printf@plt>
lea    0xf76(%rip),%rdi
call   1030 <printf@plt>
lea    0xfb6(%rip),%rdi
call   1030 <printf@plt>
lea    0x1001(%rip),%rdi
call   1030 <printf@plt>
lea    0x102a(%rip),%rdi
call   1030 <printf@plt>
lea    0x105a(%rip),%rdi
call   1030 <printf@plt>
lea    0x10b0(%rip),%rdi
call   1030 <printf@plt>
lea    0x10dd(%rip),%rdi
call   1030 <printf@plt>
lea    0x1103(%rip),%rdi
call   1030 <printf@plt>
lea    0x115d(%rip),%rdi
call   1030 <printf@plt>
lea    0x11bd(%rip),%rdi
call   1030 <printf@plt>
lea    0x1206(%rip),%rdi
call   1030 <printf@plt>
lea    0x1247(%rip),%rdi
call   1030 <printf@plt>
lea    0x1270(%rip),%rdi
call   1030 <printf@plt>
lea    0x129c(%rip),%rdi
call   1030 <printf@plt>
lea    0x12f0(%rip),%rdi
call   1030 <printf@plt>
lea    0x1335(%rip),%rdi
call   1030 <printf@plt>
lea    0x136d(%rip),%rdi
call   1030 <printf@plt>
lea    0x13b2(%rip),%rdi
call   1030 <printf@plt>
lea    0x13fc(%rip),%rdi
call   1030 <printf@plt>
lea    0x1464(%rip),%rdi
call   1030 <printf@plt>
lea    0x14b2(%rip),%rdi
call   1030 <printf@plt>
lea    0x1505(%rip),%rdi
call   1030 <printf@plt>
lea    0x1548(%rip),%rdi
call   1030 <printf@plt>
lea    0x158d(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_help>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xf5c(%rip),%rdx
call   1040 <fprintf@plt>
lea    0xf68(%rip),%rdi
call   1030 <puts@plt>
lea    0xf78(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb7(%rip),%rdi
call   1030 <puts@plt>
lea    0x1001(%rip),%rdi
call   1030 <puts@plt>
lea    0x1029(%rip),%rdi
call   1030 <puts@plt>
lea    0x1058(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ad(%rip),%rdi
call   1030 <puts@plt>
lea    0x10d9(%rip),%rdi
call   1030 <puts@plt>
lea    0x10fe(%rip),%rdi
call   1030 <puts@plt>
lea    0x1157(%rip),%rdi
call   1030 <puts@plt>
lea    0x11b6(%rip),%rdi
call   1030 <puts@plt>
lea    0x11fe(%rip),%rdi
call   1030 <puts@plt>
lea    0x123e(%rip),%rdi
call   1030 <puts@plt>
lea    0x1266(%rip),%rdi
call   1030 <puts@plt>
lea    0x1291(%rip),%rdi
call   1030 <puts@plt>
lea    0x12e4(%rip),%rdi
call   1030 <puts@plt>
lea    0x1328(%rip),%rdi
call   1030 <puts@plt>
lea    0x135f(%rip),%rdi
call   1030 <puts@plt>
lea    0x13a3(%rip),%rdi
call   1030 <puts@plt>
lea    0x13ec(%rip),%rdi
call   1030 <puts@plt>
lea    0x1453(%rip),%rdi
call   1030 <puts@plt>
lea    0x14a0(%rip),%rdi
call   1030 <puts@plt>
lea    0x14f2(%rip),%rdi
call   1030 <puts@plt>
lea    0x1534(%rip),%rdi
call   1030 <puts@plt>
lea    0x1578(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [148 x i8] c" - An open source programmer for Atmel 8051 MCUs.\0ACurrently supporting %s.\0A(c) 2011 by J. Schmitz. This is free software. See source for details.\0A\0A\00"
@.str.1 = [24 x i8] c"AT89C51AC3, AT98C51CC03\00"
@.str.2 = [29 x i8] c"Usage: at89flash <options>\0A\0A\00"
@.str.3 = [76 x i8] c" -b <rate> Baud rate to set the serial port to (Default: 9600).\0A\00"
@.str.4 = [87 x i8] c" Valid rates are: 2400, 4800, 9600, 19200, 38400, 57600, 115200.\0A\00"
@.str.5 = [53 x i8] c" -B Perform blank check on Flash.\0A\00"
@.str.6 = [60 x i8] c" -e Operate on EEPROM rather than Flash.\0A\00"
@.str.7 = [98 x i8] c" -E Perform full chip erase (clear Flash and reset boot and security options).\0A\00"
@.str.8 = [57 x i8] c" Use with -e to clear EEPROM data.\0A\00"
@.str.9 = [50 x i8] c" -h, --help Display usage information.\0A\00"
@.str.10 = [102 x i8] c" -i Read Intel-Hex from standard input and write binary buffer to standard output.\0A\00"
@.str.11 = [108 x i8] c" -m <addr> <data> Modify Flash or EEPROM memory at the given address. At maximum one page (128 bytes).\0A\00"
@.str.12 = [85 x i8] c" Address ranges are 0h-FFFFh for Flash and 0h-7FFh for EEPROM.\0A\00"
@.str.13 = [77 x i8] c" -p <device> Serial port to use for communication with the device.\0A\00"
@.str.14 = [53 x i8] c" -P Trigger watchdog reset pulse.\0A\00"
@.str.15 = [56 x i8] c" -q Skip verification after writing.\0A\00"
@.str.16 = [96 x i8] c" -r Read contents of Flash or EEPROM and write Intel-Hex to standard output.\0A\00"
@.str.17 = [81 x i8] c" -R Dump binary data from Flash or EEPROM to standard output.\0A\00"
@.str.18 = [68 x i8] c" -s <set> [...] Apply settings in the form <option[:value]>.\0A\00"
@.str.19 = [81 x i8] c" Available options are: rstb, ssb, bsb, sbv, eb, bljb, x2.\0A\00"
@.str.20 = [86 x i8] c" -S [addr] Start application at the given address (0h-FFFFh, Default: 0).\0A\00"
@.str.21 = [116 x i8] c" -T <1|2> Change stop-bit mode of serial port. Try this if you're having problems with USB converters.\0A\00"
@.str.22 = [90 x i8] c" -v Compare Intel-Hex from standard input to Flash or EEPROM contents.\0A\00"
@.str.23 = [95 x i8] c" -V Compare contents of Flash or EEPROM to binary data from standard input.\0A\00"
@.str.24 = [79 x i8] c" -w Write Intel-Hex from standard input to Flash or EEPROM.\0A\00"
@.str.25 = [81 x i8] c" -W Write binary data from standard input to Flash or EEPROM.\0A\00"
@.str.26 = [156 x i8] c"\0AIf no other operation is specified the device configuration is read and dumped to standard output.\0AThe -p option must always be given unless -i is used.\0A\0A\00"
define void @cmd_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.16, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.17, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.18, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.19, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.20, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str.21, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.22, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.23, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.24, i64 0, i64 0))
%26 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.25, i64 0, i64 0))
%27 = call i32 @printf(i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str.26, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [148 x i8] c" - An open source programmer for Atmel 8051 MCUs.\0ACurrently supporting %s.\0A(c) 2011 by J. Schmitz. This is free software. See source for details.\0A\0A\00"
@.str.1 = [24 x i8] c"AT89C51AC3, AT98C51CC03\00"
@str = [28 x i8] c"Usage: at89flash <options>\0A\00"
@str.27 = [75 x i8] c" -b <rate> Baud rate to set the serial port to (Default: 9600).\00"
@str.28 = [86 x i8] c" Valid rates are: 2400, 4800, 9600, 19200, 38400, 57600, 115200.\00"
@str.29 = [52 x i8] c" -B Perform blank check on Flash.\00"
@str.30 = [59 x i8] c" -e Operate on EEPROM rather than Flash.\00"
@str.31 = [97 x i8] c" -E Perform full chip erase (clear Flash and reset boot and security options).\00"
@str.32 = [56 x i8] c" Use with -e to clear EEPROM data.\00"
@str.33 = [49 x i8] c" -h, --help Display usage information.\00"
@str.34 = [101 x i8] c" -i Read Intel-Hex from standard input and write binary buffer to standard output.\00"
@str.35 = [107 x i8] c" -m <addr> <data> Modify Flash or EEPROM memory at the given address. At maximum one page (128 bytes).\00"
@str.36 = [84 x i8] c" Address ranges are 0h-FFFFh for Flash and 0h-7FFh for EEPROM.\00"
@str.37 = [76 x i8] c" -p <device> Serial port to use for communication with the device.\00"
@str.38 = [52 x i8] c" -P Trigger watchdog reset pulse.\00"
@str.39 = [55 x i8] c" -q Skip verification after writing.\00"
@str.40 = [95 x i8] c" -r Read contents of Flash or EEPROM and write Intel-Hex to standard output.\00"
@str.41 = [80 x i8] c" -R Dump binary data from Flash or EEPROM to standard output.\00"
@str.42 = [67 x i8] c" -s <set> [...] Apply settings in the form <option[:value]>.\00"
@str.43 = [80 x i8] c" Available options are: rstb, ssb, bsb, sbv, eb, bljb, x2.\00"
@str.44 = [85 x i8] c" -S [addr] Start application at the given address (0h-FFFFh, Default: 0).\00"
@str.45 = [115 x i8] c" -T <1|2> Change stop-bit mode of serial port. Try this if you're having problems with USB converters.\00"
@str.46 = [89 x i8] c" -v Compare Intel-Hex from standard input to Flash or EEPROM contents.\00"
@str.47 = [94 x i8] c" -V Compare contents of Flash or EEPROM to binary data from standard input.\00"
@str.48 = [78 x i8] c" -w Write Intel-Hex from standard input to Flash or EEPROM.\00"
@str.49 = [80 x i8] c" -W Write binary data from standard input to Flash or EEPROM.\00"
@str.50 = [155 x i8] c"\0AIf no other operation is specified the device configuration is read and dumped to standard output.\0AThe -p option must always be given unless -i is used.\0A\00"
define void @cmd_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str.27, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @str.28, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.29, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.30, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([97 x i8], [97 x i8]* @str.31, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.32, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.33, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([101 x i8], [101 x i8]* @str.34, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([107 x i8], [107 x i8]* @str.35, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @str.36, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.37, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.38, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.39, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @str.40, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.41, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.42, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.43, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @str.44, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([115 x i8], [115 x i8]* @str.45, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([89 x i8], [89 x i8]* @str.46, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([94 x i8], [94 x i8]* @str.47, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.48, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.49, i64 0, i64 0))
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([155 x i8], [155 x i8]* @str.50, i64 0, i64 0))
ret void
}