#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 */

/* Variables and functions */
int EAGAIN;
int EHOSTDOWN;
int EHOSTUNREACH;
int ENETDOWN;
int ENETUNREACH;
int ENONET;
int ENOPROTOOPT;
int EOPNOTSUPP;
int EPROTO;
bool should_retry_accept(int error) {
  return error == EAGAIN || error == EHOSTDOWN || error == EHOSTUNREACH ||
         error == ENETDOWN || error == ENETUNREACH || error == ENONET ||
         error == ENOPROTOOPT || error == EOPNOTSUPP || error == EPROTO;
}


x86 assembly (clang, -O0):
<should_retry_accept>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2e85(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     11d1 <should_retry_accept+0xd1>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2e7e(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     11d1 <should_retry_accept+0xd1>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2e87(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     11d1 <should_retry_accept+0xd1>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2e80(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     11d1 <should_retry_accept+0xd1>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2e71(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     11d1 <should_retry_accept+0xd1>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2e4a(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     11d1 <should_retry_accept+0xd1>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2e4b(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     11d1 <should_retry_accept+0xd1>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2dfc(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     11d1 <should_retry_accept+0xd1>
mov    -0x4(%rbp),%eax
mov    0x2def(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<should_retry_accept>:
mov    0x2e91(%rip),%rax
cmp    %edi,(%rax)
sete   %al
mov    0x2e95(%rip),%rcx
cmp    %edi,(%rcx)
sete   %cl
or     %al,%cl
mov    0x2ea7(%rip),%rax
cmp    %edi,(%rax)
sete   %al
mov    0x2eab(%rip),%rdx
cmp    %edi,(%rdx)
sete   %dl
or     %al,%dl
or     %cl,%dl
mov    0x2ea3(%rip),%rax
cmp    %edi,(%rax)
sete   %al
mov    0x2e87(%rip),%rcx
cmp    %edi,(%rcx)
sete   %cl
or     %al,%cl
mov    0x2e91(%rip),%rax
cmp    %edi,(%rax)
sete   %al
or     %cl,%al
or     %dl,%al
mov    0x2e49(%rip),%rcx
cmp    %edi,(%rcx)
sete   %cl
mov    0x2e45(%rip),%rdx
cmp    %edi,(%rdx)
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
@EAGAIN = global i32 0
@EHOSTDOWN = global i32 0
@EHOSTUNREACH = global i32 0
@ENETDOWN = global i32 0
@ENETUNREACH = global i32 0
@ENONET = global i32 0
@ENOPROTOOPT = global i32 0
@EOPNOTSUPP = global i32 0
@EPROTO = global i32 0
define i32 @should_retry_accept(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @EAGAIN
%5 = icmp eq i32 %3, %4
br i1 %5, label %38, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = load i32, i32* @EHOSTDOWN
%9 = icmp eq i32 %7, %8
br i1 %9, label %38, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = load i32, i32* @EHOSTUNREACH
%13 = icmp eq i32 %11, %12
br i1 %13, label %38, label %14
14: ; preds = %10
%15 = load i32, i32* %2
%16 = load i32, i32* @ENETDOWN
%17 = icmp eq i32 %15, %16
br i1 %17, label %38, label %18
18: ; preds = %14
%19 = load i32, i32* %2
%20 = load i32, i32* @ENETUNREACH
%21 = icmp eq i32 %19, %20
br i1 %21, label %38, label %22
22: ; preds = %18
%23 = load i32, i32* %2
%24 = load i32, i32* @ENONET
%25 = icmp eq i32 %23, %24
br i1 %25, label %38, label %26
26: ; preds = %22
%27 = load i32, i32* %2
%28 = load i32, i32* @ENOPROTOOPT
%29 = icmp eq i32 %27, %28
br i1 %29, label %38, label %30
30: ; preds = %26
%31 = load i32, i32* %2
%32 = load i32, i32* @EOPNOTSUPP
%33 = icmp eq i32 %31, %32
br i1 %33, label %38, label %34
34: ; preds = %30
%35 = load i32, i32* %2
%36 = load i32, i32* @EPROTO
%37 = icmp eq i32 %35, %36
br label %38
38: ; preds = %34, %30, %26, %22, %18, %14, %10, %6, %1
%39 = phi i1 [ true, %30 ], [ true, %26 ], [ true, %22 ], [ true, %18 ], [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %37, %34 ]
%40 = zext i1 %39 to i32
ret i32 %40
}

LLVM IR (-O2):
@EAGAIN = global i32 0
@EHOSTDOWN = global i32 0
@EHOSTUNREACH = global i32 0
@ENETDOWN = global i32 0
@ENETUNREACH = global i32 0
@ENONET = global i32 0
@ENOPROTOOPT = global i32 0
@EOPNOTSUPP = global i32 0
@EPROTO = global i32 0
define i32 @should_retry_accept(i32 %0) {
%2 = load i32, i32* @EAGAIN
%3 = icmp eq i32 %2, %0
%4 = load i32, i32* @EHOSTDOWN
%5 = icmp eq i32 %4, %0
%6 = select i1 %3, i1 true, i1 %5
%7 = load i32, i32* @EHOSTUNREACH
%8 = icmp eq i32 %7, %0
%9 = select i1 %6, i1 true, i1 %8
%10 = load i32, i32* @ENETDOWN
%11 = icmp eq i32 %10, %0
%12 = select i1 %9, i1 true, i1 %11
%13 = load i32, i32* @ENETUNREACH
%14 = icmp eq i32 %13, %0
%15 = select i1 %12, i1 true, i1 %14
%16 = load i32, i32* @ENONET
%17 = icmp eq i32 %16, %0
%18 = select i1 %15, i1 true, i1 %17
%19 = load i32, i32* @ENOPROTOOPT
%20 = icmp eq i32 %19, %0
%21 = select i1 %18, i1 true, i1 %20
%22 = load i32, i32* @EOPNOTSUPP
%23 = icmp eq i32 %22, %0
%24 = select i1 %21, i1 true, i1 %23
%25 = load i32, i32* @EPROTO
%26 = icmp eq i32 %25, %0
%27 = select i1 %24, i1 true, i1 %26
%28 = zext i1 %27 to i32
ret i32 %28
}