#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void help(const char *program) {
  fprintf(stderr, "icmptunnel %s.\n", "0.1-beta");
  fprintf(stderr, "usage: %s [options] -s|server\n\n", program);
  fprintf(stderr, "  -v               print version and exit.\n");
  fprintf(stderr, "  -h               print help and exit.\n");
  fprintf(stderr, "  -k <interval>    interval between keep-alive packets.\n");
  fprintf(stderr, "                   the default interval is %i seconds.\n",
          5);
  fprintf(stderr, "  -r <retries>     packet retry limit before timing out.\n");
  fprintf(stderr, "                   the default is %i retries.\n", 5);
  fprintf(stderr,
          "  -m <mtu>         max frame size of the tunnel interface.\n");
  fprintf(stderr, "                   the default tunnel mtu is %i bytes.\n",
          1500);
  fprintf(stderr, "  -e               emulate the microsoft ping utility.\n");
  fprintf(stderr, "  -d               run in the background as a daemon.\n");
  fprintf(stderr, "  -s               run in server-mode.\n");
  fprintf(stderr, "  server           run in client-mode, using the server "
                  "ip/hostname.\n\n");
  exit(0);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
lea    0xecd(%rip),%rdx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xebb(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e5d(%rip),%rax
mov    (%rax),%edi
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
lea    0xeeb(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e2f(%rip),%rax
mov    (%rax),%edi
lea    0xf0d(%rip),%rsi
mov    $0x5,%edx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e13(%rip),%rax
mov    (%rax),%edi
lea    0xf29(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2dfc(%rip),%rax
mov    (%rax),%edi
lea    0xf4c(%rip),%rsi
mov    $0x5,%edx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2de0(%rip),%rax
mov    (%rax),%edi
lea    0xf5f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2dc9(%rip),%rax
mov    (%rax),%edi
lea    0xf84(%rip),%rsi
mov    $0x5dc,%edx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2dad(%rip),%rax
mov    (%rax),%edi
lea    0xfa0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d96(%rip),%rax
mov    (%rax),%edi
lea    0xfc1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d7f(%rip),%rax
mov    (%rax),%edi
lea    0xfe1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d68(%rip),%rax
mov    (%rax),%edi
lea    0xff2(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    0x2eb2(%rip),%rbx
mov    (%rbx),%edi
lea    0xec9(%rip),%rsi
lea    0xed2(%rip),%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xecb(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef4(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf0d(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf36(%rip),%rsi
mov    $0x5,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf59(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf83(%rip),%rsi
mov    $0x5,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf9d(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfc9(%rip),%rsi
mov    $0x5dc,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfec(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1014(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x103b(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1053(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"icmptunnel %s.\0A\00"
@.str.1 = [9 x i8] c"0.1-beta\00"
@.str.2 = [32 x i8] c"usage: %s [options] -s|server\0A\0A\00"
@.str.3 = [44 x i8] c" -v print version and exit.\0A\00"
@.str.4 = [41 x i8] c" -h print help and exit.\0A\00"
@.str.5 = [57 x i8] c" -k <interval> interval between keep-alive packets.\0A\00"
@.str.6 = [56 x i8] c" the default interval is %i seconds.\0A\00"
@.str.7 = [58 x i8] c" -r <retries> packet retry limit before timing out.\0A\00"
@.str.8 = [47 x i8] c" the default is %i retries.\0A\00"
@.str.9 = [60 x i8] c" -m <mtu> max frame size of the tunnel interface.\0A\00"
@.str.10 = [56 x i8] c" the default tunnel mtu is %i bytes.\0A\00"
@.str.11 = [56 x i8] c" -e emulate the microsoft ping utility.\0A\00"
@.str.12 = [55 x i8] c" -d run in the background as a daemon.\0A\00"
@.str.13 = [40 x i8] c" -s run in server-mode.\0A\00"
@.str.14 = [71 x i8] c" server run in client-mode, using the server ip/hostname.\0A\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %2
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.6, i64 0, i64 0), i32 5)
%16 = load i32, i32* @stderr
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.7, i64 0, i64 0))
%18 = load i32, i32* @stderr
%19 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0), i32 5)
%20 = load i32, i32* @stderr
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
%22 = load i32, i32* @stderr
%23 = call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.10, i64 0, i64 0), i32 1500)
%24 = load i32, i32* @stderr
%25 = call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.11, i64 0, i64 0))
%26 = load i32, i32* @stderr
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.12, i64 0, i64 0))
%28 = load i32, i32* @stderr
%29 = call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.13, i64 0, i64 0))
%30 = load i32, i32* @stderr
%31 = call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.14, i64 0, i64 0))
%32 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"icmptunnel %s.\0A\00"
@.str.1 = [9 x i8] c"0.1-beta\00"
@.str.2 = [32 x i8] c"usage: %s [options] -s|server\0A\0A\00"
@.str.3 = [44 x i8] c" -v print version and exit.\0A\00"
@.str.4 = [41 x i8] c" -h print help and exit.\0A\00"
@.str.5 = [57 x i8] c" -k <interval> interval between keep-alive packets.\0A\00"
@.str.6 = [56 x i8] c" the default interval is %i seconds.\0A\00"
@.str.7 = [58 x i8] c" -r <retries> packet retry limit before timing out.\0A\00"
@.str.8 = [47 x i8] c" the default is %i retries.\0A\00"
@.str.9 = [60 x i8] c" -m <mtu> max frame size of the tunnel interface.\0A\00"
@.str.10 = [56 x i8] c" the default tunnel mtu is %i bytes.\0A\00"
@.str.11 = [56 x i8] c" -e emulate the microsoft ping utility.\0A\00"
@.str.12 = [55 x i8] c" -d run in the background as a daemon.\0A\00"
@.str.13 = [40 x i8] c" -s run in server-mode.\0A\00"
@.str.14 = [71 x i8] c" server run in client-mode, using the server ip/hostname.\0A\0A\00"
define void @help(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.6, i64 0, i64 0), i32 5)
%14 = load i32, i32* @stderr
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.7, i64 0, i64 0))
%16 = load i32, i32* @stderr
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0), i32 5)
%18 = load i32, i32* @stderr
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
%20 = load i32, i32* @stderr
%21 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.10, i64 0, i64 0), i32 1500)
%22 = load i32, i32* @stderr
%23 = tail call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.11, i64 0, i64 0))
%24 = load i32, i32* @stderr
%25 = tail call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.12, i64 0, i64 0))
%26 = load i32, i32* @stderr
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.13, i64 0, i64 0))
%28 = load i32, i32* @stderr
%29 = tail call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.14, i64 0, i64 0))
%30 = tail call i32 @exit(i32 0)
unreachable
}