#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\tprotocol family\n"
          "\t\t  4 : IPv4\n"
          "\t\t  6 : IPv6\n"
          "\t-p\tport number\n"
          "\t\tthe port number specified by -p option would be the first port "
          "number\n"
          "\t-b\twork in the background\n"
          "\t-o\tfilename where the server infomation is outputted\n"
          "\t-d\twork in the debug mode\n"
          "\t-h\tdisplay this usage\n"
          ""
          "*) Server works till it receives SIGHUP\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 = [318 x i8] c"%s [OPTION]\0A\09-f\09protocol family\0A\09\09 4 : IPv4\0A\09\09 6 : IPv6\0A\09-p\09port number\0A\09\09the port number specified by -p option would be the first port number\0A\09-b\09work in the background\0A\09-o\09filename where the server infomation is outputted\0A\09-d\09work in the debug mode\0A\09-h\09display this usage\0A*) Server works till it receives SIGHUP\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 ([318 x i8], [318 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 = [318 x i8] c"%s [OPTION]\0A\09-f\09protocol family\0A\09\09 4 : IPv4\0A\09\09 6 : IPv6\0A\09-p\09port number\0A\09\09the port number specified by -p option would be the first port number\0A\09-b\09work in the background\0A\09-o\09filename where the server infomation is outputted\0A\09-d\09work in the debug mode\0A\09-h\09display this usage\0A*) Server works till it receives SIGHUP\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 ([318 x i8], [318 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 %1)
unreachable
}