#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 */
struct in_addr {
  int dummy;
};
struct hostent {
  scalar_t__ *h_addr_list;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int EXIT_FAILURE;
int /*<<< orphan*/ execvp(char *, char **);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
struct hostent *gethostbyname(char *);
int inet_pton(int /*<<< orphan*/, char *, struct in_addr *);
int /*<<< orphan*/ set_file(char *);
int /*<<< orphan*/ set_preload();
int /*<<< orphan*/ set_server(struct in_addr *, unsigned int);
int /*<<< orphan*/ stderr;
char *strchr(char *, char);
scalar_t__ strcmp(char *, char *);
unsigned int strtol(char *, char **, int);
int usage();
int main(int argc, char *argv[]) {
  char *file = NULL;
  char *server = NULL;
  int i;
  for (i = 1; i < argc; i++) {
    if (strcmp(argv[i], "-o") == 0) {
      i++;
      if (i == argc)
        return usage();
      file = argv[i];
      set_file(file);
    } else if (strcmp(argv[i], "-s") == 0) {
      char *p;
      struct in_addr ip;
      unsigned port = 4606;
      i++;
      if (i == argc)
        return usage();
      server = argv[i];
      p = strchr(server, ':');
      if (p != NULL) {
        *p = 0;
        p++;
        port = strtol(p, &p, 10);
        if (port <= 0 || port >= 65536 || *p != 0) {
          fprintf(stderr, "matl: invalid TCP/IP port '%s'\n", p);
          return EXIT_FAILURE;
        }
      }
      if (inet_pton(AF_INET, server, &ip) != 1) {
        struct hostent *hp = gethostbyname(server);
        if (hp == NULL) {
          fprintf(stderr, "matl: cannot find IP address associated with '%s'\n",
                  server);
          return EXIT_FAILURE;
        }
        ip = *(struct in_addr *)hp->h_addr_list[0];
      }
      set_server(&ip, port);
    } else if (argv[i][0] == '-') {
      return usage();
    } else {
      set_preload();
      execvp(argv[i], &argv[i]);
      fprintf(stderr, "%s: not found\n", argv[i]);
      exit(255);
    }
  }
  return usage();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1467 <main+0x2a7>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdf4(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    125d <main+0x9d>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    123f <main+0x7f>
mov    $0x0,%al
call   10c0 <usage@plt>
mov    %eax,-0x4(%rbp)
jmp    1471 <main+0x2b1>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   10a0 <set_file@plt>
jmp    1454 <main+0x294>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd93(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    13d6 <main+0x216>
movl   $0x11fe,-0x3c(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    12aa <main+0xea>
mov    $0x0,%al
call   10c0 <usage@plt>
mov    %eax,-0x4(%rbp)
jmp    1471 <main+0x2b1>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x3a,%esi
call   1050 <strchr@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1355 <main+0x195>
mov    -0x30(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0xa,%edx
call   1090 <strtol@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jbe    1326 <main+0x166>
cmpl   $0x10000,-0x3c(%rbp)
jae    1326 <main+0x166>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1350 <main+0x190>
mov    0x2cab(%rip),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%rdx
lea    0xccc(%rip),%rsi
call   1080 <fprintf@plt>
mov    0x2c8a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1471 <main+0x2b1>
jmp    1355 <main+0x195>
mov    0x2c8c(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rsi
lea    -0x38(%rbp),%rdx
call   10b0 <inet_pton@plt>
cmp    $0x1,%eax
je     13c5 <main+0x205>
mov    -0x20(%rbp),%rdi
call   1070 <gethostbyname@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    13b6 <main+0x1f6>
mov    0x2c45(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
lea    0xc86(%rip),%rsi
call   1080 <fprintf@plt>
mov    0x2c24(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1471 <main+0x2b1>
mov    -0x48(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
mov    -0x3c(%rbp),%esi
lea    -0x38(%rbp),%rdi
call   1030 <set_server@plt>
jmp    144f <main+0x28f>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    13fd <main+0x23d>
mov    $0x0,%al
call   10c0 <usage@plt>
mov    %eax,-0x4(%rbp)
jmp    1471 <main+0x2b1>
mov    $0x0,%al
call   1040 <set_preload@plt>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
call   10d0 <execvp@plt>
mov    0x2bad(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xc19(%rip),%rsi
call   1080 <fprintf@plt>
mov    $0xff,%edi
call   10e0 <exit@plt>
jmp    1454 <main+0x294>
jmp    1459 <main+0x299>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11ed <main+0x2d>
mov    $0x0,%al
call   10c0 <usage@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
cmp    $0x2,%edi
jl     132b <main+0x16b>
mov    %rsi,%r15
mov    %edi,%ebx
mov    $0x1,%r12d
mov    %rsp,%r14
mov    %rsi,0x10(%rsp)
jmp    120d <main+0x4d>
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15d,%esi
call   1030 <set_server@plt>
mov    0x10(%rsp),%r15
add    $0x1,%r12d
cmp    %ebx,%r12d
jge    132b <main+0x16b>
movslq %r12d,%rbp
mov    (%r15,%rbp,8),%rdi
lea    0xde5(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     12b0 <main+0xf0>
lea    (%r15,%rbp,8),%rbp
mov    0x0(%rbp),%rdi
lea    0xdcb(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    1322 <main+0x162>
add    $0x1,%r12d
cmp    %ebx,%r12d
je     132b <main+0x16b>
movslq %r12d,%rax
mov    (%r15,%rax,8),%r13
mov    %r13,%rdi
mov    $0x3a,%esi
call   1050 <strchr@plt>
test   %rax,%rax
je     12d0 <main+0x110>
movb   $0x0,(%rax)
add    $0x1,%rax
mov    %rax,0x8(%rsp)
mov    %rax,%rdi
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1090 <strtol@plt>
mov    %eax,%r15d
lea    -0x10000(%r15),%eax
mov    0x8(%rsp),%rdx
cmp    $0xffff0001,%eax
jb     1310 <main+0x150>
cmpb   $0x0,(%rdx)
je     12d6 <main+0x116>
jmp    1310 <main+0x150>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r12d
cmp    %ebx,%r12d
je     132b <main+0x16b>
movslq %r12d,%rax
mov    (%r15,%rax,8),%rdi
call   10a0 <set_file@plt>
jmp    1200 <main+0x40>
nopw   0x0(%rax,%rax,1)
mov    $0x11fe,%r15d
mov    0x2d0b(%rip),%rax
mov    (%rax),%edi
mov    %r13,%rsi
mov    %r14,%rdx
call   10b0 <inet_pton@plt>
cmp    $0x1,%eax
je     11f0 <main+0x30>
mov    %r13,%rdi
call   1070 <gethostbyname@plt>
test   %rax,%rax
je     1341 <main+0x181>
mov    (%rax),%rax
mov    (%rax),%rax
mov    (%rax),%eax
mov    %eax,(%rsp)
jmp    11f0 <main+0x30>
mov    0x2cc1(%rip),%rax
mov    (%rax),%edi
lea    0xce6(%rip),%rsi
jmp    1354 <main+0x194>
mov    0x0(%rbp),%rax
cmpb   $0x2d,(%rax)
jne    1364 <main+0x1a4>
xor    %eax,%eax
call   10c0 <usage@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c90(%rip),%rax
mov    (%rax),%edi
lea    0xcd5(%rip),%rsi
mov    %r13,%rdx
call   1080 <fprintf@plt>
mov    0x2c70(%rip),%rax
mov    (%rax),%eax
jmp    1332 <main+0x172>
xor    %eax,%eax
call   1040 <set_preload@plt>
mov    0x0(%rbp),%rdi
mov    %rbp,%rsi
call   10d0 <execvp@plt>
mov    0x2c5a(%rip),%rax
mov    (%rax),%edi
mov    0x0(%rbp),%rdx
lea    0xcce(%rip),%rsi
call   1080 <fprintf@plt>
mov    $0xff,%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
%struct.in_addr = type { i32 }
%struct.hostent = type { i64* }
@.str = [3 x i8] c"-o\00"
@.str.1 = [3 x i8] c"-s\00"
@stderr = global i32 0
@.str.2 = [32 x i8] c"matl: invalid TCP/IP port '%s'\0A\00"
@EXIT_FAILURE = global i32 0
@AF_INET = global i32 0
@.str.3 = [51 x i8] c"matl: cannot find IP address associated with '%s'\0A\00"
@.str.4 = [15 x i8] c"%s: not found\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca %struct.in_addr
%11 = alloca i32
%12 = alloca %struct.hostent*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
store i8* null, i8** %7
store i32 1, i32* %8
br label %13
13: ; preds = %150, %2
%14 = load i32, i32* %8
%15 = load i32, i32* %4
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %153
17: ; preds = %13
%18 = load i8**, i8*** %5
%19 = load i32, i32* %8
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8*, i8** %18, i64 %20
%22 = load i8*, i8** %21
%23 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %41
25: ; preds = %17
%26 = load i32, i32* %8
%27 = add nsw i32 %26, 1
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = load i32, i32* %4
%30 = icmp eq i32 %28, %29
br i1 %30, label %31, label %33
31: ; preds = %25
%32 = call i32 (...) @usage()
store i32 %32, i32* %3
br label %155
33: ; preds = %25
%34 = load i8**, i8*** %5
%35 = load i32, i32* %8
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8*, i8** %34, i64 %36
%38 = load i8*, i8** %37
store i8* %38, i8** %6
%39 = load i8*, i8** %6
%40 = call i32 @set_file(i8* %39)
br label %149
41: ; preds = %17
%42 = load i8**, i8*** %5
%43 = load i32, i32* %8
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8*, i8** %42, i64 %44
%46 = load i8*, i8** %45
%47 = call i64 @strcmp(i8* %46, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %116
49: ; preds = %41
store i32 4606, i32* %11
%50 = load i32, i32* %8
%51 = add nsw i32 %50, 1
store i32 %51, i32* %8
%52 = load i32, i32* %8
%53 = load i32, i32* %4
%54 = icmp eq i32 %52, %53
br i1 %54, label %55, label %57
55: ; preds = %49
%56 = call i32 (...) @usage()
store i32 %56, i32* %3
br label %155
57: ; preds = %49
%58 = load i8**, i8*** %5
%59 = load i32, i32* %8
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i8*, i8** %58, i64 %60
%62 = load i8*, i8** %61
store i8* %62, i8** %7
%63 = load i8*, i8** %7
%64 = call i8* @strchr(i8* %63, i8 signext 58)
store i8* %64, i8** %9
%65 = load i8*, i8** %9
%66 = icmp ne i8* %65, null
br i1 %66, label %67, label %89
67: ; preds = %57
%68 = load i8*, i8** %9
store i8 0, i8* %68
%69 = load i8*, i8** %9
%70 = getelementptr inbounds i8, i8* %69, i32 1
store i8* %70, i8** %9
%71 = load i8*, i8** %9
%72 = call i32 @strtol(i8* %71, i8** %9, i32 10)
store i32 %72, i32* %11
%73 = load i32, i32* %11
%74 = icmp ule i32 %73, 0
br i1 %74, label %83, label %75
75: ; preds = %67
%76 = load i32, i32* %11
%77 = icmp uge i32 %76, 65536
br i1 %77, label %83, label %78
78: ; preds = %75
%79 = load i8*, i8** %9
%80 = load i8, i8* %79
%81 = sext i8 %80 to i32
%82 = icmp ne i32 %81, 0
br i1 %82, label %83, label %88
83: ; preds = %78, %75, %67
%84 = load i32, i32* @stderr
%85 = load i8*, i8** %9
%86 = call i32 @fprintf(i32 %84, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %85)
%87 = load i32, i32* @EXIT_FAILURE
store i32 %87, i32* %3
br label %155
88: ; preds = %78
br label %89
89: ; preds = %88, %57
%90 = load i32, i32* @AF_INET
%91 = load i8*, i8** %7
%92 = call i32 @inet_pton(i32 %90, i8* %91, %struct.in_addr* %10)
%93 = icmp ne i32 %92, 1
br i1 %93, label %94, label %113
94: ; preds = %89
%95 = load i8*, i8** %7
%96 = call %struct.hostent* @gethostbyname(i8* %95)
store %struct.hostent* %96, %struct.hostent** %12
%97 = load %struct.hostent*, %struct.hostent** %12
%98 = icmp eq %struct.hostent* %97, null
br i1 %98, label %99, label %104
99: ; preds = %94
%100 = load i32, i32* @stderr
%101 = load i8*, i8** %7
%102 = call i32 @fprintf(i32 %100, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0), i8* %101)
%103 = load i32, i32* @EXIT_FAILURE
store i32 %103, i32* %3
br label %155
104: ; preds = %94
%105 = load %struct.hostent*, %struct.hostent** %12
%106 = getelementptr inbounds %struct.hostent, %struct.hostent* %105, i32 0, i32 0
%107 = load i64*, i64** %106
%108 = getelementptr inbounds i64, i64* %107, i64 0
%109 = load i64, i64* %108
%110 = inttoptr i64 %109 to %struct.in_addr*
%111 = bitcast %struct.in_addr* %10 to i8*
%112 = bitcast %struct.in_addr* %110 to i8*
br label %113
113: ; preds = %104, %89
%114 = load i32, i32* %11
%115 = call i32 @set_server(%struct.in_addr* %10, i32 %114)
br label %148
116: ; preds = %41
%117 = load i8**, i8*** %5
%118 = load i32, i32* %8
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds i8*, i8** %117, i64 %119
%121 = load i8*, i8** %120
%122 = getelementptr inbounds i8, i8* %121, i64 0
%123 = load i8, i8* %122
%124 = sext i8 %123 to i32
%125 = icmp eq i32 %124, 45
br i1 %125, label %126, label %128
126: ; preds = %116
%127 = call i32 (...) @usage()
store i32 %127, i32* %3
br label %155
128: ; preds = %116
%129 = call i32 (...) @set_preload()
%130 = load i8**, i8*** %5
%131 = load i32, i32* %8
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds i8*, i8** %130, i64 %132
%134 = load i8*, i8** %133
%135 = load i8**, i8*** %5
%136 = load i32, i32* %8
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds i8*, i8** %135, i64 %137
%139 = call i32 @execvp(i8* %134, i8** %138)
%140 = load i32, i32* @stderr
%141 = load i8**, i8*** %5
%142 = load i32, i32* %8
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds i8*, i8** %141, i64 %143
%145 = load i8*, i8** %144
%146 = call i32 @fprintf(i32 %140, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8* %145)
%147 = call i32 @exit(i32 255)
unreachable
148: ; preds = %113
br label %149
149: ; preds = %148, %33
br label %150
150: ; preds = %149
%151 = load i32, i32* %8
%152 = add nsw i32 %151, 1
store i32 %152, i32* %8
br label %13
153: ; preds = %13
%154 = call i32 (...) @usage()
store i32 %154, i32* %3
br label %155
155: ; preds = %153, %126, %99, %83, %55, %31
%156 = load i32, i32* %3
ret i32 %156
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
%struct.hostent = type { i64* }
@.str = [3 x i8] c"-o\00"
@.str.1 = [3 x i8] c"-s\00"
@stderr = global i32 0
@.str.2 = [32 x i8] c"matl: invalid TCP/IP port '%s'\0A\00"
@EXIT_FAILURE = global i32 0
@AF_INET = global i32 0
@.str.3 = [51 x i8] c"matl: cannot find IP address associated with '%s'\0A\00"
@.str.4 = [15 x i8] c"%s: not found\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i8*
%4 = alloca %struct.in_addr
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %95
6: ; preds = %2
%7 = bitcast i8** %3 to i8*
%8 = bitcast %struct.in_addr* %4 to i8*
%9 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %4, i64 0, i32 0
br label %10
10: ; preds = %6, %91
%11 = phi i32 [ 1, %6 ], [ %93, %91 ]
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8*, i8** %1, i64 %12
%14 = load i8*, i8** %13
%15 = call i64 @strcmp(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %27
17: ; preds = %10
%18 = add nsw i32 %11, 1
%19 = icmp eq i32 %18, %0
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 (...) @usage()
br label %97
22: ; preds = %17
%23 = sext i32 %18 to i64
%24 = getelementptr inbounds i8*, i8** %1, i64 %23
%25 = load i8*, i8** %24
%26 = call i32 @set_file(i8* %25)
br label %91
27: ; preds = %10
%28 = load i8*, i8** %13
%29 = call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %77
31: ; preds = %27
%32 = add nsw i32 %11, 1
%33 = icmp eq i32 %32, %0
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 (...) @usage()
br label %73
36: ; preds = %31
%37 = sext i32 %32 to i64
%38 = getelementptr inbounds i8*, i8** %1, i64 %37
%39 = load i8*, i8** %38
%40 = call i8* @strchr(i8* dereferenceable(1) %39, i8 signext 58)
%41 = icmp eq i8* %40, null
br i1 %41, label %55, label %42
42: ; preds = %36
store i8 0, i8* %40
%43 = getelementptr inbounds i8, i8* %40, i64 1
store i8* %43, i8** %3
%44 = call i32 @strtol(i8* %43, i8** %3, i32 10)
%45 = add i32 %44, -65536
%46 = icmp ult i32 %45, -65535
%47 = load i8*, i8** %3
br i1 %46, label %51, label %48
48: ; preds = %42
%49 = load i8, i8* %47
%50 = icmp eq i8 %49, 0
br i1 %50, label %55, label %51
51: ; preds = %48, %42
%52 = load i32, i32* @stderr
%53 = call i32 @fprintf(i32 %52, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %47)
%54 = load i32, i32* @EXIT_FAILURE
br label %73
55: ; preds = %48, %36
%56 = phi i32 [ %44, %48 ], [ 4606, %36 ]
%57 = load i32, i32* @AF_INET
%58 = call i32 @inet_pton(i32 %57, i8* %39, %struct.in_addr* %4)
%59 = icmp eq i32 %58, 1
br i1 %59, label %75, label %60
60: ; preds = %55
%61 = call %struct.hostent* @gethostbyname(i8* %39)
%62 = icmp eq %struct.hostent* %61, null
br i1 %62, label %63, label %67
63: ; preds = %60
%64 = load i32, i32* @stderr
%65 = call i32 @fprintf(i32 %64, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0), i8* %39)
%66 = load i32, i32* @EXIT_FAILURE
br label %73
67: ; preds = %60
%68 = getelementptr inbounds %struct.hostent, %struct.hostent* %61, i64 0, i32 0
%69 = load i64*, i64** %68
%70 = load i64, i64* %69
%71 = inttoptr i64 %70 to i32*
%72 = load i32, i32* %71
store i32 %72, i32* %9
br label %75
73: ; preds = %51, %34, %63
%74 = phi i32 [ %66, %63 ], [ %35, %34 ], [ %54, %51 ]
br label %97
75: ; preds = %55, %67
%76 = call i32 @set_server(%struct.in_addr* %4, i32 %56)
br label %91
77: ; preds = %27
%78 = load i8*, i8** %13
%79 = load i8, i8* %78
%80 = icmp eq i8 %79, 45
br i1 %80, label %81, label %83
81: ; preds = %77
%82 = call i32 (...) @usage()
br label %97
83: ; preds = %77
%84 = call i32 (...) @set_preload()
%85 = load i8*, i8** %13
%86 = call i32 @execvp(i8* %85, i8** %13)
%87 = load i32, i32* @stderr
%88 = load i8*, i8** %13
%89 = call i32 @fprintf(i32 %87, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8* %88)
%90 = call i32 @exit(i32 255)
unreachable
91: ; preds = %75, %22
%92 = phi i32 [ %18, %22 ], [ %32, %75 ]
%93 = add nsw i32 %92, 1
%94 = icmp slt i32 %93, %0
br i1 %94, label %10, label %95
95: ; preds = %91, %2
%96 = call i32 (...) @usage()
br label %97
97: ; preds = %73, %95, %81, %20
%98 = phi i32 [ %21, %20 ], [ %82, %81 ], [ %96, %95 ], [ %74, %73 ]
ret i32 %98
}