#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 pollfd {
  int revents;
  int /*<<< orphan*/ fd;
};
typedef int ssize_t;

/* Variables and functions */
int POLLERR;
int POLLHUP;
int POLLIN;
int POLLNVAL;
int /*<<< orphan*/ SHUT_RDWR;
int /*<<< orphan*/ dbgprintf(int, char *, ...);
int pump(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ shutdown(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ warnx(char *);
int poll_loop_body(int fd_index, int n_socks, struct pollfd *socks,
                   const char **str_addrs) {
  int i;
  ssize_t nbytes;
  if (socks[fd_index].revents & (POLLHUP | POLLNVAL)) {
    for (i = 0; i < n_socks; ++i)
      shutdown(socks[i].fd, SHUT_RDWR);
    return 1;
  }
  if (socks[fd_index].revents & POLLERR) {
    for (i = 0; i < n_socks; ++i)
      shutdown(socks[i].fd, SHUT_RDWR);
    return 1;
  }
  if (socks[fd_index].revents & POLLIN) {
    for (i = 0; i < n_socks; ++i) {
      if (i == fd_index)
        continue;
      dbgprintf(1, "# %s -> %s\n", str_addrs[fd_index], str_addrs[i]);
      nbytes = pump(socks[fd_index].fd, socks[i].fd);
      dbgprintf(2, "\n\n");
      if (nbytes == -1) {
        warnx("pump");
      } else if (nbytes == 0) {
        dbgprintf(1, "# one of ends closed connection, closing sockets, "
                     "awaiting new connection...\n");
        for (i = 0; i < n_socks; ++i)
          shutdown(socks[i].fd, SHUT_RDWR);
        return 1;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<poll_loop_body>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%eax
mov    0x2e78(%rip),%rcx
mov    (%rcx),%ecx
mov    0x2e5f(%rip),%rdx
or     (%rdx),%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     11c5 <poll_loop_body+0x85>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11b9 <poll_loop_body+0x79>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    0x4(%rax,%rcx,8),%edi
mov    0x2e4c(%rip),%rax
mov    (%rax),%esi
call   1040 <shutdown@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1185 <poll_loop_body+0x45>
movl   $0x1,-0x4(%rbp)
jmp    136b <poll_loop_body+0x22b>
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%eax
mov    0x2e01(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1229 <poll_loop_body+0xe9>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    121d <poll_loop_body+0xdd>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    0x4(%rax,%rcx,8),%edi
mov    0x2de8(%rip),%rax
mov    (%rax),%esi
call   1040 <shutdown@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11e9 <poll_loop_body+0xa9>
movl   $0x1,-0x4(%rbp)
jmp    136b <poll_loop_body+0x22b>
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%eax
mov    0x2d8d(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
je     1364 <poll_loop_body+0x224>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    135f <poll_loop_body+0x21f>
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    126a <poll_loop_body+0x12a>
jmp    1351 <poll_loop_body+0x211>
mov    -0x20(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
mov    $0x1,%edi
lea    0xd72(%rip),%rsi
mov    $0x0,%al
call   1060 <dbgprintf@plt>
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    0x4(%rax,%rcx,8),%edi
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    0x4(%rax,%rcx,8),%esi
call   1030 <pump@plt>
mov    %eax,-0x28(%rbp)
mov    $0x2,%edi
lea    0xd4b(%rip),%rsi
mov    $0x0,%al
call   1060 <dbgprintf@plt>
cmpl   $0xffffffff,-0x28(%rbp)
jne    12e3 <poll_loop_body+0x1a3>
lea    0xd36(%rip),%rdi
call   1050 <warnx@plt>
jmp    134c <poll_loop_body+0x20c>
cmpl   $0x0,-0x28(%rbp)
jne    1347 <poll_loop_body+0x207>
mov    $0x1,%edi
lea    0xd1b(%rip),%rsi
mov    $0x0,%al
call   1060 <dbgprintf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    133b <poll_loop_body+0x1fb>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    0x4(%rax,%rcx,8),%edi
mov    0x2cca(%rip),%rax
mov    (%rax),%esi
call   1040 <shutdown@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1307 <poll_loop_body+0x1c7>
movl   $0x1,-0x4(%rbp)
jmp    136b <poll_loop_body+0x22b>
jmp    134c <poll_loop_body+0x20c>
jmp    1351 <poll_loop_body+0x211>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    124d <poll_loop_body+0x10d>
jmp    1364 <poll_loop_body+0x224>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<poll_loop_body>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
movslq %edi,%r12
mov    (%rdx,%r12,8),%eax
mov    0x2e84(%rip),%rbp
mov    0x2e6d(%rip),%rdx
mov    (%rdx),%edx
or     0x0(%rbp),%edx
test   %eax,%edx
je     11ac <poll_loop_body+0x6c>
mov    $0x1,%r15d
test   %esi,%esi
jle    12cc <poll_loop_body+0x18c>
mov    %esi,%ebp
xor    %ebx,%ebx
mov    0x2e6b(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x4(%r14,%rbx,8),%edi
mov    (%r12),%esi
call   1040 <shutdown@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1190 <poll_loop_body+0x50>
jmp    12cc <poll_loop_body+0x18c>
mov    0x2e25(%rip),%rdx
test   %eax,(%rdx)
je     11ec <poll_loop_body+0xac>
mov    $0x1,%r15d
test   %esi,%esi
jle    12cc <poll_loop_body+0x18c>
mov    %esi,%ebp
xor    %ebx,%ebx
mov    0x2e20(%rip),%r12
mov    0x4(%r14,%rbx,8),%edi
mov    (%r12),%esi
call   1040 <shutdown@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    11d0 <poll_loop_body+0x90>
jmp    12cc <poll_loop_body+0x18c>
mov    0x2dd5(%rip),%rdx
xor    %r15d,%r15d
test   %eax,(%rdx)
je     12cc <poll_loop_body+0x18c>
test   %esi,%esi
jle    12cc <poll_loop_body+0x18c>
mov    %edi,%r13d
mov    %esi,%ebx
xor    %r15d,%r15d
mov    %rcx,(%rsp)
jmp    123d <poll_loop_body+0xfd>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xde8(%rip),%rdi
call   1050 <warnx@plt>
mov    (%rsp),%rcx
add    $0x1,%r15
cmp    %r15,%rbx
je     12c9 <poll_loop_body+0x189>
cmp    %r15,%r13
je     1230 <poll_loop_body+0xf0>
mov    (%rcx,%r12,8),%rdx
mov    (%rcx,%r15,8),%rcx
mov    $0x1,%edi
lea    0xdaa(%rip),%rsi
xor    %eax,%eax
call   1060 <dbgprintf@plt>
mov    0x4(%r14,%r12,8),%edi
mov    0x4(%r14,%r15,8),%esi
call   1030 <pump@plt>
mov    %eax,%ebp
mov    $0x2,%edi
lea    0xd92(%rip),%rsi
xor    %eax,%eax
call   1060 <dbgprintf@plt>
cmp    $0xffffffff,%ebp
je     1220 <poll_loop_body+0xe0>
test   %ebp,%ebp
mov    (%rsp),%rcx
jne    1230 <poll_loop_body+0xf0>
lea    0xd7f(%rip),%rsi
xor    %ebp,%ebp
mov    $0x1,%r15d
mov    $0x1,%edi
xor    %eax,%eax
call   1060 <dbgprintf@plt>
mov    0x2d40(%rip),%r12
mov    0x4(%r14,%rbp,8),%edi
mov    (%r12),%esi
call   1040 <shutdown@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    12b0 <poll_loop_body+0x170>
jmp    12cc <poll_loop_body+0x18c>
xor    %r15d,%r15d
mov    %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.pollfd = type { i32, i32 }
@POLLHUP = global i32 0
@POLLNVAL = global i32 0
@SHUT_RDWR = global i32 0
@POLLERR = global i32 0
@POLLIN = global i32 0
@.str = [12 x i8] c"# %s -> %s\0A\00"
@.str.1 = [3 x i8] c"\0A\0A\00"
@.str.2 = [5 x i8] c"pump\00"
@.str.3 = [78 x i8] c"# one of ends closed connection, closing sockets, awaiting new connection...\0A\00"
define i32 @poll_loop_body(i32 %0, i32 %1, %struct.pollfd* %2, i8** %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.pollfd*
%9 = alloca i8**
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store %struct.pollfd* %2, %struct.pollfd** %8
store i8** %3, i8*** %9
%12 = load %struct.pollfd*, %struct.pollfd** %8
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %12, i64 %14
%16 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %15, i32 0, i32 0
%17 = load i32, i32* %16
%18 = load i32, i32* @POLLHUP
%19 = load i32, i32* @POLLNVAL
%20 = or i32 %18, %19
%21 = and i32 %17, %20
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %41
23: ; preds = %4
store i32 0, i32* %10
br label %24
24: ; preds = %37, %23
%25 = load i32, i32* %10
%26 = load i32, i32* %7
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %40
28: ; preds = %24
%29 = load %struct.pollfd*, %struct.pollfd** %8
%30 = load i32, i32* %10
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %29, i64 %31
%33 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %32, i32 0, i32 1
%34 = load i32, i32* %33
%35 = load i32, i32* @SHUT_RDWR
%36 = call i32 @shutdown(i32 %34, i32 %35)
br label %37
37: ; preds = %28
%38 = load i32, i32* %10
%39 = add nsw i32 %38, 1
store i32 %39, i32* %10
br label %24
40: ; preds = %24
store i32 1, i32* %5
br label %148
41: ; preds = %4
%42 = load %struct.pollfd*, %struct.pollfd** %8
%43 = load i32, i32* %6
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %42, i64 %44
%46 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %45, i32 0, i32 0
%47 = load i32, i32* %46
%48 = load i32, i32* @POLLERR
%49 = and i32 %47, %48
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %69
51: ; preds = %41
store i32 0, i32* %10
br label %52
52: ; preds = %65, %51
%53 = load i32, i32* %10
%54 = load i32, i32* %7
%55 = icmp slt i32 %53, %54
br i1 %55, label %56, label %68
56: ; preds = %52
%57 = load %struct.pollfd*, %struct.pollfd** %8
%58 = load i32, i32* %10
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %57, i64 %59
%61 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %60, i32 0, i32 1
%62 = load i32, i32* %61
%63 = load i32, i32* @SHUT_RDWR
%64 = call i32 @shutdown(i32 %62, i32 %63)
br label %65
65: ; preds = %56
%66 = load i32, i32* %10
%67 = add nsw i32 %66, 1
store i32 %67, i32* %10
br label %52
68: ; preds = %52
store i32 1, i32* %5
br label %148
69: ; preds = %41
%70 = load %struct.pollfd*, %struct.pollfd** %8
%71 = load i32, i32* %6
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %70, i64 %72
%74 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %73, i32 0, i32 0
%75 = load i32, i32* %74
%76 = load i32, i32* @POLLIN
%77 = and i32 %75, %76
%78 = icmp ne i32 %77, 0
br i1 %78, label %79, label %147
79: ; preds = %69
store i32 0, i32* %10
br label %80
80: ; preds = %143, %79
%81 = load i32, i32* %10
%82 = load i32, i32* %7
%83 = icmp slt i32 %81, %82
br i1 %83, label %84, label %146
84: ; preds = %80
%85 = load i32, i32* %10
%86 = load i32, i32* %6
%87 = icmp eq i32 %85, %86
br i1 %87, label %88, label %89
88: ; preds = %84
br label %143
89: ; preds = %84
%90 = load i8**, i8*** %9
%91 = load i32, i32* %6
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds i8*, i8** %90, i64 %92
%94 = load i8*, i8** %93
%95 = load i8**, i8*** %9
%96 = load i32, i32* %10
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i8*, i8** %95, i64 %97
%99 = load i8*, i8** %98
%100 = call i32 (i32, i8*, ...) @dbgprintf(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %94, i8* %99)
%101 = load %struct.pollfd*, %struct.pollfd** %8
%102 = load i32, i32* %6
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %101, i64 %103
%105 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %104, i32 0, i32 1
%106 = load i32, i32* %105
%107 = load %struct.pollfd*, %struct.pollfd** %8
%108 = load i32, i32* %10
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %107, i64 %109
%111 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %110, i32 0, i32 1
%112 = load i32, i32* %111
%113 = call i32 @pump(i32 %106, i32 %112)
store i32 %113, i32* %11
%114 = call i32 (i32, i8*, ...) @dbgprintf(i32 2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%115 = load i32, i32* %11
%116 = icmp eq i32 %115, -1
br i1 %116, label %117, label %119
117: ; preds = %89
%118 = call i32 @warnx(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %142
119: ; preds = %89
%120 = load i32, i32* %11
%121 = icmp eq i32 %120, 0
br i1 %121, label %122, label %141
122: ; preds = %119
%123 = call i32 (i32, i8*, ...) @dbgprintf(i32 1, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %10
br label %124
124: ; preds = %137, %122
%125 = load i32, i32* %10
%126 = load i32, i32* %7
%127 = icmp slt i32 %125, %126
br i1 %127, label %128, label %140
128: ; preds = %124
%129 = load %struct.pollfd*, %struct.pollfd** %8
%130 = load i32, i32* %10
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %129, i64 %131
%133 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %132, i32 0, i32 1
%134 = load i32, i32* %133
%135 = load i32, i32* @SHUT_RDWR
%136 = call i32 @shutdown(i32 %134, i32 %135)
br label %137
137: ; preds = %128
%138 = load i32, i32* %10
%139 = add nsw i32 %138, 1
store i32 %139, i32* %10
br label %124
140: ; preds = %124
store i32 1, i32* %5
br label %148
141: ; preds = %119
br label %142
142: ; preds = %141, %117
br label %143
143: ; preds = %142, %88
%144 = load i32, i32* %10
%145 = add nsw i32 %144, 1
store i32 %145, i32* %10
br label %80
146: ; preds = %80
br label %147
147: ; preds = %146, %69
store i32 0, i32* %5
br label %148
148: ; preds = %147, %140, %68, %40
%149 = load i32, i32* %5
ret i32 %149
}

LLVM IR (-O2):
%struct.pollfd = type { i32, i32 }
@POLLHUP = global i32 0
@POLLNVAL = global i32 0
@SHUT_RDWR = global i32 0
@POLLERR = global i32 0
@POLLIN = global i32 0
@.str = [12 x i8] c"# %s -> %s\0A\00"
@.str.1 = [3 x i8] c"\0A\0A\00"
@.str.2 = [5 x i8] c"pump\00"
@.str.3 = [78 x i8] c"# one of ends closed connection, closing sockets, awaiting new connection...\0A\00"
define i32 @poll_loop_body(i32 %0, i32 %1, %struct.pollfd* nocapture %2, i8** nocapture %3) {
%5 = sext i32 %0 to i64
%6 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %2, i64 %5, i32 0
%7 = load i32, i32* %6
%8 = load i32, i32* @POLLHUP
%9 = load i32, i32* @POLLNVAL
%10 = or i32 %9, %8
%11 = and i32 %10, %7
%12 = icmp eq i32 %11, 0
br i1 %12, label %25, label %13
13: ; preds = %4
%14 = icmp sgt i32 %1, 0
br i1 %14, label %15, label %80
15: ; preds = %13
%16 = zext i32 %1 to i64
br label %17
17: ; preds = %15, %17
%18 = phi i64 [ 0, %15 ], [ %23, %17 ]
%19 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %2, i64 %18, i32 1
%20 = load i32, i32* %19
%21 = load i32, i32* @SHUT_RDWR
%22 = tail call i32 @shutdown(i32 %20, i32 %21)
%23 = add nuw nsw i64 %18, 1
%24 = icmp eq i64 %23, %16
br i1 %24, label %80, label %17
25: ; preds = %4
%26 = load i32, i32* @POLLERR
%27 = and i32 %26, %7
%28 = icmp eq i32 %27, 0
br i1 %28, label %41, label %29
29: ; preds = %25
%30 = icmp sgt i32 %1, 0
br i1 %30, label %31, label %80
31: ; preds = %29
%32 = zext i32 %1 to i64
br label %33
33: ; preds = %31, %33
%34 = phi i64 [ 0, %31 ], [ %39, %33 ]
%35 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %2, i64 %34, i32 1
%36 = load i32, i32* %35
%37 = load i32, i32* @SHUT_RDWR
%38 = tail call i32 @shutdown(i32 %36, i32 %37)
%39 = add nuw nsw i64 %34, 1
%40 = icmp eq i64 %39, %32
br i1 %40, label %80, label %33
41: ; preds = %25
%42 = load i32, i32* @POLLIN
%43 = and i32 %42, %7
%44 = icmp ne i32 %43, 0
%45 = icmp sgt i32 %1, 0
%46 = and i1 %44, %45
br i1 %46, label %47, label %80
47: ; preds = %41
%48 = getelementptr inbounds i8*, i8** %3, i64 %5
%49 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %2, i64 %5, i32 1
%50 = zext i32 %0 to i64
%51 = zext i32 %1 to i64
br label %52
52: ; preds = %47, %77
%53 = phi i64 [ 0, %47 ], [ %78, %77 ]
%54 = icmp eq i64 %53, %50
br i1 %54, label %77, label %55
55: ; preds = %52
%56 = load i8*, i8** %48
%57 = getelementptr inbounds i8*, i8** %3, i64 %53
%58 = load i8*, i8** %57
%59 = tail call i32 (i32, i8*, ...) @dbgprintf(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %56, i8* %58)
%60 = load i32, i32* %49
%61 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %2, i64 %53, i32 1
%62 = load i32, i32* %61
%63 = tail call i32 @pump(i32 %60, i32 %62)
%64 = tail call i32 (i32, i8*, ...) @dbgprintf(i32 2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
switch i32 %63, label %77 [
i32 -1, label %65
i32 0, label %67
]
65: ; preds = %55
%66 = tail call i32 @warnx(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %77
67: ; preds = %55
%68 = tail call i32 (i32, i8*, ...) @dbgprintf(i32 1, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.3, i64 0, i64 0))
br label %69
69: ; preds = %67, %69
%70 = phi i64 [ 0, %67 ], [ %75, %69 ]
%71 = getelementptr inbounds %struct.pollfd, %struct.pollfd* %2, i64 %70, i32 1
%72 = load i32, i32* %71
%73 = load i32, i32* @SHUT_RDWR
%74 = tail call i32 @shutdown(i32 %72, i32 %73)
%75 = add nuw nsw i64 %70, 1
%76 = icmp eq i64 %75, %51
br i1 %76, label %80, label %69
77: ; preds = %55, %65, %52
%78 = add nuw nsw i64 %53, 1
%79 = icmp eq i64 %78, %51
br i1 %79, label %80, label %52
80: ; preds = %17, %33, %77, %69, %13, %29, %41
%81 = phi i32 [ 0, %41 ], [ 1, %29 ], [ 1, %13 ], [ 1, %69 ], [ 0, %77 ], [ 1, %33 ], [ 1, %17 ]
ret i32 %81
}