#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 ECONNABORTED;
int ECONNREFUSED;
int EHOSTUNREACH;
int ENETUNREACH;
char Platform_ConnectionFailed(int e) {
  char _o_result;
  _o_result = ((e == ECONNREFUSED || e == ECONNABORTED) || e == ENETUNREACH) ||
              e == EHOSTUNREACH;
  return _o_result;
}


x86 assembly (clang, -O0):
<Platform_ConnectionFailed>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2ecd(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x6(%rbp)
je     115e <Platform_ConnectionFailed+0x5e>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2e9e(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x6(%rbp)
je     115e <Platform_ConnectionFailed+0x5e>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2ea7(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x6(%rbp)
je     115e <Platform_ConnectionFailed+0x5e>
mov    -0x4(%rbp),%eax
mov    0x2e82(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Platform_ConnectionFailed>:
mov    0x2ed9(%rip),%rax
cmp    %edi,(%rax)
sete   %al
mov    0x2eb5(%rip),%rcx
cmp    %edi,(%rcx)
sete   %cl
or     %al,%cl
mov    0x2ec7(%rip),%rax
cmp    %edi,(%rax)
sete   %dl
mov    0x2eab(%rip),%rax
cmp    %edi,(%rax)
sete   %al
or     %dl,%al
or     %cl,%al
ret

LLVM IR (-O0):
@ECONNREFUSED = global i32 0
@ECONNABORTED = global i32 0
@ENETUNREACH = global i32 0
@EHOSTUNREACH = global i32 0
define signext i8 @Platform_ConnectionFailed(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @ECONNREFUSED
%6 = icmp eq i32 %4, %5
br i1 %6, label %19, label %7
7: ; preds = %1
%8 = load i32, i32* %2
%9 = load i32, i32* @ECONNABORTED
%10 = icmp eq i32 %8, %9
br i1 %10, label %19, label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = load i32, i32* @ENETUNREACH
%14 = icmp eq i32 %12, %13
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i32, i32* %2
%17 = load i32, i32* @EHOSTUNREACH
%18 = icmp eq i32 %16, %17
br label %19
19: ; preds = %15, %11, %7, %1
%20 = phi i1 [ true, %11 ], [ true, %7 ], [ true, %1 ], [ %18, %15 ]
%21 = zext i1 %20 to i32
%22 = trunc i32 %21 to i8
store i8 %22, i8* %3
%23 = load i8, i8* %3
ret i8 %23
}

LLVM IR (-O2):
@ECONNREFUSED = global i32 0
@ECONNABORTED = global i32 0
@ENETUNREACH = global i32 0
@EHOSTUNREACH = global i32 0
define signext i8 @Platform_ConnectionFailed(i32 %0) {
%2 = load i32, i32* @ECONNREFUSED
%3 = icmp eq i32 %2, %0
%4 = load i32, i32* @ECONNABORTED
%5 = icmp eq i32 %4, %0
%6 = select i1 %3, i1 true, i1 %5
%7 = load i32, i32* @ENETUNREACH
%8 = icmp eq i32 %7, %0
%9 = select i1 %6, i1 true, i1 %8
%10 = load i32, i32* @EHOSTUNREACH
%11 = icmp eq i32 %10, %0
%12 = select i1 %9, i1 true, i1 %11
%13 = zext i1 %12 to i8
ret i8 %13
}