#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 sockaddr_un {
  int /*<<< orphan*/ sun_path;
  int /*<<< orphan*/ sun_family;
};
struct sockaddr {
  int dummy;
};
struct in_addr {
  int dummy;
};
typedef int /*<<< orphan*/ sa;
typedef int /*<<< orphan*/ orig_addr;
typedef int /*<<< orphan*/ nat_addr;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ AF_UNIX;
int EXIT_FAILURE;
int EXIT_SUCCESS;
int INET_ADDRSTRLEN;
int /*<<< orphan*/ SOCK_SEQPACKET;
int /*<<< orphan*/ close(int);
scalar_t__ connect(int, struct sockaddr *, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ *inet_ntop(int /*<<< orphan*/, struct in_addr *, char *,
                              int);
int inet_pton(int /*<<< orphan*/, char *, struct in_addr *);
int /*<<< orphan*/ memset(struct sockaddr_un *, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *);
int read(int, struct in_addr *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcpy(int /*<<< orphan*/, char *);
int write(int, struct in_addr *, int);
int main(int argc, char *argv[]) {
  int ret = EXIT_FAILURE, res, fd;
  struct sockaddr_un sa;
  struct in_addr orig_addr, nat_addr;
  char buf[INET_ADDRSTRLEN];
  if (argc < 2) {
    fprintf(stderr, "usage: %s <address>\n", argv[0]);
    goto out1;
  }
  res = inet_pton(AF_INET, argv[1], &orig_addr);
  if (res < 0) {
    perror("inet_pton()");
    goto out1;
  } else if (res == 0) {
    fprintf(stderr, "invalid address: %s\n", argv[1]);
    goto out1;
  }
  fd = socket(AF_UNIX, SOCK_SEQPACKET, 0);
  if (fd < 0) {
    perror("socket()");
    goto out1;
  }
  memset(&sa, 0, sizeof(sa));
  sa.sun_family = AF_UNIX;
  strcpy(sa.sun_path, "ipremap.sock");
  if (connect(fd, (struct sockaddr *)&sa, sizeof(sa)) < 0) {
    perror("connect()");
    goto out2;
  }
  if (write(fd, &orig_addr, sizeof(orig_addr)) != sizeof(orig_addr)) {
    perror("write()");
    goto out2;
  }
  if (read(fd, &nat_addr, sizeof(nat_addr)) != sizeof(nat_addr)) {
    perror("read()");
    goto out2;
  }
  if (inet_ntop(AF_INET, &nat_addr, buf, INET_ADDRSTRLEN) == NULL) {
    perror("inet_ntop()");
    goto out2;
  }
  printf("%s\n", buf);
  ret = EXIT_SUCCESS;
out2:
  close(fd);
out1:
  return ret;
}


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)
mov    0x2de3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    0x2ddf(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x48(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1239 <main+0x79>
mov    0x2db1(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xdd1(%rip),%rsi
call   10a0 <fprintf@plt>
jmp    13ea <main+0x22a>
mov    0x2da8(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    -0x30(%rbp),%rdx
call   10b0 <inet_pton@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1271 <main+0xb1>
lea    0xdae(%rip),%rdi
call   10c0 <perror@plt>
jmp    13ea <main+0x22a>
cmpl   $0x0,-0x18(%rbp)
jne    129d <main+0xdd>
mov    0x2d4e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xd8e(%rip),%rsi
call   10a0 <fprintf@plt>
jmp    13ea <main+0x22a>
jmp    12a2 <main+0xe2>
mov    0x2d37(%rip),%rax
mov    (%rax),%edi
mov    0x2cfe(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10e0 <socket@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    12d9 <main+0x119>
lea    0xd67(%rip),%rdi
call   10c0 <perror@plt>
jmp    13ea <main+0x22a>
lea    -0x28(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1070 <memset@plt>
mov    0x2cf0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%edi
lea    0xd40(%rip),%rsi
call   1040 <strcpy@plt>
mov    -0x1c(%rbp),%edi
lea    -0x28(%rbp),%rsi
mov    $0x8,%edx
call   10d0 <connect@plt>
cmp    $0x0,%rax
jge    1330 <main+0x170>
lea    0xd26(%rip),%rdi
call   10c0 <perror@plt>
jmp    13e2 <main+0x222>
mov    -0x1c(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0x4,%edx
call   1050 <write@plt>
cltq
cmp    $0x4,%rax
je     135e <main+0x19e>
lea    0xd02(%rip),%rdi
call   10c0 <perror@plt>
jmp    13e2 <main+0x222>
mov    -0x1c(%rbp),%edi
lea    -0x38(%rbp),%rsi
mov    $0x4,%edx
call   1090 <read@plt>
cltq
cmp    $0x4,%rax
je     138c <main+0x1cc>
lea    0xcdc(%rip),%rdi
call   10c0 <perror@plt>
jmp    13e2 <main+0x222>
mov    -0x50(%rbp),%rdx
mov    0x2c51(%rip),%rax
mov    (%rax),%edi
mov    0x2c28(%rip),%rax
mov    (%rax),%ecx
lea    -0x38(%rbp),%rsi
call   1030 <inet_ntop@plt>
cmp    $0x0,%rax
jne    13c6 <main+0x206>
lea    0xca9(%rip),%rdi
call   10c0 <perror@plt>
jmp    13e2 <main+0x222>
mov    -0x50(%rbp),%rsi
lea    0xc61(%rip),%rdi
call   1060 <printf@plt>
mov    0x2bdb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%edi
call   1080 <close@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r15
mov    %rsp,%r12
mov    0x2de2(%rip),%rax
mov    (%rax),%r14d
mov    0x2de0(%rip),%r13
mov    0x0(%r13),%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
cmp    $0x1,%edi
jg     121a <main+0x5a>
mov    0x2dc7(%rip),%rax
mov    (%rax),%edi
mov    (%r15),%rdx
lea    0xdeb(%rip),%rsi
jmp    133e <main+0x17e>
mov    0x2dc7(%rip),%rax
mov    (%rax),%edi
mov    0x8(%r15),%rsi
lea    -0x40(%rbp),%rdx
call   10b0 <inet_pton@plt>
test   %eax,%eax
js     1358 <main+0x198>
je     132a <main+0x16a>
mov    0x2d9b(%rip),%rax
mov    (%rax),%edi
mov    0x2d62(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10e0 <socket@plt>
test   %eax,%eax
js     1366 <main+0x1a6>
mov    %eax,%r15d
mov    %r12,-0x30(%rbp)
lea    -0x48(%rbp),%r12
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1070 <memset@plt>
mov    0x2d60(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    -0x48(%rbp),%edi
lea    0xdb0(%rip),%rsi
call   1040 <strcpy@plt>
mov    %r15d,%edi
mov    %r12,%rsi
mov    $0x8,%edx
call   10d0 <connect@plt>
test   %rax,%rax
js     1374 <main+0x1b4>
lea    -0x40(%rbp),%rsi
mov    %r15d,%edi
mov    $0x4,%edx
call   1050 <write@plt>
cmp    $0x4,%eax
jne    137d <main+0x1bd>
lea    -0x38(%rbp),%rsi
mov    %r15d,%edi
mov    $0x4,%edx
call   1090 <read@plt>
cmp    $0x4,%eax
mov    -0x30(%rbp),%r12
jne    138f <main+0x1cf>
mov    0x2cfc(%rip),%rax
mov    (%rax),%edi
mov    0x0(%r13),%ecx
lea    -0x38(%rbp),%rsi
mov    %rbx,%rdx
call   1030 <inet_ntop@plt>
test   %rax,%rax
je     139d <main+0x1dd>
lea    0xd24(%rip),%rdi
mov    %rbx,%rsi
call   1060 <printf@plt>
mov    0x2c9b(%rip),%rax
mov    (%rax),%r14d
mov    %r15d,%edi
call   1080 <close@plt>
jmp    1343 <main+0x183>
mov    0x2c9f(%rip),%rax
mov    (%rax),%edi
mov    0x8(%r15),%rdx
lea    0xce3(%rip),%rsi
call   10a0 <fprintf@plt>
mov    %r12,%rsp
mov    %r14d,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xcb6(%rip),%rdi
call   10c0 <perror@plt>
jmp    1343 <main+0x183>
lea    0xcc9(%rip),%rdi
call   10c0 <perror@plt>
jmp    1343 <main+0x183>
lea    0xcd1(%rip),%rdi
jmp    1384 <main+0x1c4>
lea    0xcd2(%rip),%rdi
call   10c0 <perror@plt>
mov    -0x30(%rbp),%r12
jmp    1320 <main+0x160>
lea    0xcc8(%rip),%rdi
call   10c0 <perror@plt>
jmp    1320 <main+0x160>
lea    0xcc1(%rip),%rdi
call   10c0 <perror@plt>
jmp    1320 <main+0x160>

LLVM IR (-O0):
%struct.sockaddr_un = type { i32, i32 }
%struct.in_addr = type { i32 }
%struct.sockaddr = type { i32 }
@EXIT_FAILURE = global i32 0
@INET_ADDRSTRLEN = global i32 0
@stderr = global i32 0
@.str = [21 x i8] c"usage: %s <address>\0A\00"
@AF_INET = global i32 0
@.str.1 = [12 x i8] c"inet_pton()\00"
@.str.2 = [21 x i8] c"invalid address: %s\0A\00"
@AF_UNIX = global i32 0
@SOCK_SEQPACKET = global i32 0
@.str.3 = [9 x i8] c"socket()\00"
@.str.4 = [13 x i8] c"ipremap.sock\00"
@.str.5 = [10 x i8] c"connect()\00"
@.str.6 = [8 x i8] c"write()\00"
@.str.7 = [7 x i8] c"read()\00"
@.str.8 = [12 x i8] c"inet_ntop()\00"
@.str.9 = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca %struct.sockaddr_un
%10 = alloca %struct.in_addr
%11 = alloca %struct.in_addr
%12 = alloca i8*
%13 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* @EXIT_FAILURE
store i32 %14, i32* %6
%15 = load i32, i32* @INET_ADDRSTRLEN
%16 = zext i32 %15 to i64
%17 = call i8* @llvm.stacksave()
store i8* %17, i8** %12
%18 = alloca i8, i64 %16
store i64 %16, i64* %13
%19 = load i32, i32* %4
%20 = icmp slt i32 %19, 2
br i1 %20, label %21, label %27
21: ; preds = %2
%22 = load i32, i32* @stderr
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 0
%25 = load i8*, i8** %24
%26 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %25)
br label %95
27: ; preds = %2
%28 = load i32, i32* @AF_INET
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = call i32 @inet_pton(i32 %28, i8* %31, %struct.in_addr* %10)
store i32 %32, i32* %7
%33 = load i32, i32* %7
%34 = icmp slt i32 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %27
%36 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %95
37: ; preds = %27
%38 = load i32, i32* %7
%39 = icmp eq i32 %38, 0
br i1 %39, label %40, label %46
40: ; preds = %37
%41 = load i32, i32* @stderr
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 1
%44 = load i8*, i8** %43
%45 = call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %44)
br label %95
46: ; preds = %37
br label %47
47: ; preds = %46
%48 = load i32, i32* @AF_UNIX
%49 = load i32, i32* @SOCK_SEQPACKET
%50 = call i32 @socket(i32 %48, i32 %49, i32 0)
store i32 %50, i32* %8
%51 = load i32, i32* %8
%52 = icmp slt i32 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %47
%54 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %95
55: ; preds = %47
%56 = call i32 @memset(%struct.sockaddr_un* %9, i32 0, i32 8)
%57 = load i32, i32* @AF_UNIX
%58 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %9, i32 0, i32 1
store i32 %57, i32* %58
%59 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %9, i32 0, i32 0
%60 = load i32, i32* %59
%61 = call i32 @strcpy(i32 %60, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%62 = load i32, i32* %8
%63 = bitcast %struct.sockaddr_un* %9 to %struct.sockaddr*
%64 = call i64 @connect(i32 %62, %struct.sockaddr* %63, i32 8)
%65 = icmp slt i64 %64, 0
br i1 %65, label %66, label %68
66: ; preds = %55
%67 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
br label %92
68: ; preds = %55
%69 = load i32, i32* %8
%70 = call i32 @write(i32 %69, %struct.in_addr* %10, i32 4)
%71 = sext i32 %70 to i64
%72 = icmp ne i64 %71, 4
br i1 %72, label %73, label %75
73: ; preds = %68
%74 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %92
75: ; preds = %68
%76 = load i32, i32* %8
%77 = call i32 @read(i32 %76, %struct.in_addr* %11, i32 4)
%78 = sext i32 %77 to i64
%79 = icmp ne i64 %78, 4
br i1 %79, label %80, label %82
80: ; preds = %75
%81 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
br label %92
82: ; preds = %75
%83 = load i32, i32* @AF_INET
%84 = load i32, i32* @INET_ADDRSTRLEN
%85 = call i32* @inet_ntop(i32 %83, %struct.in_addr* %11, i8* %18, i32 %84)
%86 = icmp eq i32* %85, null
br i1 %86, label %87, label %89
87: ; preds = %82
%88 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
br label %92
89: ; preds = %82
%90 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* %18)
%91 = load i32, i32* @EXIT_SUCCESS
store i32 %91, i32* %6
br label %92
92: ; preds = %89, %87, %80, %73, %66
%93 = load i32, i32* %8
%94 = call i32 @close(i32 %93)
br label %95
95: ; preds = %92, %53, %40, %35, %21
%96 = load i32, i32* %6
store i32 %96, i32* %3
%97 = load i8*, i8** %12
%98 = load i32, i32* %3
ret i32 %98
}

LLVM IR (-O2):
%struct.sockaddr_un = type { i32, i32 }
%struct.in_addr = type { i32 }
%struct.sockaddr = type { i32 }
@EXIT_FAILURE = global i32 0
@INET_ADDRSTRLEN = global i32 0
@stderr = global i32 0
@.str = [21 x i8] c"usage: %s <address>\0A\00"
@AF_INET = global i32 0
@.str.1 = [12 x i8] c"inet_pton()\00"
@.str.2 = [21 x i8] c"invalid address: %s\0A\00"
@AF_UNIX = global i32 0
@SOCK_SEQPACKET = global i32 0
@.str.3 = [9 x i8] c"socket()\00"
@.str.4 = [13 x i8] c"ipremap.sock\00"
@.str.5 = [10 x i8] c"connect()\00"
@.str.6 = [8 x i8] c"write()\00"
@.str.7 = [7 x i8] c"read()\00"
@.str.8 = [12 x i8] c"inet_ntop()\00"
@.str.9 = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.sockaddr_un
%4 = alloca %struct.in_addr
%5 = alloca %struct.in_addr
%6 = load i32, i32* @EXIT_FAILURE
%7 = bitcast %struct.sockaddr_un* %3 to i8*
%8 = bitcast %struct.in_addr* %4 to i8*
%9 = bitcast %struct.in_addr* %5 to i8*
%10 = load i32, i32* @INET_ADDRSTRLEN
%11 = zext i32 %10 to i64
%12 = tail call i8* @llvm.stacksave()
%13 = alloca i8, i64 %11
%14 = icmp slt i32 %0, 2
br i1 %14, label %15, label %19
15: ; preds = %2
%16 = load i32, i32* @stderr
%17 = load i8*, i8** %1
%18 = tail call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %17)
br label %75
19: ; preds = %2
%20 = load i32, i32* @AF_INET
%21 = getelementptr inbounds i8*, i8** %1, i64 1
%22 = load i8*, i8** %21
%23 = call i32 @inet_pton(i32 %20, i8* %22, %struct.in_addr* %4)
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %19
%26 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %75
27: ; preds = %19
%28 = icmp eq i32 %23, 0
br i1 %28, label %29, label %33
29: ; preds = %27
%30 = load i32, i32* @stderr
%31 = load i8*, i8** %21
%32 = call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %31)
br label %75
33: ; preds = %27
%34 = load i32, i32* @AF_UNIX
%35 = load i32, i32* @SOCK_SEQPACKET
%36 = call i32 @socket(i32 %34, i32 %35, i32 0)
%37 = icmp slt i32 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %33
%39 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %75
40: ; preds = %33
%41 = call i32 @memset(%struct.sockaddr_un* %3, i32 0, i32 8)
%42 = load i32, i32* @AF_UNIX
%43 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %3, i64 0, i32 1
store i32 %42, i32* %43
%44 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %3, i64 0, i32 0
%45 = load i32, i32* %44
%46 = call i32 @strcpy(i32 %45, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%47 = bitcast %struct.sockaddr_un* %3 to %struct.sockaddr*
%48 = call i64 @connect(i32 %36, %struct.sockaddr* %47, i32 8)
%49 = icmp slt i64 %48, 0
br i1 %49, label %50, label %52
50: ; preds = %40
%51 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
br label %72
52: ; preds = %40
%53 = call i32 @write(i32 %36, %struct.in_addr* %4, i32 4)
%54 = icmp eq i32 %53, 4
br i1 %54, label %57, label %55
55: ; preds = %52
%56 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %72
57: ; preds = %52
%58 = call i32 @read(i32 %36, %struct.in_addr* %5, i32 4)
%59 = icmp eq i32 %58, 4
br i1 %59, label %62, label %60
60: ; preds = %57
%61 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
br label %72
62: ; preds = %57
%63 = load i32, i32* @AF_INET
%64 = load i32, i32* @INET_ADDRSTRLEN
%65 = call i32* @inet_ntop(i32 %63, %struct.in_addr* %5, i8* %13, i32 %64)
%66 = icmp eq i32* %65, null
br i1 %66, label %67, label %69
67: ; preds = %62
%68 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
br label %72
69: ; preds = %62
%70 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* %13)
%71 = load i32, i32* @EXIT_SUCCESS
br label %72
72: ; preds = %69, %67, %60, %55, %50
%73 = phi i32 [ %6, %50 ], [ %6, %55 ], [ %6, %60 ], [ %6, %67 ], [ %71, %69 ]
%74 = call i32 @close(i32 %36)
br label %75
75: ; preds = %72, %38, %29, %25, %15
%76 = phi i32 [ %6, %15 ], [ %6, %25 ], [ %6, %29 ], [ %6, %38 ], [ %73, %72 ]
ret i32 %76
}