#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*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stdout;
void __attribute__((noreturn)) usage_and_exit(int status) {
  fprintf(
      stdout,
      "Usage: llmnrd [OPTIONS]\n"
      "Options:\n"
      "  -H, --hostname NAME  set hostname to respond with (default: system "
      "hostname)\n"
      "  -i, --interface DEV  bind socket to a specific interface, e.g. eth0\n"
      "  -p, --port NUM       set port number to listen on (default: %d)\n"
      "  -6, --ipv6           enable LLMNR name resolution over IPv6\n"
      "  -d, --daemonize      run as daemon in the background\n"
      "  -h, --help           show this help and exit\n"
      "  -V, --version        show version information and exit\n",
      5355);
  exit(status);
}


x86 assembly (clang, -O0):
<usage_and_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
mov    $0x14eb,%edx
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage_and_exit>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
mov    $0x14eb,%edx
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [470 x i8] c"Usage: llmnrd [OPTIONS]\0AOptions:\0A -H, --hostname NAME set hostname to respond with (default: system hostname)\0A -i, --interface DEV bind socket to a specific interface, e.g. eth0\0A -p, --port NUM set port number to listen on (default: %d)\0A -6, --ipv6 enable LLMNR name resolution over IPv6\0A -d, --daemonize run as daemon in the background\0A -h, --help show this help and exit\0A -V, --version show version information and exit\0A\00"
define void @usage_and_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([470 x i8], [470 x i8]* @.str, i64 0, i64 0), i32 5355)
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [470 x i8] c"Usage: llmnrd [OPTIONS]\0AOptions:\0A -H, --hostname NAME set hostname to respond with (default: system hostname)\0A -i, --interface DEV bind socket to a specific interface, e.g. eth0\0A -p, --port NUM set port number to listen on (default: %d)\0A -6, --ipv6 enable LLMNR name resolution over IPv6\0A -d, --daemonize run as daemon in the background\0A -h, --help show this help and exit\0A -V, --version show version information and exit\0A\00"
define void @usage_and_exit(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([470 x i8], [470 x i8]* @.str, i64 0, i64 0), i32 5355)
%4 = tail call i32 @exit(i32 %0)
unreachable
}