#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 showHelp(FILE *f) {
  fprintf(
      f,
      "Usage: ws2300 [-h] [-?] [-v] [-a mcastaddr] [-p mcastport] [-i "
      "mcastinterface]\n"
      "  -h | -? | --help                      display usage and exit\n"
      "  -v | --verbose                        verbose logging\n"
      "  -a addr | --multicast-address addr    multicast address, default "
      "236.0.0.1\n"
      "  -p port | --multicast-port port       multicast port, default 3636\n"
      "  -i addr | --multicast-interface addr  address of the multicast "
      "interface, default 127.0.0.1\n"
      "  -r path | --recent path               path to most recent data, "
      "/tmp/current-weather.json\n"
      "  -P path | --periodic path             path to the periodic data, "
      "/tmp/weather\n"
      "                                        timestamp.json gets appended.\n"
      "  -m period | --minutes period          number of minutes between "
      "periodic data files.\n");
}


x86 assembly (clang, -O0):
<showHelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showHelp>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x2ff,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [768 x i8] c"Usage: ws2300 [-h] [-?] [-v] [-a mcastaddr] [-p mcastport] [-i mcastinterface]\0A -h | -? | --help display usage and exit\0A -v | --verbose verbose logging\0A -a addr | --multicast-address addr multicast address, default 236.0.0.1\0A -p port | --multicast-port port multicast port, default 3636\0A -i addr | --multicast-interface addr address of the multicast interface, default 127.0.0.1\0A -r path | --recent path path to most recent data, /tmp/current-weather.json\0A -P path | --periodic path path to the periodic data, /tmp/weather\0A timestamp.json gets appended.\0A -m period | --minutes period number of minutes between periodic data files.\0A\00"
define void @showHelp(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([768 x i8], [768 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [768 x i8] c"Usage: ws2300 [-h] [-?] [-v] [-a mcastaddr] [-p mcastport] [-i mcastinterface]\0A -h | -? | --help display usage and exit\0A -v | --verbose verbose logging\0A -a addr | --multicast-address addr multicast address, default 236.0.0.1\0A -p port | --multicast-port port multicast port, default 3636\0A -i addr | --multicast-interface addr address of the multicast interface, default 127.0.0.1\0A -r path | --recent path path to most recent data, /tmp/current-weather.json\0A -P path | --periodic path path to the periodic data, /tmp/weather\0A timestamp.json gets appended.\0A -m period | --minutes period number of minutes between periodic data files.\0A\00"
define void @showHelp(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([768 x i8], [768 x i8]* @.str, i64 0, i64 0), i64 767, i64 1, i32* %0)
ret void
}