#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-f num\ttprotocol family\n"
          "\t\t  4 : IPv4\n"
          "\t\t  6 : IPv6\n"
          "\t-D addr\tIP address of the destination host\n"
          "\t-p num\tport number of the destination host\n"
          "\t-s size\tdata size of UDP payload\n"
          "\t-t value\ttimeout [sec]\n"
          "\t-o\t\tsend only one UDP datagram\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 multicast]\n"
          "\t  -m\t\tsend multicast datagrams\n"
          "\t  -I if_name\tinterface name of the source host\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 = [432 x i8] c"%s [OPTION]\0A\09-f num\09tprotocol family\0A\09\09 4 : IPv4\0A\09\09 6 : IPv6\0A\09-D addr\09IP address of the destination host\0A\09-p num\09port number of the destination host\0A\09-s size\09data size of UDP payload\0A\09-t value\09timeout [sec]\0A\09-o\09\09send only one UDP datagram\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 multicast]\0A\09 -m\09\09send multicast datagrams\0A\09 -I if_name\09interface name of the source host\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 ([432 x i8], [432 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 = [432 x i8] c"%s [OPTION]\0A\09-f num\09tprotocol family\0A\09\09 4 : IPv4\0A\09\09 6 : IPv6\0A\09-D addr\09IP address of the destination host\0A\09-p num\09port number of the destination host\0A\09-s size\09data size of UDP payload\0A\09-t value\09timeout [sec]\0A\09-o\09\09send only one UDP datagram\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 multicast]\0A\09 -m\09\09send multicast datagrams\0A\09 -I if_name\09interface name of the source host\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 ([432 x i8], [432 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 %1)
unreachable
}