#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 EXIT_FAILURE;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void usage(char *program_name, int exit_value) {
  FILE *stream = stdout;
  if (exit_value == EXIT_FAILURE)
    stream = stderr;
  fprintf(stream,
          "%s [OPTION]\n"
          "\t-I if_name\tInterface name of the source host\n"
          "\t-S ip_addr\tIPv6 address of the source host\n"
          "\t-M mac_addr\tMAC address of the destination host\n"
          "\t-D ip_addr\tIPv6 address of the destination host\n"
          "\t-t value\ttimeout [sec]\n"
          "\t-w value\tinterval [nanosec]\n"
          "\t-o\t\tsend only one ICMPv6 message\n"
          "\t-b\t\twork in the background\n"
          "\t-d\t\tdisplay debug informations\n"
          "\t-h\t\tdisplay this usage\n"
          "\n"
          "\t[options for echo request]\n"
          "\t  -s packetsize\tsize of data (exclude header)\n"
          "\n"
          "\t[options for fake]\n"
          "\t  -i\t\tbreak IPv6 destination address\n"
          "\t  -L\t\tbreak payload length\n"
          "\t  -n\t\tbreak next header\n"
          "\t  -v\t\tbreak IP version\n"
          "\n"
          "\t[options for MLDv2 query]\n"
          "\t  -m\t\tsend MLDv2 query\n"
          "\t  -a addrs\tcomma separated array of Source Addresses\n"
          "\t  -r value\tMax Resp Code\n",
          program_name);
  exit(exit_value);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e91(%rip),%rcx
cmp    (%rcx),%eax
jne    115d <usage+0x3d>
mov    0x2e8a(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2eab(%rip),%rax
cmp    %esi,(%rax)
jne    113a <usage+0x1a>
mov    0x2ea8(%rip),%rax
jmp    1141 <usage+0x21>
mov    0x2e8f(%rip),%rax
mov    (%rax),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32* null
@EXIT_FAILURE = global i32 0
@stderr = global i32* null
@.str = [716 x i8] c"%s [OPTION]\0A\09-I if_name\09Interface name of the source host\0A\09-S ip_addr\09IPv6 address of the source host\0A\09-M mac_addr\09MAC address of the destination host\0A\09-D ip_addr\09IPv6 address of the destination host\0A\09-t value\09timeout [sec]\0A\09-w value\09interval [nanosec]\0A\09-o\09\09send only one ICMPv6 message\0A\09-b\09\09work in the background\0A\09-d\09\09display debug informations\0A\09-h\09\09display this usage\0A\0A\09[options for echo request]\0A\09 -s packetsize\09size of data (exclude header)\0A\0A\09[options for fake]\0A\09 -i\09\09break IPv6 destination address\0A\09 -L\09\09break payload length\0A\09 -n\09\09break next header\0A\09 -v\09\09break IP version\0A\0A\09[options for MLDv2 query]\0A\09 -m\09\09send MLDv2 query\0A\09 -a addrs\09comma separated array of Source Addresses\0A\09 -r value\09Max Resp Code\0A\00"
define void @usage(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32*, i32** @stdout
store i32* %6, i32** %5
%7 = load i32, i32* %4
%8 = load i32, i32* @EXIT_FAILURE
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32*, i32** @stderr
store i32* %11, i32** %5
br label %12
12: ; preds = %10, %2
%13 = load i32*, i32** %5
%14 = load i8*, i8** %3
%15 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([716 x i8], [716 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* %4
%17 = call i32 @exit(i32 %16)
unreachable
}

LLVM IR (-O2):
@stdout = global i32* null
@EXIT_FAILURE = global i32 0
@stderr = global i32* null
@.str = [716 x i8] c"%s [OPTION]\0A\09-I if_name\09Interface name of the source host\0A\09-S ip_addr\09IPv6 address of the source host\0A\09-M mac_addr\09MAC address of the destination host\0A\09-D ip_addr\09IPv6 address of the destination host\0A\09-t value\09timeout [sec]\0A\09-w value\09interval [nanosec]\0A\09-o\09\09send only one ICMPv6 message\0A\09-b\09\09work in the background\0A\09-d\09\09display debug informations\0A\09-h\09\09display this usage\0A\0A\09[options for echo request]\0A\09 -s packetsize\09size of data (exclude header)\0A\0A\09[options for fake]\0A\09 -i\09\09break IPv6 destination address\0A\09 -L\09\09break payload length\0A\09 -n\09\09break next header\0A\09 -v\09\09break IP version\0A\0A\09[options for MLDv2 query]\0A\09 -m\09\09send MLDv2 query\0A\09 -a addrs\09comma separated array of Source Addresses\0A\09 -r value\09Max Resp Code\0A\00"
define void @usage(i8* %0, i32 %1) {
%3 = load i32, i32* @EXIT_FAILURE
%4 = icmp eq i32 %3, %1
%5 = load i32*, i32** @stderr
%6 = load i32*, i32** @stdout
%7 = select i1 %4, i32* %5, i32* %6
%8 = tail call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([716 x i8], [716 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 %1)
unreachable
}