#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_in {
  int /*<<< orphan*/ sin_addr;
  int /*<<< orphan*/ sin_port;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ fd_set;
typedef int /*<<< orphan*/ addr;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
scalar_t__ FD_ISSET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ FD_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ FD_ZERO(int /*<<< orphan*/ *);
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ close(int);
int connect(int, struct sockaddr *, int);
int /*<<< orphan*/ err_quit(char *);
int /*<<< orphan*/ err_sys(char *);
int /*<<< orphan*/ htons(int /*<<< orphan*/);
int /*<<< orphan*/ inet_pton(int /*<<< orphan*/, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int read(int, char *, int);
int select(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
           int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int send(int, char *, int, int /*<<< orphan*/);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int strlen(char *);
int main(int argc, char **argv) {
  if (argc != 3)
    err_quit("usage:./tcp_client ip port");
  int ret;
  int sockfd;
  sockfd = socket(AF_INET, SOCK_STREAM, 0);
  if (sockfd < 0)
    err_sys("socket error");
  struct sockaddr_in addr;
  addr.sin_family = AF_INET;
  addr.sin_port = htons(atoi(argv[2]));
  inet_pton(AF_INET, argv[1], &addr.sin_addr);
  ret = connect(sockfd, (struct sockaddr *)&addr, sizeof(addr));
  if (ret < 0)
    err_sys("connect error");
  fd_set read_set;
  int flag = 0;
  for (;;) {
    int n;
    char buffer[1024];
    FD_ZERO(&read_set);
    if (flag == 0)
      FD_SET(0, &read_set);
    FD_SET(sockfd, &read_set);
    ret = select(sockfd + 1, &read_set, NULL, NULL, NULL);
    if (ret < 0)
      err_sys("select error");
    else {
      if (FD_ISSET(0, &read_set)) {
        n = read(0, buffer, 1024);
        buffer[n] = '\0';
        n = send(sockfd, buffer, strlen(buffer), 0);
        if (n < strlen(buffer))
          err_sys("send error");
      }
      if (FD_ISSET(sockfd, &read_set)) {
        n = read(sockfd, buffer, 1024);
        if (n == 0) {
          printf("serve disconnect");
          break;
        }
        buffer[n] = '\0';
        printf("%s\n", buffer);
      }
    }
  }
  close(sockfd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x460,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     122f <main+0x2f>
lea    0xdd6(%rip),%rdi
call   10a0 <err_quit@plt>
mov    0x2db2(%rip),%rax
mov    (%rax),%edi
mov    0x2d99(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1120 <socket@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1261 <main+0x61>
lea    0xdbf(%rip),%rdi
call   1030 <err_sys@plt>
mov    0x2d80(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10f0 <atoi@plt>
mov    %eax,%edi
call   1060 <htons@plt>
mov    %eax,-0x24(%rbp)
mov    0x2d5d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    -0x28(%rbp),%rdx
call   10c0 <inet_pton@plt>
mov    -0x18(%rbp),%edi
lea    -0x28(%rbp),%rsi
mov    $0xc,%edx
call   1100 <connect@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    12c8 <main+0xc8>
lea    0xd65(%rip),%rdi
call   1030 <err_sys@plt>
movl   $0x0,-0x30(%rbp)
lea    -0x2c(%rbp),%rdi
call   10d0 <FD_ZERO@plt>
cmpl   $0x0,-0x30(%rbp)
jne    12ed <main+0xed>
xor    %edi,%edi
lea    -0x2c(%rbp),%rsi
call   1110 <FD_SET@plt>
mov    -0x18(%rbp),%edi
lea    -0x2c(%rbp),%rsi
call   1110 <FD_SET@plt>
mov    -0x18(%rbp),%edi
add    $0x1,%edi
lea    -0x2c(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rdx
mov    %r8,%rcx
call   10e0 <select@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1331 <main+0x131>
lea    0xd0f(%rip),%rdi
call   1030 <err_sys@plt>
jmp    144a <main+0x24a>
xor    %edi,%edi
lea    -0x2c(%rbp),%rsi
call   1040 <FD_ISSET@plt>
cmp    $0x0,%rax
je     13da <main+0x1da>
lea    -0x440(%rbp),%rsi
xor    %edi,%edi
mov    $0x400,%edx
call   10b0 <read@plt>
mov    %eax,-0x34(%rbp)
movslq -0x34(%rbp),%rax
movb   $0x0,-0x440(%rbp,%rax,1)
mov    -0x18(%rbp),%eax
mov    %eax,-0x454(%rbp)
lea    -0x440(%rbp),%rax
mov    %rax,-0x450(%rbp)
lea    -0x440(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x454(%rbp),%edi
mov    -0x450(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1070 <send@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x444(%rbp)
lea    -0x440(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x444(%rbp),%eax
cmp    %ecx,%eax
jge    13d5 <main+0x1d5>
lea    0xc73(%rip),%rdi
call   1030 <err_sys@plt>
jmp    13da <main+0x1da>
mov    -0x18(%rbp),%edi
lea    -0x2c(%rbp),%rsi
call   1040 <FD_ISSET@plt>
cmp    $0x0,%rax
je     1445 <main+0x245>
mov    -0x18(%rbp),%edi
lea    -0x440(%rbp),%rsi
mov    $0x400,%edx
call   10b0 <read@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
jne    1424 <main+0x224>
lea    0xc36(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    144f <main+0x24f>
movslq -0x34(%rbp),%rax
movb   $0x0,-0x440(%rbp,%rax,1)
lea    -0x440(%rbp),%rsi
lea    0xc21(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    144a <main+0x24a>
jmp    12cf <main+0xcf>
mov    -0x18(%rbp),%edi
call   1090 <close@plt>
xor    %eax,%eax
add    $0x460,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x418,%rsp
mov    %rsi,%rbp
cmp    $0x3,%edi
je     1235 <main+0x25>
lea    0xdd0(%rip),%rdi
call   10b0 <err_quit@plt>
mov    0x2dac(%rip),%r14
mov    (%r14),%edi
mov    0x2d92(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1130 <socket@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1261 <main+0x51>
lea    0xdbf(%rip),%rdi
call   1040 <err_sys@plt>
mov    (%r14),%eax
mov    %eax,0x8(%rsp)
mov    0x10(%rbp),%rdi
call   1100 <atoi@plt>
mov    %eax,%edi
call   1070 <htons@plt>
mov    %eax,0x4(%rsp)
mov    (%r14),%edi
mov    0x8(%rbp),%rsi
mov    %rsp,%rbp
mov    %rbp,%rdx
call   10d0 <inet_pton@plt>
mov    %ebx,%edi
mov    %rbp,%rsi
mov    $0xc,%edx
call   1110 <connect@plt>
test   %eax,%eax
jns    12ad <main+0x9d>
lea    0xd80(%rip),%rdi
call   1040 <err_sys@plt>
mov    %ebx,%r14d
add    $0x1,%r14d
lea    0xc(%rsp),%rbp
lea    0xd76(%rip),%r15
lea    0x10(%rsp),%r12
jmp    12d8 <main+0xc8>
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1040 <err_sys@plt>
mov    %rbp,%rdi
call   10e0 <FD_ZERO@plt>
xor    %edi,%edi
mov    %rbp,%rsi
call   1120 <FD_SET@plt>
mov    %ebx,%edi
mov    %rbp,%rsi
call   1120 <FD_SET@plt>
mov    %r14d,%edi
mov    %rbp,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   10f0 <select@plt>
test   %eax,%eax
js     12d0 <main+0xc0>
xor    %edi,%edi
mov    %rbp,%rsi
call   1050 <FD_ISSET@plt>
test   %rax,%rax
je     1361 <main+0x151>
xor    %edi,%edi
mov    %r12,%rsi
mov    $0x400,%edx
call   10c0 <read@plt>
cltq
movb   $0x0,0x10(%rsp,%rax,1)
mov    %r12,%rdi
call   1060 <strlen@plt>
mov    %ebx,%edi
mov    %r12,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1080 <send@plt>
mov    %eax,%r13d
mov    %r12,%rdi
call   1060 <strlen@plt>
cmp    %eax,%r13d
jge    1361 <main+0x151>
lea    0xce7(%rip),%rdi
call   1040 <err_sys@plt>
mov    %ebx,%edi
mov    %rbp,%rsi
call   1050 <FD_ISSET@plt>
test   %rax,%rax
je     12d8 <main+0xc8>
mov    %ebx,%edi
mov    %r12,%rsi
mov    $0x400,%edx
call   10c0 <read@plt>
test   %eax,%eax
je     139b <main+0x18b>
cltq
movb   $0x0,0x10(%rsp,%rax,1)
mov    %r12,%rdi
call   1030 <puts@plt>
jmp    12d8 <main+0xc8>
lea    0xcac(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %ebx,%edi
call   10a0 <close@plt>
xor    %eax,%eax
add    $0x418,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, i32, i32 }
%struct.sockaddr = type { i32 }
@.str = [27 x i8] c"usage:./tcp_client ip port\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [13 x i8] c"socket error\00"
@.str.2 = [14 x i8] c"connect error\00"
@.str.3 = [13 x i8] c"select error\00"
@.str.4 = [11 x i8] c"send error\00"
@.str.5 = [17 x i8] c"serve disconnect\00"
@.str.6 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.sockaddr_in
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca [1024 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 3
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 @err_quit(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15, %2
%18 = load i32, i32* @AF_INET
%19 = load i32, i32* @SOCK_STREAM
%20 = call i32 @socket(i32 %18, i32 %19, i32 0)
store i32 %20, i32* %7
%21 = load i32, i32* %7
%22 = icmp slt i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %17
%24 = call i32 @err_sys(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %25
25: ; preds = %23, %17
%26 = load i32, i32* @AF_INET
%27 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %8, i32 0, i32 2
store i32 %26, i32* %27
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 2
%30 = load i8*, i8** %29
%31 = call i32 @atoi(i8* %30)
%32 = call i32 @htons(i32 %31)
%33 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %8, i32 0, i32 1
store i32 %32, i32* %33
%34 = load i32, i32* @AF_INET
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 1
%37 = load i8*, i8** %36
%38 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %8, i32 0, i32 0
%39 = call i32 @inet_pton(i32 %34, i8* %37, i32* %38)
%40 = load i32, i32* %7
%41 = bitcast %struct.sockaddr_in* %8 to %struct.sockaddr*
%42 = call i32 @connect(i32 %40, %struct.sockaddr* %41, i32 12)
store i32 %42, i32* %6
%43 = load i32, i32* %6
%44 = icmp slt i32 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %25
%46 = call i32 @err_sys(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %47
47: ; preds = %45, %25
store i32 0, i32* %10
br label %48
48: ; preds = %104, %47
%49 = call i32 @FD_ZERO(i32* %9)
%50 = load i32, i32* %10
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %54
52: ; preds = %48
%53 = call i32 @FD_SET(i32 0, i32* %9)
br label %54
54: ; preds = %52, %48
%55 = load i32, i32* %7
%56 = call i32 @FD_SET(i32 %55, i32* %9)
%57 = load i32, i32* %7
%58 = add nsw i32 %57, 1
%59 = call i32 @select(i32 %58, i32* %9, i32* null, i32* null, i32* null)
store i32 %59, i32* %6
%60 = load i32, i32* %6
%61 = icmp slt i32 %60, 0
br i1 %61, label %62, label %64
62: ; preds = %54
%63 = call i32 @err_sys(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %104
64: ; preds = %54
%65 = call i64 @FD_ISSET(i32 0, i32* %9)
%66 = icmp ne i64 %65, 0
br i1 %66, label %67, label %85
67: ; preds = %64
%68 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%69 = call i32 @read(i32 0, i8* %68, i32 1024)
store i32 %69, i32* %11
%70 = load i32, i32* %11
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 %71
store i8 0, i8* %72
%73 = load i32, i32* %7
%74 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%75 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%76 = call i32 @strlen(i8* %75)
%77 = call i32 @send(i32 %73, i8* %74, i32 %76, i32 0)
store i32 %77, i32* %11
%78 = load i32, i32* %11
%79 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%80 = call i32 @strlen(i8* %79)
%81 = icmp slt i32 %78, %80
br i1 %81, label %82, label %84
82: ; preds = %67
%83 = call i32 @err_sys(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
br label %84
84: ; preds = %82, %67
br label %85
85: ; preds = %84, %64
%86 = load i32, i32* %7
%87 = call i64 @FD_ISSET(i32 %86, i32* %9)
%88 = icmp ne i64 %87, 0
br i1 %88, label %89, label %103
89: ; preds = %85
%90 = load i32, i32* %7
%91 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%92 = call i32 @read(i32 %90, i8* %91, i32 1024)
store i32 %92, i32* %11
%93 = load i32, i32* %11
%94 = icmp eq i32 %93, 0
br i1 %94, label %95, label %97
95: ; preds = %89
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
br label %105
97: ; preds = %89
%98 = load i32, i32* %11
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 %99
store i8 0, i8* %100
%101 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %101)
br label %103
103: ; preds = %97, %85
br label %104
104: ; preds = %103, %62
br label %48
105: ; preds = %95
%106 = load i32, i32* %7
%107 = call i32 @close(i32 %106)
ret i32 0
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, i32, i32 }
%struct.sockaddr = type { i32 }
@.str = [27 x i8] c"usage:./tcp_client ip port\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [13 x i8] c"socket error\00"
@.str.2 = [14 x i8] c"connect error\00"
@.str.3 = [13 x i8] c"select error\00"
@.str.4 = [11 x i8] c"send error\00"
@.str.5 = [17 x i8] c"serve disconnect\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.sockaddr_in
%4 = alloca i32
%5 = alloca [1024 x i8]
%6 = icmp eq i32 %0, 3
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = tail call i32 @err_quit(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
%10 = load i32, i32* @AF_INET
%11 = load i32, i32* @SOCK_STREAM
%12 = tail call i32 @socket(i32 %10, i32 %11, i32 0)
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = tail call i32 @err_sys(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %9
%17 = bitcast %struct.sockaddr_in* %3 to i8*
%18 = load i32, i32* @AF_INET
%19 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 2
store i32 %18, i32* %19
%20 = getelementptr inbounds i8*, i8** %1, i64 2
%21 = load i8*, i8** %20
%22 = tail call i32 @atoi(i8* %21)
%23 = tail call i32 @htons(i32 %22)
%24 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 1
store i32 %23, i32* %24
%25 = load i32, i32* @AF_INET
%26 = getelementptr inbounds i8*, i8** %1, i64 1
%27 = load i8*, i8** %26
%28 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 0
%29 = call i32 @inet_pton(i32 %25, i8* %27, i32* %28)
%30 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%31 = call i32 @connect(i32 %12, %struct.sockaddr* %30, i32 12)
%32 = icmp slt i32 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %16
%34 = call i32 @err_sys(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %35
35: ; preds = %33, %16
%36 = bitcast i32* %4 to i8*
%37 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%38 = add nsw i32 %12, 1
br label %39
39: ; preds = %70, %35
%40 = call i32 @FD_ZERO(i32* %4)
%41 = call i32 @FD_SET(i32 0, i32* %4)
%42 = call i32 @FD_SET(i32 %12, i32* %4)
%43 = call i32 @select(i32 %38, i32* %4, i32* null, i32* null, i32* null)
%44 = icmp slt i32 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %39
%46 = call i32 @err_sys(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %70
47: ; preds = %39
%48 = call i64 @FD_ISSET(i32 0, i32* %4)
%49 = icmp eq i64 %48, 0
br i1 %49, label %60, label %50
50: ; preds = %47
%51 = call i32 @read(i32 0, i8* %37, i32 1024)
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %52
store i8 0, i8* %53
%54 = call i32 @strlen(i8* %37)
%55 = call i32 @send(i32 %12, i8* %37, i32 %54, i32 0)
%56 = call i32 @strlen(i8* %37)
%57 = icmp slt i32 %55, %56
br i1 %57, label %58, label %60
58: ; preds = %50
%59 = call i32 @err_sys(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
br label %60
60: ; preds = %50, %58, %47
%61 = call i64 @FD_ISSET(i32 %12, i32* %4)
%62 = icmp eq i64 %61, 0
br i1 %62, label %70, label %63
63: ; preds = %60
%64 = call i32 @read(i32 %12, i8* %37, i32 1024)
%65 = icmp eq i32 %64, 0
br i1 %65, label %71, label %66
66: ; preds = %63
%67 = sext i32 %64 to i64
%68 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %67
store i8 0, i8* %68
%69 = call i32 @puts(i8* %37)
br label %70
70: ; preds = %45, %66, %60
br label %39
71: ; preds = %63
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%73 = call i32 @close(i32 %12)
ret i32 0
}