#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void outputProgramHelp(FILE *fd) {
  fprintf(fd, "\nRTL-Wx Weather Data Monitoring Software\n\n");
  fprintf(fd, "This program attempts to collect data from 433Mhz wireless "
              "weather sensors\n");
  fprintf(fd, "or an Oregon Scientific weather station connected through a "
              "serial port.\n\n");
  fprintf(fd, "Commands:\n");
  fprintf(fd, "             h  - help (this message)\n");
  fprintf(fd, "             a  - Display Action Scheduler Info\n");
  fprintf(fd, "             c  - Process configuration file\n");
  fprintf(fd, "             d  - Show debugging statistics\n");
  fprintf(fd,
          "             e  - Show energy data (kilowatts) for last 15 mins\n");
  fprintf(fd,
          "             f  - invoke file parser - to replace tags w/data\n");
  fprintf(fd, "             i  - Show config info\n");
  fprintf(fd, "             l  - clear log file (rtl-wx.log)\n");
  fprintf(fd, "             m  - show historical max/min data\n");
  fprintf(fd, "             n  - clear historical max/min data\n");
  fprintf(
      fd,
      "             r  - reset sensor lock codes and clear timeout counts\n");
  fprintf(fd, "             s  - Save data snapshot now\n");
  fprintf(fd, "             t  - Toggle raw sensor message display mode\n");
  fprintf(fd, "             u  - Initiate FTP upload\n");
  fprintf(fd, "             v  - (not implemented) Trim CSV files (older "
              "entries removed\n");
  fprintf(fd, "             w  - Save webcam snapshot\n");
  fprintf(fd, "             q  - quit client (server stays running)\n");
  fprintf(fd, "            ESC - Kill server (and quit client)\n");
  fprintf(fd, "            <Any other key shows current data>\n");
}


x86 assembly (clang, -O0):
<outputProgramHelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xef4(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf30(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf6b(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf66(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf7d(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf9e(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfbc(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfd9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x100a(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1039(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x104d(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x106c(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x108c(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x10ad(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x10e1(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x10fb(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1125(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x113c(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1177(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x118f(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x11b5(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x11d6(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outputProgramHelp>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    $0x2a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xef7(%rip),%rdi
mov    $0x4b,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xf2a(%rip),%rdi
mov    $0x4a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xf5c(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xf4e(%rip),%rdi
mov    $0x26,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xf5c(%rip),%rdi
mov    $0x30,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xf74(%rip),%rdi
mov    $0x2d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xf89(%rip),%rdi
mov    $0x2c,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xf9d(%rip),%rdi
mov    $0x40,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xfc5(%rip),%rdi
mov    $0x3e,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xfeb(%rip),%rdi
mov    $0x23,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xff6(%rip),%rdi
mov    $0x2e,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0x100c(%rip),%rdi
mov    $0x2f,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0x1023(%rip),%rdi
mov    $0x30,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0x103b(%rip),%rdi
mov    $0x43,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0x1066(%rip),%rdi
mov    $0x29,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0x1077(%rip),%rdi
mov    $0x39,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0x1098(%rip),%rdi
mov    $0x26,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0x10a6(%rip),%rdi
mov    $0x4a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0x10d8(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0x10e7(%rip),%rdi
mov    $0x35,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0x1104(%rip),%rdi
mov    $0x30,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0x111c(%rip),%rdi
mov    $0x2f,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"\0ARTL-Wx Weather Data Monitoring Software\0A\0A\00"
@.str.1 = [76 x i8] c"This program attempts to collect data from 433Mhz wireless weather sensors\0A\00"
@.str.2 = [75 x i8] c"or an Oregon Scientific weather station connected through a serial port.\0A\0A\00"
@.str.3 = [11 x i8] c"Commands:\0A\00"
@.str.4 = [39 x i8] c" h - help (this message)\0A\00"
@.str.5 = [49 x i8] c" a - Display Action Scheduler Info\0A\00"
@.str.6 = [46 x i8] c" c - Process configuration file\0A\00"
@.str.7 = [45 x i8] c" d - Show debugging statistics\0A\00"
@.str.8 = [65 x i8] c" e - Show energy data (kilowatts) for last 15 mins\0A\00"
@.str.9 = [63 x i8] c" f - invoke file parser - to replace tags w/data\0A\00"
@.str.10 = [36 x i8] c" i - Show config info\0A\00"
@.str.11 = [47 x i8] c" l - clear log file (rtl-wx.log)\0A\00"
@.str.12 = [48 x i8] c" m - show historical max/min data\0A\00"
@.str.13 = [49 x i8] c" n - clear historical max/min data\0A\00"
@.str.14 = [68 x i8] c" r - reset sensor lock codes and clear timeout counts\0A\00"
@.str.15 = [42 x i8] c" s - Save data snapshot now\0A\00"
@.str.16 = [58 x i8] c" t - Toggle raw sensor message display mode\0A\00"
@.str.17 = [39 x i8] c" u - Initiate FTP upload\0A\00"
@.str.18 = [75 x i8] c" v - (not implemented) Trim CSV files (older entries removed\0A\00"
@.str.19 = [40 x i8] c" w - Save webcam snapshot\0A\00"
@.str.20 = [54 x i8] c" q - quit client (server stays running)\0A\00"
@.str.21 = [49 x i8] c" ESC - Kill server (and quit client)\0A\00"
@.str.22 = [48 x i8] c" <Any other key shows current data>\0A\00"
define void @outputProgramHelp(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32*, i32** %2
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32*, i32** %2
%10 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32*, i32** %2
%12 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
%13 = load i32*, i32** %2
%14 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0))
%15 = load i32*, i32** %2
%16 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0))
%17 = load i32*, i32** %2
%18 = call i32 @fprintf(i32* %17, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0))
%19 = load i32*, i32** %2
%20 = call i32 @fprintf(i32* %19, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.8, i64 0, i64 0))
%21 = load i32*, i32** %2
%22 = call i32 @fprintf(i32* %21, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.9, i64 0, i64 0))
%23 = load i32*, i32** %2
%24 = call i32 @fprintf(i32* %23, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
%25 = load i32*, i32** %2
%26 = call i32 @fprintf(i32* %25, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.11, i64 0, i64 0))
%27 = load i32*, i32** %2
%28 = call i32 @fprintf(i32* %27, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.12, i64 0, i64 0))
%29 = load i32*, i32** %2
%30 = call i32 @fprintf(i32* %29, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.13, i64 0, i64 0))
%31 = load i32*, i32** %2
%32 = call i32 @fprintf(i32* %31, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.14, i64 0, i64 0))
%33 = load i32*, i32** %2
%34 = call i32 @fprintf(i32* %33, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.15, i64 0, i64 0))
%35 = load i32*, i32** %2
%36 = call i32 @fprintf(i32* %35, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.16, i64 0, i64 0))
%37 = load i32*, i32** %2
%38 = call i32 @fprintf(i32* %37, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.17, i64 0, i64 0))
%39 = load i32*, i32** %2
%40 = call i32 @fprintf(i32* %39, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.18, i64 0, i64 0))
%41 = load i32*, i32** %2
%42 = call i32 @fprintf(i32* %41, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.19, i64 0, i64 0))
%43 = load i32*, i32** %2
%44 = call i32 @fprintf(i32* %43, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.20, i64 0, i64 0))
%45 = load i32*, i32** %2
%46 = call i32 @fprintf(i32* %45, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.21, i64 0, i64 0))
%47 = load i32*, i32** %2
%48 = call i32 @fprintf(i32* %47, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.22, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"\0ARTL-Wx Weather Data Monitoring Software\0A\0A\00"
@.str.1 = [76 x i8] c"This program attempts to collect data from 433Mhz wireless weather sensors\0A\00"
@.str.2 = [75 x i8] c"or an Oregon Scientific weather station connected through a serial port.\0A\0A\00"
@.str.3 = [11 x i8] c"Commands:\0A\00"
@.str.4 = [39 x i8] c" h - help (this message)\0A\00"
@.str.5 = [49 x i8] c" a - Display Action Scheduler Info\0A\00"
@.str.6 = [46 x i8] c" c - Process configuration file\0A\00"
@.str.7 = [45 x i8] c" d - Show debugging statistics\0A\00"
@.str.8 = [65 x i8] c" e - Show energy data (kilowatts) for last 15 mins\0A\00"
@.str.9 = [63 x i8] c" f - invoke file parser - to replace tags w/data\0A\00"
@.str.10 = [36 x i8] c" i - Show config info\0A\00"
@.str.11 = [47 x i8] c" l - clear log file (rtl-wx.log)\0A\00"
@.str.12 = [48 x i8] c" m - show historical max/min data\0A\00"
@.str.13 = [49 x i8] c" n - clear historical max/min data\0A\00"
@.str.14 = [68 x i8] c" r - reset sensor lock codes and clear timeout counts\0A\00"
@.str.15 = [42 x i8] c" s - Save data snapshot now\0A\00"
@.str.16 = [58 x i8] c" t - Toggle raw sensor message display mode\0A\00"
@.str.17 = [39 x i8] c" u - Initiate FTP upload\0A\00"
@.str.18 = [75 x i8] c" v - (not implemented) Trim CSV files (older entries removed\0A\00"
@.str.19 = [40 x i8] c" w - Save webcam snapshot\0A\00"
@.str.20 = [54 x i8] c" q - quit client (server stays running)\0A\00"
@.str.21 = [49 x i8] c" ESC - Kill server (and quit client)\0A\00"
@.str.22 = [48 x i8] c" <Any other key shows current data>\0A\00"
define void @outputProgramHelp(i32* %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i64 42, i64 1, i32* %0)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i64 75, i64 1, i32* %0)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.2, i64 0, i64 0), i64 74, i64 1, i32* %0)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i64 10, i64 1, i32* %0)
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i64 38, i64 1, i32* %0)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0), i64 48, i64 1, i32* %0)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0), i64 45, i64 1, i32* %0)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i64 44, i64 1, i32* %0)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.8, i64 0, i64 0), i64 64, i64 1, i32* %0)
%11 = tail call i64 @fwrite(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.9, i64 0, i64 0), i64 62, i64 1, i32* %0)
%12 = tail call i64 @fwrite(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0), i64 35, i64 1, i32* %0)
%13 = tail call i64 @fwrite(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.11, i64 0, i64 0), i64 46, i64 1, i32* %0)
%14 = tail call i64 @fwrite(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.12, i64 0, i64 0), i64 47, i64 1, i32* %0)
%15 = tail call i64 @fwrite(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.13, i64 0, i64 0), i64 48, i64 1, i32* %0)
%16 = tail call i64 @fwrite(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.14, i64 0, i64 0), i64 67, i64 1, i32* %0)
%17 = tail call i64 @fwrite(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.15, i64 0, i64 0), i64 41, i64 1, i32* %0)
%18 = tail call i64 @fwrite(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.16, i64 0, i64 0), i64 57, i64 1, i32* %0)
%19 = tail call i64 @fwrite(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.17, i64 0, i64 0), i64 38, i64 1, i32* %0)
%20 = tail call i64 @fwrite(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.18, i64 0, i64 0), i64 74, i64 1, i32* %0)
%21 = tail call i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.19, i64 0, i64 0), i64 39, i64 1, i32* %0)
%22 = tail call i64 @fwrite(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.20, i64 0, i64 0), i64 53, i64 1, i32* %0)
%23 = tail call i64 @fwrite(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.21, i64 0, i64 0), i64 48, i64 1, i32* %0)
%24 = tail call i64 @fwrite(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.22, i64 0, i64 0), i64 47, i64 1, i32* %0)
ret void
}