#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*/ esc_prn(char *, char *, char *, char *, char *);
int help_relay(int argc, char **argv) {
  char *s[2] = {"[{Uip1}:]{Uport1} [{Uip2}:]{Uport2}", "{Uip1} and {Uip2}"};
  esc_prn(
      "\n{Hrelay} {UARG}\n"
      "  The relay command allows the VPCS to become a virtual patch panel "
      "where\n"
      "  connections can be dynamically changed using the {Hrelay} command.\n"
      "  There are three steps required to use VPCS as a virtual patch panel.\n"
      "  1. A relay {Hhub port} must be defined using the {Hrelay port} "
      "{Uport} command.\n"
      "  2. Remote NIO_UDP connections (cloud connections in GNS3) use this "
      "{Hhub}\n"
      "     {Hport} as the remote port, ensuring each NIO_UDP connection has a "
      "unique \n"
      "     {Hlocal} port (The local {Hport} numbers will be used to 'patch' "
      "the\n"
      "     connection). VPC instances can be directed to use this hub port "
      "as\n"
      "     their remote port using the command {Hset rport} {Uport}.\n"
      "  3. The 'patching' is completed using the command:\n"
      "     {Hrelay add} [{Uip1}:]{Uport1} [{Uip2}:]{Uport2}, where {Uport1} "
      "and {Uport2} are the\n"
      "     {Hlocal} port numbers used in step 2.\n"
      "  ARG:\n"
      "     {Hadd} %s   Relay the packets between %s\n"
      "     {Hdel} %s   Delete the relay rule\n"
      "     {Hdel} {Uid}                        Delete the relay rule\n"
      "     {Hdump} [{Hon}|{Hoff}]                 Dump relay packets to file\n"
      "     {Hport} {Uport}                     Set relay hub port\n"
      "     {Hshow}                          Show the relay rules\n"
      "  Note: %s are 127.0.0.1 by default\n",
      s[0], s[1], s[0], s[1]);
  return 1;
}


x86 assembly (clang, -O0):
<help_relay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2cea(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2ce7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xeea(%rip),%rdi
call   1030 <esc_prn@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_relay>:
push   %rax
lea    0xf1e(%rip),%rdi
lea    0xee1(%rip),%rcx
lea    0xefe(%rip),%rdx
mov    %rcx,%rsi
mov    %rdx,%r8
call   1030 <esc_prn@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"[{Uip1}:]{Uport1} [{Uip2}:]{Uport2}\00"
@.str.1 = [18 x i8] c"{Uip1} and {Uip2}\00"
@__const.help_relay.s = [2 x i8*] [i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i32 0, i32 0)]
@.str.2 = [1246 x i8] c"\0A{Hrelay} {UARG}\0A The relay command allows the VPCS to become a virtual patch panel where\0A connections can be dynamically changed using the {Hrelay} command.\0A There are three steps required to use VPCS as a virtual patch panel.\0A 1. A relay {Hhub port} must be defined using the {Hrelay port} {Uport} command.\0A 2. Remote NIO_UDP connections (cloud connections in GNS3) use this {Hhub}\0A {Hport} as the remote port, ensuring each NIO_UDP connection has a unique \0A {Hlocal} port (The local {Hport} numbers will be used to 'patch' the\0A connection). VPC instances can be directed to use this hub port as\0A their remote port using the command {Hset rport} {Uport}.\0A 3. The 'patching' is completed using the command:\0A {Hrelay add} [{Uip1}:]{Uport1} [{Uip2}:]{Uport2}, where {Uport1} and {Uport2} are the\0A {Hlocal} port numbers used in step 2.\0A ARG:\0A {Hadd} %s Relay the packets between %s\0A {Hdel} %s Delete the relay rule\0A {Hdel} {Uid} Delete the relay rule\0A {Hdump} [{Hon}|{Hoff}] Dump relay packets to file\0A {Hport} {Uport} Set relay hub port\0A {Hshow} Show the relay rules\0A Note: %s are 127.0.0.1 by default\0A\00"
define i32 @help_relay(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [2 x i8*]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = bitcast [2 x i8*]* %5 to i8*
%7 = getelementptr inbounds [2 x i8*], [2 x i8*]* %5, i64 0, i64 0
%8 = load i8*, i8** %7
%9 = getelementptr inbounds [2 x i8*], [2 x i8*]* %5, i64 0, i64 1
%10 = load i8*, i8** %9
%11 = getelementptr inbounds [2 x i8*], [2 x i8*]* %5, i64 0, i64 0
%12 = load i8*, i8** %11
%13 = getelementptr inbounds [2 x i8*], [2 x i8*]* %5, i64 0, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @esc_prn(i8* getelementptr inbounds ([1246 x i8], [1246 x i8]* @.str.2, i64 0, i64 0), i8* %8, i8* %10, i8* %12, i8* %14)
ret i32 1
}

LLVM IR (-O2):
@.str = [36 x i8] c"[{Uip1}:]{Uport1} [{Uip2}:]{Uport2}\00"
@.str.1 = [18 x i8] c"{Uip1} and {Uip2}\00"
@.str.2 = [1246 x i8] c"\0A{Hrelay} {UARG}\0A The relay command allows the VPCS to become a virtual patch panel where\0A connections can be dynamically changed using the {Hrelay} command.\0A There are three steps required to use VPCS as a virtual patch panel.\0A 1. A relay {Hhub port} must be defined using the {Hrelay port} {Uport} command.\0A 2. Remote NIO_UDP connections (cloud connections in GNS3) use this {Hhub}\0A {Hport} as the remote port, ensuring each NIO_UDP connection has a unique \0A {Hlocal} port (The local {Hport} numbers will be used to 'patch' the\0A connection). VPC instances can be directed to use this hub port as\0A their remote port using the command {Hset rport} {Uport}.\0A 3. The 'patching' is completed using the command:\0A {Hrelay add} [{Uip1}:]{Uport1} [{Uip2}:]{Uport2}, where {Uport1} and {Uport2} are the\0A {Hlocal} port numbers used in step 2.\0A ARG:\0A {Hadd} %s Relay the packets between %s\0A {Hdel} %s Delete the relay rule\0A {Hdel} {Uid} Delete the relay rule\0A {Hdump} [{Hon}|{Hoff}] Dump relay packets to file\0A {Hport} {Uport} Set relay hub port\0A {Hshow} Show the relay rules\0A Note: %s are 127.0.0.1 by default\0A\00"
define i32 @help_relay(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @esc_prn(i8* getelementptr inbounds ([1246 x i8], [1246 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}