#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, "Error: %s\n\n", why);
  fprintf(
      stderr,
      "Usage: netsed [option] proto lport rhost rport rule1 [ rule2 ... ]\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 information.\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, "  ruleN   - replacement rules (see below)\n\n");
  fprintf(stderr,
          "General syntax of replacement rules: s/pat1/pat2[/expire]\n\n");
  fprintf(stderr, "This will replace all occurrences of pat1 with pat2 in any "
                  "matching packet.\n");
  fprintf(stderr, "An additional parameter, 'expire' of the form [CHAR][NUM], "
                  "can be used to\n");
  fprintf(stderr, "expire a rule after NUM successful substitutions during a "
                  "given connection.\n");
  fprintf(stderr, "The character CHAR is one of \"iIoO\", with the effect of "
                  "restricting the rule\n");
  fprintf(stderr, "to apply to incoming (\"iI\") or to outgoing (\"oO\") "
                  "packets only, as seen from\n");
  fprintf(stderr,
          "the client's perspective. Both of CHAR and NUM are optional.\n\n");
  fprintf(stderr, "Eight-bit characters, including NULL and '/', can be "
                  "applied using HTTP-like\n");
  fprintf(stderr, "hex escape sequences (e.g. CRLF as %%0a%%0d).\n");
  fprintf(
      stderr,
      "A match on '%%' can be achieved by specifying '%%%%'.\n\nExamples:\n");
  fprintf(stderr, "  's/andrew/mike/1'     - replace 'andrew' with 'mike' "
                  "(only first time)\n");
  fprintf(stderr, "  's/andrew/mike'       - replace all occurrences of "
                  "'andrew' with 'mike'\n");
  fprintf(
      stderr,
      "  's/andrew/mike%%00%%00' - replace 'andrew' with 'mike\\x00\\x00'\n");
  fprintf(
      stderr,
      "                          (manually padding to keep original size)\n");
  fprintf(stderr, "  's/%%%%/%%2f/20'         - replace the 20 first "
                  "occurrence of '%%' with '/'\n");
  fprintf(stderr, "  's/andrew/mike/o'     - the server will always see "
                  "'mike', never 'andrew'\n\n");
  fprintf(stderr, "  's/Rilke/Proust/o s/Proust/Rilke/i'\n");
  fprintf(stderr,
          "                        - let Rilke travel incognito as Proust\n\n");
  fprintf(stderr, "Rules are not active across packet boundaries, and they are "
                  "evaluated\n");
  fprintf(stderr, "from first to last, not yet expired rule, 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    0xeaa(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
lea    0xed8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
lea    0xf07(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e42(%rip),%rax
mov    (%rax),%edi
lea    0xf2f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e2b(%rip),%rax
mov    (%rax),%edi
lea    0xf5c(%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    0x1076(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d5c(%rip),%rax
mov    (%rax),%edi
lea    0x109b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d45(%rip),%rax
mov    (%rax),%edi
lea    0x10d1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d2e(%rip),%rax
mov    (%rax),%edi
lea    0x1105(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d17(%rip),%rax
mov    (%rax),%edi
lea    0x113b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d00(%rip),%rax
mov    (%rax),%edi
lea    0x1172(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ce9(%rip),%rax
mov    (%rax),%edi
lea    0x11a9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2cd2(%rip),%rax
mov    (%rax),%edi
lea    0x11d1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2cbb(%rip),%rax
mov    (%rax),%edi
lea    0x1208(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ca4(%rip),%rax
mov    (%rax),%edi
lea    0x1220(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2c8d(%rip),%rax
mov    (%rax),%edi
lea    0x124b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2c76(%rip),%rax
mov    (%rax),%edi
lea    0x127e(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2c5f(%rip),%rax
mov    (%rax),%edi
lea    0x12b2(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2c48(%rip),%rax
mov    (%rax),%edi
lea    0x12dd(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2c31(%rip),%rax
mov    (%rax),%edi
lea    0x130a(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2c1a(%rip),%rax
mov    (%rax),%edi
lea    0x1342(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2c03(%rip),%rax
mov    (%rax),%edi
lea    0x1379(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2bec(%rip),%rax
mov    (%rax),%edi
lea    0x1389(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2bd5(%rip),%rax
mov    (%rax),%edi
lea    0x13b3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2bbe(%rip),%rax
mov    (%rax),%edi
lea    0x13e3(%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    0xebc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef1(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf27(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf56(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf8a(%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    0x10dc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1108(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1145(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1180(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x11bd(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x11fb(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1239(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1268(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x12a6(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x12c5(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x12f7(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1331(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x136c(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x139e(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x13d2(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1411(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x144f(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1466(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1497(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x14ce(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"Error: %s\0A\0A\00"
@.str.1 = [69 x i8] c"Usage: netsed [option] proto lport rhost rport rule1 [ rule2 ... ]\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 = [61 x i8] c" - --help or -h to display this usage information.\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 = [44 x i8] c" ruleN - replacement rules (see below)\0A\0A\00"
@.str.13 = [60 x i8] c"General syntax of replacement rules: s/pat1/pat2[/expire]\0A\0A\00"
@.str.14 = [77 x i8] c"This will replace all occurrences of pat1 with pat2 in any matching packet.\0A\00"
@.str.15 = [75 x i8] c"An additional parameter, 'expire' of the form [CHAR][NUM], can be used to\0A\00"
@.str.16 = [77 x i8] c"expire a rule after NUM successful substitutions during a given connection.\0A\00"
@.str.17 = [78 x i8] c"The character CHAR is one of \22iIoO\22, with the effect of restricting the rule\0A\00"
@.str.18 = [78 x i8] c"to apply to incoming (\22iI\22) or to outgoing (\22oO\22) packets only, as seen from\0A\00"
@.str.19 = [63 x i8] c"the client's perspective. Both of CHAR and NUM are optional.\0A\0A\00"
@.str.20 = [78 x i8] c"Eight-bit characters, including NULL and '/', can be applied using HTTP-like\0A\00"
@.str.21 = [47 x i8] c"hex escape sequences (e.g. CRLF as %%0a%%0d).\0A\00"
@.str.22 = [66 x i8] c"A match on '%%' can be achieved by specifying '%%%%'.\0A\0AExamples:\0A\00"
@.str.23 = [74 x i8] c" 's/andrew/mike/1' - replace 'andrew' with 'mike' (only first time)\0A\00"
@.str.24 = [75 x i8] c" 's/andrew/mike' - replace all occurrences of 'andrew' with 'mike'\0A\00"
@.str.25 = [66 x i8] c" 's/andrew/mike%%00%%00' - replace 'andrew' with 'mike\\x00\\x00'\0A\00"
@.str.26 = [68 x i8] c" (manually padding to keep original size)\0A\00"
@.str.27 = [79 x i8] c" 's/%%%%/%%2f/20' - replace the 20 first occurrence of '%%' with '/'\0A\00"
@.str.28 = [78 x i8] c" 's/andrew/mike/o' - the server will always see 'mike', never 'andrew'\0A\0A\00"
@.str.29 = [39 x i8] c" 's/Rilke/Proust/o s/Proust/Rilke/i'\0A\00"
@.str.30 = [65 x i8] c" - let Rilke travel incognito as Proust\0A\0A\00"
@.str.31 = [71 x i8] c"Rules are not active across packet boundaries, and they are evaluated\0A\00"
@.str.32 = [74 x i8] c"from first to last, not yet expired rule, 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 ([12 x i8], [12 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 ([69 x i8], [69 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 ([61 x i8], [61 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 ([44 x i8], [44 x i8]* @.str.12, i64 0, i64 0))
%34 = load i32, i32* @stderr
%35 = call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.13, i64 0, i64 0))
%36 = load i32, i32* @stderr
%37 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.14, i64 0, i64 0))
%38 = load i32, i32* @stderr
%39 = call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.15, i64 0, i64 0))
%40 = load i32, i32* @stderr
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.16, i64 0, i64 0))
%42 = load i32, i32* @stderr
%43 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.17, i64 0, i64 0))
%44 = load i32, i32* @stderr
%45 = call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.18, i64 0, i64 0))
%46 = load i32, i32* @stderr
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.19, i64 0, i64 0))
%48 = load i32, i32* @stderr
%49 = call i32 (i32, i8*, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.20, i64 0, i64 0))
%50 = load i32, i32* @stderr
%51 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.21, i64 0, i64 0))
%52 = load i32, i32* @stderr
%53 = call i32 (i32, i8*, ...) @fprintf(i32 %52, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.22, i64 0, i64 0))
%54 = load i32, i32* @stderr
%55 = call i32 (i32, i8*, ...) @fprintf(i32 %54, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.23, i64 0, i64 0))
%56 = load i32, i32* @stderr
%57 = call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.24, i64 0, i64 0))
%58 = load i32, i32* @stderr
%59 = call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.25, i64 0, i64 0))
%60 = load i32, i32* @stderr
%61 = call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.26, i64 0, i64 0))
%62 = load i32, i32* @stderr
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.27, i64 0, i64 0))
%64 = load i32, i32* @stderr
%65 = call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.28, i64 0, i64 0))
%66 = load i32, i32* @stderr
%67 = call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.29, i64 0, i64 0))
%68 = load i32, i32* @stderr
%69 = call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.30, i64 0, i64 0))
%70 = load i32, i32* @stderr
%71 = call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.31, i64 0, i64 0))
%72 = load i32, i32* @stderr
%73 = call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.32, i64 0, i64 0))
%74 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"Error: %s\0A\0A\00"
@.str.1 = [69 x i8] c"Usage: netsed [option] proto lport rhost rport rule1 [ rule2 ... ]\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 = [61 x i8] c" - --help or -h to display this usage information.\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 = [44 x i8] c" ruleN - replacement rules (see below)\0A\0A\00"
@.str.13 = [60 x i8] c"General syntax of replacement rules: s/pat1/pat2[/expire]\0A\0A\00"
@.str.14 = [77 x i8] c"This will replace all occurrences of pat1 with pat2 in any matching packet.\0A\00"
@.str.15 = [75 x i8] c"An additional parameter, 'expire' of the form [CHAR][NUM], can be used to\0A\00"
@.str.16 = [77 x i8] c"expire a rule after NUM successful substitutions during a given connection.\0A\00"
@.str.17 = [78 x i8] c"The character CHAR is one of \22iIoO\22, with the effect of restricting the rule\0A\00"
@.str.18 = [78 x i8] c"to apply to incoming (\22iI\22) or to outgoing (\22oO\22) packets only, as seen from\0A\00"
@.str.19 = [63 x i8] c"the client's perspective. Both of CHAR and NUM are optional.\0A\0A\00"
@.str.20 = [78 x i8] c"Eight-bit characters, including NULL and '/', can be applied using HTTP-like\0A\00"
@.str.21 = [47 x i8] c"hex escape sequences (e.g. CRLF as %%0a%%0d).\0A\00"
@.str.22 = [66 x i8] c"A match on '%%' can be achieved by specifying '%%%%'.\0A\0AExamples:\0A\00"
@.str.23 = [74 x i8] c" 's/andrew/mike/1' - replace 'andrew' with 'mike' (only first time)\0A\00"
@.str.24 = [75 x i8] c" 's/andrew/mike' - replace all occurrences of 'andrew' with 'mike'\0A\00"
@.str.25 = [66 x i8] c" 's/andrew/mike%%00%%00' - replace 'andrew' with 'mike\\x00\\x00'\0A\00"
@.str.26 = [68 x i8] c" (manually padding to keep original size)\0A\00"
@.str.27 = [79 x i8] c" 's/%%%%/%%2f/20' - replace the 20 first occurrence of '%%' with '/'\0A\00"
@.str.28 = [78 x i8] c" 's/andrew/mike/o' - the server will always see 'mike', never 'andrew'\0A\0A\00"
@.str.29 = [39 x i8] c" 's/Rilke/Proust/o s/Proust/Rilke/i'\0A\00"
@.str.30 = [65 x i8] c" - let Rilke travel incognito as Proust\0A\0A\00"
@.str.31 = [71 x i8] c"Rules are not active across packet boundaries, and they are evaluated\0A\00"
@.str.32 = [74 x i8] c"from first to last, not yet expired rule, 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 ([12 x i8], [12 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 ([69 x i8], [69 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 ([61 x i8], [61 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 ([44 x i8], [44 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 ([60 x i8], [60 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 ([77 x i8], [77 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 ([75 x i8], [75 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 ([77 x i8], [77 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 ([78 x i8], [78 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 ([78 x i8], [78 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 ([63 x i8], [63 x i8]* @.str.19, i64 0, i64 0))
%45 = load i32, i32* @stderr
%46 = tail call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.20, i64 0, i64 0))
%47 = load i32, i32* @stderr
%48 = tail call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.21, i64 0, i64 0))
%49 = load i32, i32* @stderr
%50 = tail call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.22, i64 0, i64 0))
%51 = load i32, i32* @stderr
%52 = tail call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.23, i64 0, i64 0))
%53 = load i32, i32* @stderr
%54 = tail call i32 (i32, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.24, i64 0, i64 0))
%55 = load i32, i32* @stderr
%56 = tail call i32 (i32, i8*, ...) @fprintf(i32 %55, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.25, i64 0, i64 0))
%57 = load i32, i32* @stderr
%58 = tail call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.26, i64 0, i64 0))
%59 = load i32, i32* @stderr
%60 = tail call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.27, i64 0, i64 0))
%61 = load i32, i32* @stderr
%62 = tail call i32 (i32, i8*, ...) @fprintf(i32 %61, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.28, i64 0, i64 0))
%63 = load i32, i32* @stderr
%64 = tail call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.29, i64 0, i64 0))
%65 = load i32, i32* @stderr
%66 = tail call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.30, i64 0, i64 0))
%67 = load i32, i32* @stderr
%68 = tail call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.31, i64 0, i64 0))
%69 = load i32, i32* @stderr
%70 = tail call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.32, i64 0, i64 0))
%71 = tail call i32 @exit(i32 1)
unreachable
}