#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*/ printf(char *);
int usage(const char *path) {
  printf("Usage: %s [options] <IPv6 address> <interface>\n"
         "Looks up an on-link IPv6 node link-layer address (Neighbor "
         "Discovery)\n");
  printf("\n");
  printf("  -1, --single   display first response and exit\n"
         "  -h, --help     display this help and exit\n"
         "  -m, --multiple wait and display all responses\n"
         "  -n, --numeric  don't resolve host names\n"
         "  -q, --quiet    only print the %s (mainly for scripts)\n"
         "  -r, --retry    maximum number of attempts (default: 3)\n"
         "  -s, --source   specify source IPv6 address\n"
         "  -V, --version  display program version and exit\n"
         "  -v, --verbose  verbose display (this is the default)\n"
         "  -w, --wait     how long to wait for a response [ms] (default: "
         "1000)\n");
  return 0;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
lea    0x114a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf3b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf38(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [118 x i8] c"Usage: %s [options] <IPv6 address> <interface>\0ALooks up an on-link IPv6 node link-layer address (Neighbor Discovery)\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [517 x i8] c" -1, --single display first response and exit\0A -h, --help display this help and exit\0A -m, --multiple wait and display all responses\0A -n, --numeric don't resolve host names\0A -q, --quiet only print the %s (mainly for scripts)\0A -r, --retry maximum number of attempts (default: 3)\0A -s, --source specify source IPv6 address\0A -V, --version display program version and exit\0A -v, --verbose verbose display (this is the default)\0A -w, --wait how long to wait for a response [ms] (default: 1000)\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([517 x i8], [517 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [118 x i8] c"Usage: %s [options] <IPv6 address> <interface>\0ALooks up an on-link IPv6 node link-layer address (Neighbor Discovery)\0A\00"
@.str.2 = [517 x i8] c" -1, --single display first response and exit\0A -h, --help display this help and exit\0A -m, --multiple wait and display all responses\0A -n, --numeric don't resolve host names\0A -q, --quiet only print the %s (mainly for scripts)\0A -r, --retry maximum number of attempts (default: 3)\0A -s, --source specify source IPv6 address\0A -V, --version display program version and exit\0A -v, --verbose verbose display (this is the default)\0A -w, --wait how long to wait for a response [ms] (default: 1000)\0A\00"
define i32 @usage(i8* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([118 x i8], [118 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([517 x i8], [517 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}