#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*/ fgetc(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
void usage(char argv[]) {
  fprintf(stdout,
          "\n  Usage: %s <host> [options]\n"
          "\n  -v             Enable verbose output (useful for debugging)"
          "\n  -i             List available interfaces to listen on\n\n",
          argv);
  fprintf(stdout, "\n  Press any key to continue . . .");
  fgetc(stdin);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xeb0(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
lea    0xf30(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
call   1030 <fgetc@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rdx
mov    0x2e9d(%rip),%rbx
mov    (%rbx),%edi
lea    0xebc(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf43(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
call   1030 <fgetc@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [151 x i8] c"\0A Usage: %s <host> [options]\0A\0A -v Enable verbose output (useful for debugging)\0A -i List available interfaces to listen on\0A\0A\00"
@.str.1 = [35 x i8] c"\0A Press any key to continue . . .\00"
@stdin = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stdout
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @stdin
%9 = call i32 @fgetc(i32 %8)
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [151 x i8] c"\0A Usage: %s <host> [options]\0A\0A -v Enable verbose output (useful for debugging)\0A -i List available interfaces to listen on\0A\0A\00"
@.str.1 = [35 x i8] c"\0A Press any key to continue . . .\00"
@stdin = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stdout
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stdin
%7 = tail call i32 @fgetc(i32 %6)
%8 = tail call i32 @exit(i32 0)
unreachable
}