#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 const EHOSTDOWN;
int const EHOSTUNREACH;
int const ENETDOWN;
int const ENETUNREACH;
int const ENONET;
int const ENOPROTOOPT;
int const EOPNOTSUPP;
int const EPROTO;
int tcp_retryaccept(const int _errno) {
  return _errno == ENETDOWN || _errno == ENOPROTOOPT || _errno == EPROTO ||
         _errno == EHOSTDOWN || _errno == EHOSTUNREACH || _errno == ENONET ||
         _errno == EOPNOTSUPP || _errno == ENETUNREACH;
}


x86 assembly (clang, -O0):
<tcp_retryaccept>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2ec5(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     11ba <tcp_retryaccept+0xba>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2ebe(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     11ba <tcp_retryaccept+0xba>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2e77(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     11ba <tcp_retryaccept+0xba>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2e50(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     11ba <tcp_retryaccept+0xba>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2e59(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     11ba <tcp_retryaccept+0xba>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2e4a(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     11ba <tcp_retryaccept+0xba>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2e13(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     11ba <tcp_retryaccept+0xba>
mov    -0x4(%rbp),%eax
mov    0x2e2e(%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):
<tcp_retryaccept>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

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

LLVM IR (-O2):
@ENETDOWN = constant i32 0
@ENOPROTOOPT = constant i32 0
@EPROTO = constant i32 0
@EHOSTDOWN = constant i32 0
@EHOSTUNREACH = constant i32 0
@ENONET = constant i32 0
@EOPNOTSUPP = constant i32 0
@ENETUNREACH = constant i32 0
define i32 @tcp_retryaccept(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}