#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 *, char const *);
int /*<<< orphan*/ stderr;
void __attribute__((noreturn)) usage(const char *filepath) {
  fprintf(stderr,
          "\nUsage: %s [options] hostname\n"
          "\nwhere options are:\n"
          "  -4:   only IPv4\n"
          "  -6:   only IPv6\n"
          "  -h:   show this message\n"
          "  -c N: number of packets for each test\n"
          "  -C:   use cmsg to set tstamp recording options\n"
          "  -D:   no delay between packets\n"
          "  -F:   poll() waits forever for an event\n"
          "  -I:   request PKTINFO\n"
          "  -l N: send N bytes at a time\n"
          "  -L    listen on hostname and port\n"
          "  -n:   set no-payload option\n"
          "  -p N: connect to port N\n"
          "  -P:   use PF_PACKET\n"
          "  -r:   use raw\n"
          "  -R:   use raw (IP_HDRINCL)\n"
          "  -u:   use udp\n"
          "  -v:   validate SND delay (usec)\n"
          "  -V:   validate ACK delay (usec)\n"
          "  -x:   show payload (up to 70 bytes)\n",
          filepath);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [613 x i8] c"\0AUsage: %s [options] hostname\0A\0Awhere options are:\0A -4: only IPv4\0A -6: only IPv6\0A -h: show this message\0A -c N: number of packets for each test\0A -C: use cmsg to set tstamp recording options\0A -D: no delay between packets\0A -F: poll() waits forever for an event\0A -I: request PKTINFO\0A -l N: send N bytes at a time\0A -L listen on hostname and port\0A -n: set no-payload option\0A -p N: connect to port N\0A -P: use PF_PACKET\0A -r: use raw\0A -R: use raw (IP_HDRINCL)\0A -u: use udp\0A -v: validate SND delay (usec)\0A -V: validate ACK delay (usec)\0A -x: show payload (up to 70 bytes)\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([613 x i8], [613 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [613 x i8] c"\0AUsage: %s [options] hostname\0A\0Awhere options are:\0A -4: only IPv4\0A -6: only IPv6\0A -h: show this message\0A -c N: number of packets for each test\0A -C: use cmsg to set tstamp recording options\0A -D: no delay between packets\0A -F: poll() waits forever for an event\0A -I: request PKTINFO\0A -l N: send N bytes at a time\0A -L listen on hostname and port\0A -n: set no-payload option\0A -p N: connect to port N\0A -P: use PF_PACKET\0A -r: use raw\0A -R: use raw (IP_HDRINCL)\0A -u: use udp\0A -v: validate SND delay (usec)\0A -V: validate ACK delay (usec)\0A -x: show payload (up to 70 bytes)\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([613 x i8], [613 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}