#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_SUCCESS;
int /*<<< orphan*/ cleanup(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ print_usage(char const *);
int /*<<< orphan*/ stdout;
void help_and_exit(const char *program_name) {
  print_usage(program_name);
  fputs("  -f, --foreground      Do not fork, but run in the foreground.\n"
        "  -c, --conf (file)     Specify an alternate configuration file "
        "location. The default\n"
        "      --config (file)   is at \"/etc/qotd.conf\".\n"
        "  -N, --noconf          Do not read from a configuration file, but "
        "use the default\n"
        "      --noconfig        options instead.\n"
        "      --lax             When parsing the configuration, don't check "
        "file permissions\n"
        "                        or perform other security checks.\n",
        stdout);
  fputs("  -P, --pidfile (file)  Override the pidfile name given in the "
        "configuration file with\n"
        "                        the given file instead.\n"
        "  -s, --quotes (file)   Override the quotes file given in the "
        "configuration file with\n"
        "                        the given filename instead.\n"
        "  -j, --journal (file)  Override the journal file given in the "
        "configuration file with\n"
        "                        the given filename instead.\n"
        "  -4, --ipv4            Only listen on IPv4.\n",
        stdout);
  fputs("  -6, --ipv6            Only listen on IPv6. (By default the daemon "
        "listens on both)\n"
        "  -t, --tcp             Use TCP. This is the default behavior.\n"
        "  -u, --udp             Use UDP instead of TCP. (Not fully "
        "implemented yet)\n"
        "  -q, --quiet           Only output error messages. This is the "
        "essentially the same as\n"
        "                        using \"--journal /dev/null\".\n"
        "  --help                List all options and what they do.\n"
        "  --version             Print the version and some basic license "
        "information.\n",
        stdout);
  cleanup(EXIT_SUCCESS, 0);
}


x86 assembly (clang, -O0):
<help_and_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <print_usage@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
lea    0xeab(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%esi
lea    0x1068(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%esi
lea    0x121d(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e4d(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <cleanup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_and_exit>:
push   %rbx
call   1050 <print_usage@plt>
mov    0x2ea3(%rip),%rbx
mov    (%rbx),%esi
lea    0xeba(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0x107e(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0x123a(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
pop    %rbx
jmp    1040 <cleanup@plt>

LLVM IR (-O0):
@.str = [466 x i8] c" -f, --foreground Do not fork, but run in the foreground.\0A -c, --conf (file) Specify an alternate configuration file location. The default\0A --config (file) is at \22/etc/qotd.conf\22.\0A -N, --noconf Do not read from a configuration file, but use the default\0A --noconfig options instead.\0A --lax When parsing the configuration, don't check file permissions\0A or perform other security checks.\0A\00"
@stdout = global i32 0
@.str.1 = [458 x i8] c" -P, --pidfile (file) Override the pidfile name given in the configuration file with\0A the given file instead.\0A -s, --quotes (file) Override the quotes file given in the configuration file with\0A the given filename instead.\0A -j, --journal (file) Override the journal file given in the configuration file with\0A the given filename instead.\0A -4, --ipv4 Only listen on IPv4.\0A\00"
@.str.2 = [503 x i8] c" -6, --ipv6 Only listen on IPv6. (By default the daemon listens on both)\0A -t, --tcp Use TCP. This is the default behavior.\0A -u, --udp Use UDP instead of TCP. (Not fully implemented yet)\0A -q, --quiet Only output error messages. This is the essentially the same as\0A using \22--journal /dev/null\22.\0A --help List all options and what they do.\0A --version Print the version and some basic license information.\0A\00"
@EXIT_SUCCESS = global i32 0
define void @help_and_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @print_usage(i8* %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fputs(i8* getelementptr inbounds ([466 x i8], [466 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @stdout
%8 = call i32 @fputs(i8* getelementptr inbounds ([458 x i8], [458 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @stdout
%10 = call i32 @fputs(i8* getelementptr inbounds ([503 x i8], [503 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @EXIT_SUCCESS
%12 = call i32 @cleanup(i32 %11, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [466 x i8] c" -f, --foreground Do not fork, but run in the foreground.\0A -c, --conf (file) Specify an alternate configuration file location. The default\0A --config (file) is at \22/etc/qotd.conf\22.\0A -N, --noconf Do not read from a configuration file, but use the default\0A --noconfig options instead.\0A --lax When parsing the configuration, don't check file permissions\0A or perform other security checks.\0A\00"
@stdout = global i32 0
@.str.1 = [458 x i8] c" -P, --pidfile (file) Override the pidfile name given in the configuration file with\0A the given file instead.\0A -s, --quotes (file) Override the quotes file given in the configuration file with\0A the given filename instead.\0A -j, --journal (file) Override the journal file given in the configuration file with\0A the given filename instead.\0A -4, --ipv4 Only listen on IPv4.\0A\00"
@.str.2 = [503 x i8] c" -6, --ipv6 Only listen on IPv6. (By default the daemon listens on both)\0A -t, --tcp Use TCP. This is the default behavior.\0A -u, --udp Use UDP instead of TCP. (Not fully implemented yet)\0A -q, --quiet Only output error messages. This is the essentially the same as\0A using \22--journal /dev/null\22.\0A --help List all options and what they do.\0A --version Print the version and some basic license information.\0A\00"
@EXIT_SUCCESS = global i32 0
define void @help_and_exit(i8* %0) {
%2 = tail call i32 @print_usage(i8* %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([466 x i8], [466 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fputs(i8* getelementptr inbounds ([458 x i8], [458 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @stdout
%8 = tail call i32 @fputs(i8* getelementptr inbounds ([503 x i8], [503 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @EXIT_SUCCESS
%10 = tail call i32 @cleanup(i32 %9, i32 0)
ret void
}