#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 */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct timeval {
  int tv_sec;
};
struct TYPE_2__ {
  int /*<<< orphan*/ s_addr;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_port;
  TYPE_1__ sin_addr;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ server;
typedef int /*<<< orphan*/ fd_set;

/* 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*/ F_SETFL;
int /*<<< orphan*/ O_NONBLOCK;
int /*<<< orphan*/ SOCK_STREAM;
int accept(int, struct sockaddr *, int *);
scalar_t__ bind(int, struct sockaddr_in *, int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
scalar_t__ fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ htons(int);
int /*<<< orphan*/ inet_addr(char *);
int /*<<< orphan*/ listen(int, int);
int ntohs(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int select(int, int /*<<< orphan*/ *, int /*<<< orphan*/, int /*<<< orphan*/,
           struct timeval *);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
main() {
  char *message = " hello to my server please enter message ";
  char address[] = "192.168.12.211";
  int sock, length;
  struct sockaddr_in server;
  int msgsock;
  char buf[1024];
  int rval;
  fd_set ready;
  struct timeval to;
  sock = socket(AF_INET, SOCK_STREAM, 0);
  if (sock < 0) {
    perror("opening stream socket");
    exit(1);
  }
  int one = 1;
  if (fcntl(sock, F_SETFL, O_NONBLOCK) < 0) {
    perror("ioctl stream socket");
    exit(1);
  };
  server.sin_family = AF_INET;
  server.sin_addr.s_addr = inet_addr(address);
  server.sin_port = htons(3333);
  if (bind(sock, &server, sizeof(server))) {
    perror("binding stream socket");
    exit(1);
  }
  printf("Socket has port #%d\n", ntohs(server.sin_port));
  listen(sock, 5);
  int k = 0;
  do {
    FD_ZERO(&ready);
    FD_SET(sock, &ready);
    to.tv_sec = 30;
    int r = select(sock + 1, &ready, 0, 0, &to);
    printf(" echo server :r is %d \n", r);
    if (r < 0) {
      perror("select");
      continue;
    }
    printf("after select\n");
    if (FD_ISSET(sock, &ready)) {
      msgsock = accept(sock, (struct sockaddr *)0, (int *)0);
      if (msgsock == -1)
        perror("accept");
      else
        printf("succes accept\n");
      close(msgsock);
    } else
      printf("Do something else\n");
  } while (1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x460,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xde7(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe06(%rip),%rax
mov    %rax,-0x1f(%rbp)
mov    0xe04(%rip),%eax
mov    %eax,-0x17(%rbp)
mov    0xdfe(%rip),%ax
mov    %ax,-0x13(%rbp)
mov    0xdf6(%rip),%al
mov    %al,-0x11(%rbp)
mov    0x2d9c(%rip),%rax
mov    (%rax),%edi
mov    0x2d73(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1120 <socket@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    1281 <main+0x81>
lea    0xdc7(%rip),%rdi
call   10e0 <perror@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
movl   $0x1,-0x454(%rbp)
mov    -0x24(%rbp),%edi
mov    0x2d3b(%rip),%rax
mov    (%rax),%esi
mov    0x2d42(%rip),%rax
mov    (%rax),%edx
call   1030 <fcntl@plt>
cmp    $0x0,%rax
jge    12c5 <main+0xc5>
lea    0xd99(%rip),%rdi
call   10e0 <perror@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
mov    0x2d1c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
lea    -0x1f(%rbp),%rdi
call   1080 <inet_addr@plt>
mov    %eax,-0x34(%rbp)
mov    $0xd05,%edi
call   1050 <htons@plt>
mov    %eax,-0x38(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x38(%rbp),%rsi
mov    $0xc,%edx
call   10d0 <bind@plt>
cmp    $0x0,%rax
je     131b <main+0x11b>
lea    0xd57(%rip),%rdi
call   10e0 <perror@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
mov    -0x38(%rbp),%edi
call   10c0 <ntohs@plt>
mov    %eax,%esi
lea    0xd4d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x24(%rbp),%edi
mov    $0x5,%esi
call   10b0 <listen@plt>
movl   $0x0,-0x458(%rbp)
lea    -0x448(%rbp),%rdi
call   1090 <FD_ZERO@plt>
mov    -0x24(%rbp),%edi
lea    -0x448(%rbp),%rsi
call   1110 <FD_SET@plt>
movl   $0x1e,-0x450(%rbp)
mov    -0x24(%rbp),%edi
add    $0x1,%edi
lea    -0x448(%rbp),%rsi
xor    %ecx,%ecx
lea    -0x450(%rbp),%r8
mov    %ecx,%edx
call   10a0 <select@plt>
mov    %eax,-0x45c(%rbp)
mov    -0x45c(%rbp),%esi
lea    0xcef(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x0,-0x45c(%rbp)
jge    13c4 <main+0x1c4>
lea    0xcec(%rip),%rdi
call   10e0 <perror@plt>
jmp    1446 <main+0x246>
lea    0xce2(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x24(%rbp),%edi
lea    -0x448(%rbp),%rsi
call   1040 <FD_ISSET@plt>
cmp    $0x0,%rax
je     1433 <main+0x233>
mov    -0x24(%rbp),%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   10f0 <accept@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0xffffffff,-0x3c(%rbp)
jne    1418 <main+0x218>
lea    0xcad(%rip),%rdi
call   10e0 <perror@plt>
jmp    1426 <main+0x226>
lea    0xca3(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x3c(%rbp),%edi
call   1070 <close@plt>
jmp    1441 <main+0x241>
lea    0xc97(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1446 <main+0x246>
mov    $0x1,%al
test   $0x1,%al
jne    134a <main+0x14a>
jmp    1455 <main+0x255>
mov    -0x4(%rbp),%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    $0x28,%rsp
movabs $0x3131322e32312e,%rax
mov    %rax,0x1f(%rsp)
movabs $0x2e3836312e323931,%rax
36 38 2e
mov    %rax,0x18(%rsp)
mov    0x2da5(%rip),%rbx
mov    (%rbx),%edi
mov    0x2d7c(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1130 <socket@plt>
test   %eax,%eax
js     13c7 <main+0x1b7>
mov    %eax,%r14d
mov    0x2d69(%rip),%rax
mov    (%rax),%esi
mov    0x2d70(%rip),%rax
mov    (%rax),%edx
mov    %r14d,%edi
call   1040 <fcntl@plt>
test   %rax,%rax
js     13d0 <main+0x1c0>
mov    (%rbx),%eax
mov    %eax,0x10(%rsp)
lea    0x18(%rsp),%rdi
call   1090 <inet_addr@plt>
mov    %eax,0xc(%rsp)
mov    $0xd05,%edi
call   1060 <htons@plt>
mov    %eax,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    %r14d,%edi
mov    $0xc,%edx
call   10e0 <bind@plt>
test   %rax,%rax
jne    13d9 <main+0x1c9>
mov    0x8(%rsp),%edi
call   10d0 <ntohs@plt>
lea    0xd7f(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14d,%edi
mov    $0x5,%esi
call   10c0 <listen@plt>
mov    %r14d,%r15d
add    $0x1,%r15d
lea    0x14(%rsp),%r12
mov    %rsp,%r13
lea    0xd68(%rip),%rbp
jmp    130c <main+0xfc>
xchg   %ax,%ax
lea    0xd7b(%rip),%rdi
call   10f0 <perror@plt>
mov    %r12,%rdi
call   10a0 <FD_ZERO@plt>
mov    %r14d,%edi
mov    %r12,%rsi
call   1120 <FD_SET@plt>
movl   $0x1e,(%rsp)
mov    %r15d,%edi
mov    %r12,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %r13,%r8
call   10b0 <select@plt>
mov    %eax,%ebx
mov    %rbp,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1070 <printf@plt>
test   %ebx,%ebx
js     1300 <main+0xf0>
lea    0xd2b(%rip),%rdi
call   1030 <puts@plt>
mov    %r14d,%edi
mov    %r12,%rsi
call   1050 <FD_ISSET@plt>
test   %rax,%rax
jne    1380 <main+0x170>
lea    0xd1c(%rip),%rdi
call   1030 <puts@plt>
jmp    130c <main+0xfc>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbp,%rbx
mov    %r13,%rbp
mov    %r14d,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1100 <accept@plt>
mov    %eax,%r13d
cmp    $0xffffffff,%eax
jne    13a8 <main+0x198>
lea    0xd01(%rip),%rdi
call   10f0 <perror@plt>
jmp    13b4 <main+0x1a4>
lea    0xcec(%rip),%rdi
call   1030 <puts@plt>
mov    %r13d,%edi
call   1080 <close@plt>
mov    %rbp,%r13
mov    %rbx,%rbp
jmp    130c <main+0xfc>
lea    0xc41(%rip),%rdi
jmp    13e0 <main+0x1d0>
lea    0xc4e(%rip),%rdi
jmp    13e0 <main+0x1d0>
lea    0xc59(%rip),%rdi
call   10f0 <perror@plt>
mov    $0x1,%edi
call   1110 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.timeval = type { i32 }
%struct.sockaddr = type { i32 }
@.str = [42 x i8] c" hello to my server please enter message \00"
@__const.main.address = [15 x i8] c"192.168.12.211\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [22 x i8] c"opening stream socket\00"
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
@.str.2 = [20 x i8] c"ioctl stream socket\00"
@.str.3 = [22 x i8] c"binding stream socket\00"
@.str.4 = [21 x i8] c"Socket has port #%d\0A\00"
@.str.5 = [24 x i8] c" echo server :r is %d \0A\00"
@.str.6 = [7 x i8] c"select\00"
@.str.7 = [14 x i8] c"after select\0A\00"
@.str.8 = [7 x i8] c"accept\00"
@.str.9 = [15 x i8] c"succes accept\0A\00"
@.str.10 = [19 x i8] c"Do something else\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca [15 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.sockaddr_in
%7 = alloca i32
%8 = alloca [1024 x i8]
%9 = alloca i32
%10 = alloca i32
%11 = alloca %struct.timeval
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8** %2
%15 = bitcast [15 x i8]* %3 to i8*
%16 = load i32, i32* @AF_INET
%17 = load i32, i32* @SOCK_STREAM
%18 = call i32 @socket(i32 %16, i32 %17, i32 0)
store i32 %18, i32* %4
%19 = load i32, i32* %4
%20 = icmp slt i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %0
%22 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%23 = call i32 @exit(i32 1)
unreachable
24: ; preds = %0
store i32 1, i32* %12
%25 = load i32, i32* %4
%26 = load i32, i32* @F_SETFL
%27 = load i32, i32* @O_NONBLOCK
%28 = call i64 @fcntl(i32 %25, i32 %26, i32 %27)
%29 = icmp slt i64 %28, 0
br i1 %29, label %30, label %33
30: ; preds = %24
%31 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%32 = call i32 @exit(i32 1)
unreachable
33: ; preds = %24
%34 = load i32, i32* @AF_INET
%35 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i32 0, i32 2
store i32 %34, i32* %35
%36 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%37 = call i32 @inet_addr(i8* %36)
%38 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i32 0, i32 1
%39 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %38, i32 0, i32 0
store i32 %37, i32* %39
%40 = call i32 @htons(i32 3333)
%41 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i32 0, i32 0
store i32 %40, i32* %41
%42 = load i32, i32* %4
%43 = call i64 @bind(i32 %42, %struct.sockaddr_in* %6, i32 12)
%44 = icmp ne i64 %43, 0
br i1 %44, label %45, label %48
45: ; preds = %33
%46 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%47 = call i32 @exit(i32 1)
unreachable
48: ; preds = %33
%49 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %6, i32 0, i32 0
%50 = load i32, i32* %49
%51 = call i32 @ntohs(i32 %50)
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %51)
%53 = load i32, i32* %4
%54 = call i32 @listen(i32 %53, i32 5)
store i32 0, i32* %13
br label %55
55: ; preds = %89, %48
%56 = call i32 @FD_ZERO(i32* %10)
%57 = load i32, i32* %4
%58 = call i32 @FD_SET(i32 %57, i32* %10)
%59 = getelementptr inbounds %struct.timeval, %struct.timeval* %11, i32 0, i32 0
store i32 30, i32* %59
%60 = load i32, i32* %4
%61 = add nsw i32 %60, 1
%62 = call i32 @select(i32 %61, i32* %10, i32 0, i32 0, %struct.timeval* %11)
store i32 %62, i32* %14
%63 = load i32, i32* %14
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %63)
%65 = load i32, i32* %14
%66 = icmp slt i32 %65, 0
br i1 %66, label %67, label %69
67: ; preds = %55
%68 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
br label %89
69: ; preds = %55
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
%71 = load i32, i32* %4
%72 = call i64 @FD_ISSET(i32 %71, i32* %10)
%73 = icmp ne i64 %72, 0
br i1 %73, label %74, label %86
74: ; preds = %69
%75 = load i32, i32* %4
%76 = call i32 @accept(i32 %75, %struct.sockaddr* null, i32* null)
store i32 %76, i32* %7
%77 = load i32, i32* %7
%78 = icmp eq i32 %77, -1
br i1 %78, label %79, label %81
79: ; preds = %74
%80 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %83
81: ; preds = %74
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0))
br label %83
83: ; preds = %81, %79
%84 = load i32, i32* %7
%85 = call i32 @close(i32 %84)
br label %88
86: ; preds = %69
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))
br label %88
88: ; preds = %86, %83
br label %89
89: ; preds = %88, %67
br i1 true, label %55, label %90
90: ; preds = %89
%91 = load i32, i32* %1
ret i32 %91
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.timeval = type { i32 }
%struct.sockaddr = type { i32 }
@__const.main.address = [15 x i8] c"192.168.12.211\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.1 = [22 x i8] c"opening stream socket\00"
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
@.str.2 = [20 x i8] c"ioctl stream socket\00"
@.str.3 = [22 x i8] c"binding stream socket\00"
@.str.4 = [21 x i8] c"Socket has port #%d\0A\00"
@.str.5 = [24 x i8] c" echo server :r is %d \0A\00"
@.str.6 = [7 x i8] c"select\00"
@.str.8 = [7 x i8] c"accept\00"
@str = [13 x i8] c"after select\00"
@str.11 = [18 x i8] c"Do something else\00"
@str.12 = [14 x i8] c"succes accept\00"
define i32 @main() {
%1 = alloca [15 x i8]
%2 = alloca %struct.sockaddr_in
%3 = alloca i32
%4 = alloca %struct.timeval
%5 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%6 = bitcast %struct.sockaddr_in* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast %struct.timeval* %4 to i8*
%9 = load i32, i32* @AF_INET
%10 = load i32, i32* @SOCK_STREAM
%11 = tail call i32 @socket(i32 %9, i32 %10, i32 0)
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %0
%14 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%15 = tail call i32 @exit(i32 1)
unreachable
16: ; preds = %0
%17 = load i32, i32* @F_SETFL
%18 = load i32, i32* @O_NONBLOCK
%19 = tail call i64 @fcntl(i32 %11, i32 %17, i32 %18)
%20 = icmp slt i64 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %16
%22 = tail call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%23 = tail call i32 @exit(i32 1)
unreachable
24: ; preds = %16
%25 = load i32, i32* @AF_INET
%26 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 2
store i32 %25, i32* %26
%27 = call i32 @inet_addr(i8* %5)
%28 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 1, i32 0
store i32 %27, i32* %28
%29 = call i32 @htons(i32 3333)
%30 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 0
store i32 %29, i32* %30
%31 = call i64 @bind(i32 %11, %struct.sockaddr_in* %2, i32 12)
%32 = icmp eq i64 %31, 0
br i1 %32, label %36, label %33
33: ; preds = %24
%34 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%35 = call i32 @exit(i32 1)
unreachable
36: ; preds = %24
%37 = load i32, i32* %30
%38 = call i32 @ntohs(i32 %37)
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %38)
%40 = call i32 @listen(i32 %11, i32 5)
%41 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 0
%42 = add nuw nsw i32 %11, 1
br label %43
43: ; preds = %64, %36
%44 = call i32 @FD_ZERO(i32* %3)
%45 = call i32 @FD_SET(i32 %11, i32* %3)
store i32 30, i32* %41
%46 = call i32 @select(i32 %42, i32* %3, i32 0, i32 0, %struct.timeval* %4)
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %46)
%48 = icmp slt i32 %46, 0
br i1 %48, label %49, label %51
49: ; preds = %43
%50 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
br label %64
51: ; preds = %43
%52 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%53 = call i64 @FD_ISSET(i32 %11, i32* %3)
%54 = icmp eq i64 %53, 0
br i1 %54, label %65, label %55
55: ; preds = %51
%56 = call i32 @accept(i32 %11, %struct.sockaddr* null, i32* null)
%57 = icmp eq i32 %56, -1
br i1 %57, label %58, label %60
58: ; preds = %55
%59 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %62
60: ; preds = %55
%61 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.12, i64 0, i64 0))
br label %62
62: ; preds = %60, %58
%63 = call i32 @close(i32 %56)
br label %64
64: ; preds = %62, %65, %49
br label %43
65: ; preds = %51
%66 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.11, i64 0, i64 0))
br label %64
}