#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*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int print_usage(const char *name) {
  fprintf(
      stderr,
      "Usage: %s [options] <master> [[~]<slave1> [[~]<slave2> [...]]]\n"
      "\nNote: to use server features only (no relaying) set master to '.'\n"
      "\nFeatures:\n"
      "	-A		Automatic relay (defaults: RrelayDrelayNsr)\n"
      "	-S		Automatic server (defaults: RserverDserver)\n"
      "	-R <mode>	Enable Router Discovery support (RD)\n"
      "	   relay	relay mode\n"
      "	   server	mini-server for Router Discovery on slaves\n"
      "	-D <mode>	Enable DHCPv6-support\n"
      "	   relay	standards-compliant relay\n"
      "	   server	server for DHCPv6 + PD on slaves\n"
      "	-N		Enable Neighbor Discovery Proxy (NDP)\n"
      "\nFeature options:\n"
      "	-s		Send initial RD-Solicitation to <master>\n"
      "	-u		RD: Assume default router even with ULA only\n"
      "	-c		RD: ULA-compatibility with broken devices\n"
      "	-m <mode>	RD: Address Management Level\n"
      "	   0 (default)	enable SLAAC and don't send Managed-Flag\n"
      "	   1		enable SLAAC and send Managed-Flag\n"
      "	   2		disable SLAAC and send Managed-Flag\n"
      "	-o		RD: Don't send on-link flag for prefixes\n"
      "	-i <preference>	RD: Route info and default preference\n"
      "	   medium	medium priority (default)\n"
      "	   low		low priority\n"
      "	   high		high priority\n"
      "	-n [server]	RD/DHCPv6: always rewrite name server\n"
      "	-l <file>,<cmd>	DHCPv6: IA lease-file and update callback\n"
      "	-a <duid>:<val>	DHCPv6: IA_NA static assignment\n"
      "	-r		NDP: learn routes to neighbors\n"
      "	-t <p>/<l>:<if>	NDP: define a static NDP-prefix on <if>\n"
      "	slave prefix ~	NDP: don't proxy NDP for hosts and only\n"
      "			serve NDP for DAD and traffic to router\n"
      "\nInvocation options:\n"
      "	-p <pidfile>	Set pidfile (/var/run/6relayd.pid)\n"
      "	-d		Daemonize\n"
      "	-v		Increase logging verbosity\n"
      "	-h		Show this help\n\n",
      name);
  return 1;
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [1535 x i8] c"Usage: %s [options] <master> [[~]<slave1> [[~]<slave2> [...]]]\0A\0ANote: to use server features only (no relaying) set master to '.'\0A\0AFeatures:\0A\09-A\09\09Automatic relay (defaults: RrelayDrelayNsr)\0A\09-S\09\09Automatic server (defaults: RserverDserver)\0A\09-R <mode>\09Enable Router Discovery support (RD)\0A\09 relay\09relay mode\0A\09 server\09mini-server for Router Discovery on slaves\0A\09-D <mode>\09Enable DHCPv6-support\0A\09 relay\09standards-compliant relay\0A\09 server\09server for DHCPv6 + PD on slaves\0A\09-N\09\09Enable Neighbor Discovery Proxy (NDP)\0A\0AFeature options:\0A\09-s\09\09Send initial RD-Solicitation to <master>\0A\09-u\09\09RD: Assume default router even with ULA only\0A\09-c\09\09RD: ULA-compatibility with broken devices\0A\09-m <mode>\09RD: Address Management Level\0A\09 0 (default)\09enable SLAAC and don't send Managed-Flag\0A\09 1\09\09enable SLAAC and send Managed-Flag\0A\09 2\09\09disable SLAAC and send Managed-Flag\0A\09-o\09\09RD: Don't send on-link flag for prefixes\0A\09-i <preference>\09RD: Route info and default preference\0A\09 medium\09medium priority (default)\0A\09 low\09\09low priority\0A\09 high\09\09high priority\0A\09-n [server]\09RD/DHCPv6: always rewrite name server\0A\09-l <file>,<cmd>\09DHCPv6: IA lease-file and update callback\0A\09-a <duid>:<val>\09DHCPv6: IA_NA static assignment\0A\09-r\09\09NDP: learn routes to neighbors\0A\09-t <p>/<l>:<if>\09NDP: define a static NDP-prefix on <if>\0A\09slave prefix ~\09NDP: don't proxy NDP for hosts and only\0A\09\09\09serve NDP for DAD and traffic to router\0A\0AInvocation options:\0A\09-p <pidfile>\09Set pidfile (/var/run/6relayd.pid)\0A\09-d\09\09Daemonize\0A\09-v\09\09Increase logging verbosity\0A\09-h\09\09Show this help\0A\0A\00"
define i32 @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([1535 x i8], [1535 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [1535 x i8] c"Usage: %s [options] <master> [[~]<slave1> [[~]<slave2> [...]]]\0A\0ANote: to use server features only (no relaying) set master to '.'\0A\0AFeatures:\0A\09-A\09\09Automatic relay (defaults: RrelayDrelayNsr)\0A\09-S\09\09Automatic server (defaults: RserverDserver)\0A\09-R <mode>\09Enable Router Discovery support (RD)\0A\09 relay\09relay mode\0A\09 server\09mini-server for Router Discovery on slaves\0A\09-D <mode>\09Enable DHCPv6-support\0A\09 relay\09standards-compliant relay\0A\09 server\09server for DHCPv6 + PD on slaves\0A\09-N\09\09Enable Neighbor Discovery Proxy (NDP)\0A\0AFeature options:\0A\09-s\09\09Send initial RD-Solicitation to <master>\0A\09-u\09\09RD: Assume default router even with ULA only\0A\09-c\09\09RD: ULA-compatibility with broken devices\0A\09-m <mode>\09RD: Address Management Level\0A\09 0 (default)\09enable SLAAC and don't send Managed-Flag\0A\09 1\09\09enable SLAAC and send Managed-Flag\0A\09 2\09\09disable SLAAC and send Managed-Flag\0A\09-o\09\09RD: Don't send on-link flag for prefixes\0A\09-i <preference>\09RD: Route info and default preference\0A\09 medium\09medium priority (default)\0A\09 low\09\09low priority\0A\09 high\09\09high priority\0A\09-n [server]\09RD/DHCPv6: always rewrite name server\0A\09-l <file>,<cmd>\09DHCPv6: IA lease-file and update callback\0A\09-a <duid>:<val>\09DHCPv6: IA_NA static assignment\0A\09-r\09\09NDP: learn routes to neighbors\0A\09-t <p>/<l>:<if>\09NDP: define a static NDP-prefix on <if>\0A\09slave prefix ~\09NDP: don't proxy NDP for hosts and only\0A\09\09\09serve NDP for DAD and traffic to router\0A\0AInvocation options:\0A\09-p <pidfile>\09Set pidfile (/var/run/6relayd.pid)\0A\09-d\09\09Daemonize\0A\09-v\09\09Increase logging verbosity\0A\09-h\09\09Show this help\0A\0A\00"
define i32 @print_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([1535 x i8], [1535 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 1
}