#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 /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void show_usage(void) {
  printf(
      "usage: hping host [options]\n"
      "  -h  --help      show this help\n"
      "  -v  --version   show version\n"
      "  -c  --count     packet count\n"
      "  -i  --interval  wait (uX for X microseconds, for example -i u1000)\n"
      "      --fast      alias for -i u10000 (10 packets for second)\n"
      "  -n  --numeric   numeric output\n"
      "  -q  --quiet     quiet\n"
      "  -I  --interface interface name (otherwise default routing interface)\n"
      "  -V  --verbose   verbose mode\n"
      "  -D  --debug     debugging info\n"
      "  -z  --bind      bind ctrl+z to ttl           (default to dst port)\n"
      "  -Z  --unbind    unbind ctrl+z\n"
      "Mode\n"
      "  default mode     TCP\n"
      "  -0  --rawip      RAW IP mode\n"
      "  -1  --icmp       ICMP mode\n"
      "  -2  --udp        UDP mode\n"
      "  -8  --scan       SCAN mode.\n"
      "                   Example: hping --scan 1-30,70-90 -S www.target.host\n"
      "  -9  --listen     listen mode\n"
      "IP\n"
      "  -a  --spoof      spoof source address\n"
      "  --rand-dest      random destionation address mode. see the man.\n"
      "  --rand-source    random source address mode. see the man.\n"
      "  -t  --ttl        ttl (default 64)\n"
      "  -N  --id         id (default random)\n"
      "  -W  --winid      use win* id byte ordering\n"
      "  -r  --rel        relativize id field          (to estimate host "
      "traffic)\n"
      "  -f  --frag       split packets in more frag.  (may pass weak acl)\n"
      "  -x  --morefrag   set more fragments flag\n"
      "  -y  --dontfrag   set dont fragment flag\n"
      "  -g  --fragoff    set the fragment offset\n"
      "  -m  --mtu        set virtual mtu, implies --frag if packet size > "
      "mtu\n"
      "  -o  --tos        type of service (default 0x00), try --tos help\n"
      "  -G  --rroute     includes RECORD_ROUTE option and display the route "
      "buffer\n"
      "  --lsrr           loose source routing and record route\n"
      "  --ssrr           strict source routing and record route\n"
      "  -H  --ipproto    set the IP protocol field, only in RAW IP mode\n"
      "ICMP\n"
      "  -C  --icmptype   icmp type (default echo request)\n"
      "  -K  --icmpcode   icmp code (default 0)\n"
      "      --force-icmp send all icmp types (default send only supported "
      "types)\n"
      "      --icmp-gw    set gateway address for ICMP redirect (default "
      "0.0.0.0)\n"
      "      --icmp-ts    Alias for --icmp --icmptype 13 (ICMP timestamp)\n"
      "      --icmp-addr  Alias for --icmp --icmptype 17 (ICMP address subnet "
      "mask)\n"
      "      --icmp-help  display help for others icmp options\n"
      "UDP/TCP\n"
      "  -s  --baseport   base source port             (default random)\n"
      "  -p  --destport   [+][+]<port> destination port(default 0) ctrl+z "
      "inc/dec\n"
      "  -k  --keep       keep still source port\n"
      "  -w  --win        winsize (default 64)\n"
      "  -O  --tcpoff     set fake tcp data offset     (instead of tcphdrlen / "
      "4)\n"
      "  -Q  --seqnum     shows only tcp sequence number\n"
      "  -b  --badcksum   (try to) send packets with a bad IP checksum\n"
      "                   many systems will fix the IP checksum sending the "
      "packet\n"
      "                   so you'll get bad UDP/TCP checksum instead.\n"
      "  -M  --setseq     set TCP sequence number\n"
      "  -L  --setack     set TCP ack\n"
      "  -F  --fin        set FIN flag\n"
      "  -S  --syn        set SYN flag\n"
      "  -R  --rst        set RST flag\n"
      "  -P  --push       set PUSH flag\n"
      "  -A  --ack        set ACK flag\n"
      "  -U  --urg        set URG flag\n"
      "  -X  --xmas       set X unused flag (0x40)\n"
      "  -Y  --ymas       set Y unused flag (0x80)\n"
      "  --tcpexitcode    use last tcp->th_flags as exit code\n"
      "  --tcp-timestamp  enable the TCP timestamp option to guess the "
      "HZ/uptime\n"
      "Common\n"
      "  -d  --data       data size                    (default is 0)\n"
      "  -E  --file       data from file\n"
      "  -e  --sign       add 'signature'\n"
      "  -j  --dump       dump packets in hex\n"
      "  -J  --print      dump printable characters\n"
      "  -B  --safe       enable 'safe' protocol\n"
      "  -u  --end        tell you when --file reached EOF and prevent rewind\n"
      "  -T  --traceroute traceroute mode              (implies --bind and "
      "--ttl 1)\n"
      "  --tr-stop        Exit when receive the first not ICMP in traceroute "
      "mode\n"
      "  --tr-keep-ttl    Keep the source TTL fixed, useful to monitor just "
      "one hop\n"
      "  --tr-no-rtt	    Don't calculate/show RTT information in traceroute "
      "mode\n"
      "ARS packet description (new, unstable)\n"
      "  --apd-send       Send the packet described with APD (see "
      "docs/APD.txt)\n");
  exit(0);
}


x86 assembly (clang, -O0):
<show_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<show_usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [3993 x i8] c"usage: hping host [options]\0A -h --help show this help\0A -v --version show version\0A -c --count packet count\0A -i --interval wait (uX for X microseconds, for example -i u1000)\0A --fast alias for -i u10000 (10 packets for second)\0A -n --numeric numeric output\0A -q --quiet quiet\0A -I --interface interface name (otherwise default routing interface)\0A -V --verbose verbose mode\0A -D --debug debugging info\0A -z --bind bind ctrl+z to ttl (default to dst port)\0A -Z --unbind unbind ctrl+z\0AMode\0A default mode TCP\0A -0 --rawip RAW IP mode\0A -1 --icmp ICMP mode\0A -2 --udp UDP mode\0A -8 --scan SCAN mode.\0A Example: hping --scan 1-30,70-90 -S www.target.host\0A -9 --listen listen mode\0AIP\0A -a --spoof spoof source address\0A --rand-dest random destionation address mode. see the man.\0A --rand-source random source address mode. see the man.\0A -t --ttl ttl (default 64)\0A -N --id id (default random)\0A -W --winid use win* id byte ordering\0A -r --rel relativize id field (to estimate host traffic)\0A -f --frag split packets in more frag. (may pass weak acl)\0A -x --morefrag set more fragments flag\0A -y --dontfrag set dont fragment flag\0A -g --fragoff set the fragment offset\0A -m --mtu set virtual mtu, implies --frag if packet size > mtu\0A -o --tos type of service (default 0x00), try --tos help\0A -G --rroute includes RECORD_ROUTE option and display the route buffer\0A --lsrr loose source routing and record route\0A --ssrr strict source routing and record route\0A -H --ipproto set the IP protocol field, only in RAW IP mode\0AICMP\0A -C --icmptype icmp type (default echo request)\0A -K --icmpcode icmp code (default 0)\0A --force-icmp send all icmp types (default send only supported types)\0A --icmp-gw set gateway address for ICMP redirect (default 0.0.0.0)\0A --icmp-ts Alias for --icmp --icmptype 13 (ICMP timestamp)\0A --icmp-addr Alias for --icmp --icmptype 17 (ICMP address subnet mask)\0A --icmp-help display help for others icmp options\0AUDP/TCP\0A -s --baseport base source port (default random)\0A -p --destport [+][+]<port> destination port(default 0) ctrl+z inc/dec\0A -k --keep keep still source port\0A -w --win winsize (default 64)\0A -O --tcpoff set fake tcp data offset (instead of tcphdrlen / 4)\0A -Q --seqnum shows only tcp sequence number\0A -b --badcksum (try to) send packets with a bad IP checksum\0A many systems will fix the IP checksum sending the packet\0A so you'll get bad UDP/TCP checksum instead.\0A -M --setseq set TCP sequence number\0A -L --setack set TCP ack\0A -F --fin set FIN flag\0A -S --syn set SYN flag\0A -R --rst set RST flag\0A -P --push set PUSH flag\0A -A --ack set ACK flag\0A -U --urg set URG flag\0A -X --xmas set X unused flag (0x40)\0A -Y --ymas set Y unused flag (0x80)\0A --tcpexitcode use last tcp->th_flags as exit code\0A --tcp-timestamp enable the TCP timestamp option to guess the HZ/uptime\0ACommon\0A -d --data data size (default is 0)\0A -E --file data from file\0A -e --sign add 'signature'\0A -j --dump dump packets in hex\0A -J --print dump printable characters\0A -B --safe enable 'safe' protocol\0A -u --end tell you when --file reached EOF and prevent rewind\0A -T --traceroute traceroute mode (implies --bind and --ttl 1)\0A --tr-stop Exit when receive the first not ICMP in traceroute mode\0A --tr-keep-ttl Keep the source TTL fixed, useful to monitor just one hop\0A --tr-no-rtt\09 Don't calculate/show RTT information in traceroute mode\0AARS packet description (new, unstable)\0A --apd-send Send the packet described with APD (see docs/APD.txt)\0A\00"
define void @show_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([3993 x i8], [3993 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [3992 x i8] c"usage: hping host [options]\0A -h --help show this help\0A -v --version show version\0A -c --count packet count\0A -i --interval wait (uX for X microseconds, for example -i u1000)\0A --fast alias for -i u10000 (10 packets for second)\0A -n --numeric numeric output\0A -q --quiet quiet\0A -I --interface interface name (otherwise default routing interface)\0A -V --verbose verbose mode\0A -D --debug debugging info\0A -z --bind bind ctrl+z to ttl (default to dst port)\0A -Z --unbind unbind ctrl+z\0AMode\0A default mode TCP\0A -0 --rawip RAW IP mode\0A -1 --icmp ICMP mode\0A -2 --udp UDP mode\0A -8 --scan SCAN mode.\0A Example: hping --scan 1-30,70-90 -S www.target.host\0A -9 --listen listen mode\0AIP\0A -a --spoof spoof source address\0A --rand-dest random destionation address mode. see the man.\0A --rand-source random source address mode. see the man.\0A -t --ttl ttl (default 64)\0A -N --id id (default random)\0A -W --winid use win* id byte ordering\0A -r --rel relativize id field (to estimate host traffic)\0A -f --frag split packets in more frag. (may pass weak acl)\0A -x --morefrag set more fragments flag\0A -y --dontfrag set dont fragment flag\0A -g --fragoff set the fragment offset\0A -m --mtu set virtual mtu, implies --frag if packet size > mtu\0A -o --tos type of service (default 0x00), try --tos help\0A -G --rroute includes RECORD_ROUTE option and display the route buffer\0A --lsrr loose source routing and record route\0A --ssrr strict source routing and record route\0A -H --ipproto set the IP protocol field, only in RAW IP mode\0AICMP\0A -C --icmptype icmp type (default echo request)\0A -K --icmpcode icmp code (default 0)\0A --force-icmp send all icmp types (default send only supported types)\0A --icmp-gw set gateway address for ICMP redirect (default 0.0.0.0)\0A --icmp-ts Alias for --icmp --icmptype 13 (ICMP timestamp)\0A --icmp-addr Alias for --icmp --icmptype 17 (ICMP address subnet mask)\0A --icmp-help display help for others icmp options\0AUDP/TCP\0A -s --baseport base source port (default random)\0A -p --destport [+][+]<port> destination port(default 0) ctrl+z inc/dec\0A -k --keep keep still source port\0A -w --win winsize (default 64)\0A -O --tcpoff set fake tcp data offset (instead of tcphdrlen / 4)\0A -Q --seqnum shows only tcp sequence number\0A -b --badcksum (try to) send packets with a bad IP checksum\0A many systems will fix the IP checksum sending the packet\0A so you'll get bad UDP/TCP checksum instead.\0A -M --setseq set TCP sequence number\0A -L --setack set TCP ack\0A -F --fin set FIN flag\0A -S --syn set SYN flag\0A -R --rst set RST flag\0A -P --push set PUSH flag\0A -A --ack set ACK flag\0A -U --urg set URG flag\0A -X --xmas set X unused flag (0x40)\0A -Y --ymas set Y unused flag (0x80)\0A --tcpexitcode use last tcp->th_flags as exit code\0A --tcp-timestamp enable the TCP timestamp option to guess the HZ/uptime\0ACommon\0A -d --data data size (default is 0)\0A -E --file data from file\0A -e --sign add 'signature'\0A -j --dump dump packets in hex\0A -J --print dump printable characters\0A -B --safe enable 'safe' protocol\0A -u --end tell you when --file reached EOF and prevent rewind\0A -T --traceroute traceroute mode (implies --bind and --ttl 1)\0A --tr-stop Exit when receive the first not ICMP in traceroute mode\0A --tr-keep-ttl Keep the source TTL fixed, useful to monitor just one hop\0A --tr-no-rtt\09 Don't calculate/show RTT information in traceroute mode\0AARS packet description (new, unstable)\0A --apd-send Send the packet described with APD (see docs/APD.txt)\00"
define void @show_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3992 x i8], [3992 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}