#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);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage_hints(const char *why) {
  if (why)
    fprintf(stderr,
            "\033[31m"
            "Error: %s\n\n"
            "\033[0m",
            why);
  fprintf(stderr,
          "Usage: netsed [option] proto lport rhost rport rule-file\n\n");
  fprintf(
      stderr,
      "  options - can be --ipv4 or -4 to force address resolution in IPv4,\n");
  fprintf(stderr,
          "            --ipv6 or -6 to force address resolution in IPv6,\n");
  fprintf(
      stderr,
      "            --ipany to resolve the address in either IPv4 or IPv6.\n");
  fprintf(stderr,
          "          - --help or -h to display this usage informations.\n");
  fprintf(stderr, "  proto   - protocol specification (tcp or udp)\n");
  fprintf(stderr,
          "  lport   - local port to listen on (see README for transparent\n");
  fprintf(stderr, "            traffic intercepting on some systems)\n");
  fprintf(stderr, "  rhost   - where connection should be forwarded (0 = use "
                  "destination\n");
  fprintf(stderr, "            address of incoming connection, see README)\n");
  fprintf(
      stderr,
      "  rport   - destination port (0 = dst port of incoming connection)\n");
  fprintf(stderr, "  rules   - file containing replacement rules\n\n");
  fprintf(stderr, "Rules are 3 line sets:\n");
  fprintf(stderr, "		Regular Expression");
  fprintf(stderr, "		Replacement Text");
  fprintf(stderr, "		Rule TTL");
  fprintf(
      stderr,
      "Note: Rule TTL requirements need defining, default to -1 (disabled)\n");
  fprintf(stderr, "Rules are not active across packet boundaries, and they are "
                  "evaluated\n");
  fprintf(stderr, "from first to last, as stated on the command line.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage_hints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1152 <usage_hints+0x32>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xeb5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
lea    0xed7(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
lea    0xf06(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e42(%rip),%rax
mov    (%rax),%edi
lea    0xf2e(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e2b(%rip),%rax
mov    (%rax),%edi
lea    0xf5b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e14(%rip),%rax
mov    (%rax),%edi
lea    0xf82(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2dfd(%rip),%rax
mov    (%rax),%edi
lea    0xf9c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2de6(%rip),%rax
mov    (%rax),%edi
lea    0xfc6(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2dcf(%rip),%rax
mov    (%rax),%edi
lea    0xfe2(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2db8(%rip),%rax
mov    (%rax),%edi
lea    0x1012(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2da1(%rip),%rax
mov    (%rax),%edi
lea    0x1034(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d8a(%rip),%rax
mov    (%rax),%edi
lea    0x1061(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d73(%rip),%rax
mov    (%rax),%edi
lea    0x107a(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d5c(%rip),%rax
mov    (%rax),%edi
lea    0x107b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d45(%rip),%rax
mov    (%rax),%edi
lea    0x1079(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d2e(%rip),%rax
mov    (%rax),%edi
lea    0x1075(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d17(%rip),%rax
mov    (%rax),%edi
lea    0x1069(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d00(%rip),%rax
mov    (%rax),%edi
lea    0x1097(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ce9(%rip),%rax
mov    (%rax),%edi
lea    0x10c7(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage_hints>:
push   %rbx
test   %rdi,%rdi
je     1140 <usage_hints+0x20>
mov    %rdi,%rdx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    0x2e99(%rip),%rbx
mov    (%rbx),%edi
lea    0xec5(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef0(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf26(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf55(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf89(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfb7(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfd8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1009(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x102c(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1063(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x108c(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x10c0(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x10e0(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x10e8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x10ed(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x10f0(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x10eb(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1120(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1157(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"\1B[31mError: %s\0A\0A\1B[0m\00"
@.str.1 = [59 x i8] c"Usage: netsed [option] proto lport rhost rport rule-file\0A\0A\00"
@.str.2 = [70 x i8] c" options - can be --ipv4 or -4 to force address resolution in IPv4,\0A\00"
@.str.3 = [63 x i8] c" --ipv6 or -6 to force address resolution in IPv6,\0A\00"
@.str.4 = [68 x i8] c" --ipany to resolve the address in either IPv4 or IPv6.\0A\00"
@.str.5 = [62 x i8] c" - --help or -h to display this usage informations.\0A\00"
@.str.6 = [49 x i8] c" proto - protocol specification (tcp or udp)\0A\00"
@.str.7 = [65 x i8] c" lport - local port to listen on (see README for transparent\0A\00"
@.str.8 = [51 x i8] c" traffic intercepting on some systems)\0A\00"
@.str.9 = [71 x i8] c" rhost - where connection should be forwarded (0 = use destination\0A\00"
@.str.10 = [57 x i8] c" address of incoming connection, see README)\0A\00"
@.str.11 = [68 x i8] c" rport - destination port (0 = dst port of incoming connection)\0A\00"
@.str.12 = [48 x i8] c" rules - file containing replacement rules\0A\0A\00"
@.str.13 = [24 x i8] c"Rules are 3 line sets:\0A\00"
@.str.14 = [21 x i8] c"\09\09Regular Expression\00"
@.str.15 = [19 x i8] c"\09\09Replacement Text\00"
@.str.16 = [11 x i8] c"\09\09Rule TTL\00"
@.str.17 = [69 x i8] c"Note: Rule TTL requirements need defining, default to -1 (disabled)\0A\00"
@.str.18 = [71 x i8] c"Rules are not active across packet boundaries, and they are evaluated\0A\00"
@.str.19 = [52 x i8] c"from first to last, as stated on the command line.\0A\00"
define void @usage_hints(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %5, %1
%10 = load i32, i32* @stderr
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.2, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0))
%16 = load i32, i32* @stderr
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.4, i64 0, i64 0))
%18 = load i32, i32* @stderr
%19 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.5, i64 0, i64 0))
%20 = load i32, i32* @stderr
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0))
%22 = load i32, i32* @stderr
%23 = call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.7, i64 0, i64 0))
%24 = load i32, i32* @stderr
%25 = call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.8, i64 0, i64 0))
%26 = load i32, i32* @stderr
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.9, i64 0, i64 0))
%28 = load i32, i32* @stderr
%29 = call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.10, i64 0, i64 0))
%30 = load i32, i32* @stderr
%31 = call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.11, i64 0, i64 0))
%32 = load i32, i32* @stderr
%33 = call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.12, i64 0, i64 0))
%34 = load i32, i32* @stderr
%35 = call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0))
%36 = load i32, i32* @stderr
%37 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.14, i64 0, i64 0))
%38 = load i32, i32* @stderr
%39 = call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.15, i64 0, i64 0))
%40 = load i32, i32* @stderr
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.16, i64 0, i64 0))
%42 = load i32, i32* @stderr
%43 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.17, i64 0, i64 0))
%44 = load i32, i32* @stderr
%45 = call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.18, i64 0, i64 0))
%46 = load i32, i32* @stderr
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.19, i64 0, i64 0))
%48 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"\1B[31mError: %s\0A\0A\1B[0m\00"
@.str.1 = [59 x i8] c"Usage: netsed [option] proto lport rhost rport rule-file\0A\0A\00"
@.str.2 = [70 x i8] c" options - can be --ipv4 or -4 to force address resolution in IPv4,\0A\00"
@.str.3 = [63 x i8] c" --ipv6 or -6 to force address resolution in IPv6,\0A\00"
@.str.4 = [68 x i8] c" --ipany to resolve the address in either IPv4 or IPv6.\0A\00"
@.str.5 = [62 x i8] c" - --help or -h to display this usage informations.\0A\00"
@.str.6 = [49 x i8] c" proto - protocol specification (tcp or udp)\0A\00"
@.str.7 = [65 x i8] c" lport - local port to listen on (see README for transparent\0A\00"
@.str.8 = [51 x i8] c" traffic intercepting on some systems)\0A\00"
@.str.9 = [71 x i8] c" rhost - where connection should be forwarded (0 = use destination\0A\00"
@.str.10 = [57 x i8] c" address of incoming connection, see README)\0A\00"
@.str.11 = [68 x i8] c" rport - destination port (0 = dst port of incoming connection)\0A\00"
@.str.12 = [48 x i8] c" rules - file containing replacement rules\0A\0A\00"
@.str.13 = [24 x i8] c"Rules are 3 line sets:\0A\00"
@.str.14 = [21 x i8] c"\09\09Regular Expression\00"
@.str.15 = [19 x i8] c"\09\09Replacement Text\00"
@.str.16 = [11 x i8] c"\09\09Rule TTL\00"
@.str.17 = [69 x i8] c"Note: Rule TTL requirements need defining, default to -1 (disabled)\0A\00"
@.str.18 = [71 x i8] c"Rules are not active across packet boundaries, and they are evaluated\0A\00"
@.str.19 = [52 x i8] c"from first to last, as stated on the command line.\0A\00"
define void @usage_hints(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %3, %1
%7 = load i32, i32* @stderr
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.4, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.5, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = tail call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0))
%19 = load i32, i32* @stderr
%20 = tail call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.7, i64 0, i64 0))
%21 = load i32, i32* @stderr
%22 = tail call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.8, i64 0, i64 0))
%23 = load i32, i32* @stderr
%24 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.9, i64 0, i64 0))
%25 = load i32, i32* @stderr
%26 = tail call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.10, i64 0, i64 0))
%27 = load i32, i32* @stderr
%28 = tail call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.11, i64 0, i64 0))
%29 = load i32, i32* @stderr
%30 = tail call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.12, i64 0, i64 0))
%31 = load i32, i32* @stderr
%32 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0))
%33 = load i32, i32* @stderr
%34 = tail call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.14, i64 0, i64 0))
%35 = load i32, i32* @stderr
%36 = tail call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.15, i64 0, i64 0))
%37 = load i32, i32* @stderr
%38 = tail call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.16, i64 0, i64 0))
%39 = load i32, i32* @stderr
%40 = tail call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.17, i64 0, i64 0))
%41 = load i32, i32* @stderr
%42 = tail call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.18, i64 0, i64 0))
%43 = load i32, i32* @stderr
%44 = tail call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.19, i64 0, i64 0))
%45 = tail call i32 @exit(i32 1)
unreachable
}