#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 */
scalar_t__ EPROTONOSUPPORT;
int /*<<< orphan*/ PF_ROUTE;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ SOCK_RAW;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ err(int, char *);
scalar_t__ errno;
int /*<<< orphan*/ errx(int, char *, ...);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ socketpair(int /*<<< orphan*/, int /*<<< orphan*/,
                      int /*<<< orphan*/, int *);
int main(int argc, char *argv[]) {
  int sock, socks[2];
  sock = socket(PF_ROUTE, SOCK_STREAM, 0);
  if (sock >= 0) {
    close(sock);
    errx(-1, "socket(PF_ROUTE, SOCK_STREAM, 0) returned %d", sock);
  }
  if (errno != EPROTONOSUPPORT)
    err(-1, "socket(PF_ROUTE, SOCK_STREAM, 0)");
  sock = socket(PF_ROUTE, SOCK_DGRAM, 0);
  if (sock >= 0) {
    close(sock);
    errx(-1, "socket(PF_ROUTE, SOCK_DGRAM, 0) returned %d", sock);
  }
  if (errno != EPROTONOSUPPORT)
    err(-1, "socket(PF_ROUTE, SOCK_DGRAM, 0)");
  sock = socket(PF_ROUTE, SOCK_RAW, 0);
  if (sock < 0)
    err(-1, "socket(PF_ROUTE, SOCK_RAW, 0)");
  close(sock);
  if (socketpair(PF_ROUTE, SOCK_STREAM, 0, socks) == 0) {
    close(socks[0]);
    close(socks[1]);
    errx(-1, "socketpair(PF_ROUTE, SOCK_STREAM, 0, socks) success");
  }
  if (errno != EPROTONOSUPPORT)
    err(-1, "socketpair(PF_ROUTE, SOCK_STREAM, 0, socks)");
  if (socketpair(PF_ROUTE, SOCK_DGRAM, 0, socks) == 0) {
    close(socks[0]);
    close(socks[1]);
    errx(-1, "socketpair(PF_ROUTE, SOCK_DGRAM, 0, socks) success");
  }
  if (errno != EPROTONOSUPPORT)
    err(-1, "socketpair(PF_ROUTE, SOCK_DGRAM, 0, socks)");
  if (socketpair(PF_ROUTE, SOCK_RAW, 0, socks) == 0) {
    close(socks[0]);
    close(socks[1]);
    errx(-1, "socketpair(PF_ROUTE, SOCK_STREAM, 0, socks) success");
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
mov    0x2e4a(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1070 <socket@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     11aa <main+0x5a>
mov    -0x14(%rbp),%edi
call   1040 <close@plt>
mov    -0x14(%rbp),%edx
mov    $0xffffffff,%edi
lea    0xe5d(%rip),%rsi
mov    $0x0,%al
call   1030 <errx@plt>
mov    0x2e07(%rip),%rax
mov    (%rax),%rax
mov    0x2e0d(%rip),%rcx
cmp    (%rcx),%rax
je     11d5 <main+0x85>
mov    $0xffffffff,%edi
lea    0xe5d(%rip),%rsi
call   1060 <err@plt>
mov    0x2e0c(%rip),%rax
mov    (%rax),%edi
mov    0x2df3(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1070 <socket@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1219 <main+0xc9>
mov    -0x14(%rbp),%edi
call   1040 <close@plt>
mov    -0x14(%rbp),%edx
mov    $0xffffffff,%edi
lea    0xe3c(%rip),%rsi
mov    $0x0,%al
call   1030 <errx@plt>
mov    0x2d98(%rip),%rax
mov    (%rax),%rax
mov    0x2d9e(%rip),%rcx
cmp    (%rcx),%rax
je     1244 <main+0xf4>
mov    $0xffffffff,%edi
lea    0xe3b(%rip),%rsi
call   1060 <err@plt>
mov    0x2d9d(%rip),%rax
mov    (%rax),%edi
mov    0x2d8c(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1070 <socket@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    127b <main+0x12b>
mov    $0xffffffff,%edi
lea    0xe24(%rip),%rsi
call   1060 <err@plt>
mov    -0x14(%rbp),%edi
call   1040 <close@plt>
mov    0x2d5e(%rip),%rax
mov    (%rax),%edi
mov    0x2d2d(%rip),%rax
mov    (%rax),%esi
lea    -0x1c(%rbp),%rcx
xor    %edx,%edx
call   1050 <socketpair@plt>
cmp    $0x0,%rax
jne    12cd <main+0x17d>
mov    -0x1c(%rbp),%edi
call   1040 <close@plt>
mov    -0x18(%rbp),%edi
call   1040 <close@plt>
mov    $0xffffffff,%edi
lea    0xdf2(%rip),%rsi
mov    $0x0,%al
call   1030 <errx@plt>
mov    0x2ce4(%rip),%rax
mov    (%rax),%rax
mov    0x2cea(%rip),%rcx
cmp    (%rcx),%rax
je     12f8 <main+0x1a8>
mov    $0xffffffff,%edi
lea    0xdf9(%rip),%rsi
call   1060 <err@plt>
mov    0x2ce9(%rip),%rax
mov    (%rax),%edi
mov    0x2cd0(%rip),%rax
mov    (%rax),%esi
lea    -0x1c(%rbp),%rcx
xor    %edx,%edx
call   1050 <socketpair@plt>
cmp    $0x0,%rax
jne    1342 <main+0x1f2>
mov    -0x1c(%rbp),%edi
call   1040 <close@plt>
mov    -0x18(%rbp),%edi
call   1040 <close@plt>
mov    $0xffffffff,%edi
lea    0xddd(%rip),%rsi
mov    $0x0,%al
call   1030 <errx@plt>
mov    0x2c6f(%rip),%rax
mov    (%rax),%rax
mov    0x2c75(%rip),%rcx
cmp    (%rcx),%rax
je     136d <main+0x21d>
mov    $0xffffffff,%edi
lea    0xde3(%rip),%rsi
call   1060 <err@plt>
mov    0x2c74(%rip),%rax
mov    (%rax),%edi
mov    0x2c63(%rip),%rax
mov    (%rax),%esi
lea    -0x1c(%rbp),%rcx
xor    %edx,%edx
call   1050 <socketpair@plt>
cmp    $0x0,%rax
jne    13b7 <main+0x267>
mov    -0x1c(%rbp),%edi
call   1040 <close@plt>
mov    -0x18(%rbp),%edi
call   1040 <close@plt>
mov    $0xffffffff,%edi
lea    0xd08(%rip),%rsi
mov    $0x0,%al
call   1030 <errx@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2e86(%rip),%r14
mov    (%r14),%edi
mov    0x2e54(%rip),%r13
mov    0x0(%r13),%esi
xor    %edx,%edx
call   1070 <socket@plt>
test   %eax,%eax
js     1199 <main+0x49>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <close@plt>
lea    0xe75(%rip),%rsi
mov    $0xffffffff,%edi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <errx@plt>
mov    0x2e18(%rip),%r15
mov    (%r15),%rax
mov    0x2e1e(%rip),%r12
cmp    (%r12),%rax
je     11c1 <main+0x71>
lea    0xe76(%rip),%rsi
mov    $0xffffffff,%edi
call   1060 <err@plt>
mov    (%r14),%edi
mov    0x2e0d(%rip),%rbp
mov    0x0(%rbp),%esi
xor    %edx,%edx
call   1070 <socket@plt>
test   %eax,%eax
js     11f7 <main+0xa7>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <close@plt>
lea    0xe65(%rip),%rsi
mov    $0xffffffff,%edi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <errx@plt>
mov    (%r15),%rax
cmp    (%r12),%rax
je     1211 <main+0xc1>
lea    0xe73(%rip),%rsi
mov    $0xffffffff,%edi
call   1060 <err@plt>
mov    (%r14),%edi
mov    0x2dc5(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1070 <socket@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    123b <main+0xeb>
lea    0xe69(%rip),%rsi
mov    $0xffffffff,%edi
call   1060 <err@plt>
mov    %ebx,%edi
call   1040 <close@plt>
mov    (%r14),%edi
mov    0x0(%r13),%esi
mov    %rsp,%rcx
xor    %edx,%edx
call   1050 <socketpair@plt>
test   %rax,%rax
jne    127c <main+0x12c>
mov    (%rsp),%edi
call   1040 <close@plt>
mov    0x4(%rsp),%edi
call   1040 <close@plt>
lea    0xe48(%rip),%rsi
mov    $0xffffffff,%edi
xor    %eax,%eax
call   1030 <errx@plt>
mov    (%r15),%rax
cmp    (%r12),%rax
je     1296 <main+0x146>
lea    0xe60(%rip),%rsi
mov    $0xffffffff,%edi
call   1060 <err@plt>
mov    (%r14),%edi
mov    0x0(%rbp),%esi
mov    %rsp,%rcx
xor    %edx,%edx
call   1050 <socketpair@plt>
test   %rax,%rax
jne    12cf <main+0x17f>
mov    (%rsp),%edi
call   1040 <close@plt>
mov    0x4(%rsp),%edi
call   1040 <close@plt>
lea    0xe55(%rip),%rsi
mov    $0xffffffff,%edi
xor    %eax,%eax
call   1030 <errx@plt>
mov    (%r15),%rax
cmp    (%r12),%rax
je     12e9 <main+0x199>
lea    0xe6c(%rip),%rsi
mov    $0xffffffff,%edi
call   1060 <err@plt>
mov    (%r14),%edi
mov    0x2ced(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rcx
xor    %edx,%edx
call   1050 <socketpair@plt>
test   %rax,%rax
jne    1328 <main+0x1d8>
mov    (%rsp),%edi
call   1040 <close@plt>
mov    0x4(%rsp),%edi
call   1040 <close@plt>
lea    0xd9c(%rip),%rsi
mov    $0xffffffff,%edi
xor    %eax,%eax
call   1030 <errx@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@PF_ROUTE = global i32 0
@SOCK_STREAM = global i32 0
@.str = [45 x i8] c"socket(PF_ROUTE, SOCK_STREAM, 0) returned %d\00"
@errno = global i64 0
@EPROTONOSUPPORT = global i64 0
@.str.1 = [33 x i8] c"socket(PF_ROUTE, SOCK_STREAM, 0)\00"
@SOCK_DGRAM = global i32 0
@.str.2 = [44 x i8] c"socket(PF_ROUTE, SOCK_DGRAM, 0) returned %d\00"
@.str.3 = [32 x i8] c"socket(PF_ROUTE, SOCK_DGRAM, 0)\00"
@SOCK_RAW = global i32 0
@.str.4 = [30 x i8] c"socket(PF_ROUTE, SOCK_RAW, 0)\00"
@.str.5 = [52 x i8] c"socketpair(PF_ROUTE, SOCK_STREAM, 0, socks) success\00"
@.str.6 = [44 x i8] c"socketpair(PF_ROUTE, SOCK_STREAM, 0, socks)\00"
@.str.7 = [51 x i8] c"socketpair(PF_ROUTE, SOCK_DGRAM, 0, socks) success\00"
@.str.8 = [43 x i8] c"socketpair(PF_ROUTE, SOCK_DGRAM, 0, socks)\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [2 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* @PF_ROUTE
%9 = load i32, i32* @SOCK_STREAM
%10 = call i32 @socket(i32 %8, i32 %9, i32 0)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = icmp sge i32 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = load i32, i32* %6
%15 = call i32 @close(i32 %14)
%16 = load i32, i32* %6
%17 = call i32 (i32, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %13, %2
%19 = load i64, i64* @errno
%20 = load i64, i64* @EPROTONOSUPPORT
%21 = icmp ne i64 %19, %20
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = call i32 @err(i32 -1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %22, %18
%25 = load i32, i32* @PF_ROUTE
%26 = load i32, i32* @SOCK_DGRAM
%27 = call i32 @socket(i32 %25, i32 %26, i32 0)
store i32 %27, i32* %6
%28 = load i32, i32* %6
%29 = icmp sge i32 %28, 0
br i1 %29, label %30, label %35
30: ; preds = %24
%31 = load i32, i32* %6
%32 = call i32 @close(i32 %31)
%33 = load i32, i32* %6
%34 = call i32 (i32, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i32 %33)
br label %35
35: ; preds = %30, %24
%36 = load i64, i64* @errno
%37 = load i64, i64* @EPROTONOSUPPORT
%38 = icmp ne i64 %36, %37
br i1 %38, label %39, label %41
39: ; preds = %35
%40 = call i32 @err(i32 -1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
br label %41
41: ; preds = %39, %35
%42 = load i32, i32* @PF_ROUTE
%43 = load i32, i32* @SOCK_RAW
%44 = call i32 @socket(i32 %42, i32 %43, i32 0)
store i32 %44, i32* %6
%45 = load i32, i32* %6
%46 = icmp slt i32 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %41
%48 = call i32 @err(i32 -1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
br label %49
49: ; preds = %47, %41
%50 = load i32, i32* %6
%51 = call i32 @close(i32 %50)
%52 = load i32, i32* @PF_ROUTE
%53 = load i32, i32* @SOCK_STREAM
%54 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%55 = call i64 @socketpair(i32 %52, i32 %53, i32 0, i32* %54)
%56 = icmp eq i64 %55, 0
br i1 %56, label %57, label %65
57: ; preds = %49
%58 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%59 = load i32, i32* %58
%60 = call i32 @close(i32 %59)
%61 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%62 = load i32, i32* %61
%63 = call i32 @close(i32 %62)
%64 = call i32 (i32, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0))
br label %65
65: ; preds = %57, %49
%66 = load i64, i64* @errno
%67 = load i64, i64* @EPROTONOSUPPORT
%68 = icmp ne i64 %66, %67
br i1 %68, label %69, label %71
69: ; preds = %65
%70 = call i32 @err(i32 -1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0))
br label %71
71: ; preds = %69, %65
%72 = load i32, i32* @PF_ROUTE
%73 = load i32, i32* @SOCK_DGRAM
%74 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%75 = call i64 @socketpair(i32 %72, i32 %73, i32 0, i32* %74)
%76 = icmp eq i64 %75, 0
br i1 %76, label %77, label %85
77: ; preds = %71
%78 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%79 = load i32, i32* %78
%80 = call i32 @close(i32 %79)
%81 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%82 = load i32, i32* %81
%83 = call i32 @close(i32 %82)
%84 = call i32 (i32, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
br label %85
85: ; preds = %77, %71
%86 = load i64, i64* @errno
%87 = load i64, i64* @EPROTONOSUPPORT
%88 = icmp ne i64 %86, %87
br i1 %88, label %89, label %91
89: ; preds = %85
%90 = call i32 @err(i32 -1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0))
br label %91
91: ; preds = %89, %85
%92 = load i32, i32* @PF_ROUTE
%93 = load i32, i32* @SOCK_RAW
%94 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%95 = call i64 @socketpair(i32 %92, i32 %93, i32 0, i32* %94)
%96 = icmp eq i64 %95, 0
br i1 %96, label %97, label %105
97: ; preds = %91
%98 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%99 = load i32, i32* %98
%100 = call i32 @close(i32 %99)
%101 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%102 = load i32, i32* %101
%103 = call i32 @close(i32 %102)
%104 = call i32 (i32, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0))
br label %105
105: ; preds = %97, %91
ret i32 0
}

LLVM IR (-O2):
@PF_ROUTE = global i32 0
@SOCK_STREAM = global i32 0
@.str = [45 x i8] c"socket(PF_ROUTE, SOCK_STREAM, 0) returned %d\00"
@errno = global i64 0
@EPROTONOSUPPORT = global i64 0
@.str.1 = [33 x i8] c"socket(PF_ROUTE, SOCK_STREAM, 0)\00"
@SOCK_DGRAM = global i32 0
@.str.2 = [44 x i8] c"socket(PF_ROUTE, SOCK_DGRAM, 0) returned %d\00"
@.str.3 = [32 x i8] c"socket(PF_ROUTE, SOCK_DGRAM, 0)\00"
@SOCK_RAW = global i32 0
@.str.4 = [30 x i8] c"socket(PF_ROUTE, SOCK_RAW, 0)\00"
@.str.5 = [52 x i8] c"socketpair(PF_ROUTE, SOCK_STREAM, 0, socks) success\00"
@.str.6 = [44 x i8] c"socketpair(PF_ROUTE, SOCK_STREAM, 0, socks)\00"
@.str.7 = [51 x i8] c"socketpair(PF_ROUTE, SOCK_DGRAM, 0, socks) success\00"
@.str.8 = [43 x i8] c"socketpair(PF_ROUTE, SOCK_DGRAM, 0, socks)\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [2 x i32]
%4 = bitcast [2 x i32]* %3 to i8*
%5 = load i32, i32* @PF_ROUTE
%6 = load i32, i32* @SOCK_STREAM
%7 = tail call i32 @socket(i32 %5, i32 %6, i32 0)
%8 = icmp sgt i32 %7, -1
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = tail call i32 @close(i32 %7)
%11 = tail call i32 (i32, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %12
12: ; preds = %9, %2
%13 = load i64, i64* @errno
%14 = load i64, i64* @EPROTONOSUPPORT
%15 = icmp eq i64 %13, %14
br i1 %15, label %18, label %16
16: ; preds = %12
%17 = tail call i32 @err(i32 -1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %16, %12
%19 = load i32, i32* @PF_ROUTE
%20 = load i32, i32* @SOCK_DGRAM
%21 = tail call i32 @socket(i32 %19, i32 %20, i32 0)
%22 = icmp sgt i32 %21, -1
br i1 %22, label %23, label %26
23: ; preds = %18
%24 = tail call i32 @close(i32 %21)
%25 = tail call i32 (i32, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i32 %21)
br label %26
26: ; preds = %23, %18
%27 = load i64, i64* @errno
%28 = load i64, i64* @EPROTONOSUPPORT
%29 = icmp eq i64 %27, %28
br i1 %29, label %32, label %30
30: ; preds = %26
%31 = tail call i32 @err(i32 -1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
br label %32
32: ; preds = %30, %26
%33 = load i32, i32* @PF_ROUTE
%34 = load i32, i32* @SOCK_RAW
%35 = tail call i32 @socket(i32 %33, i32 %34, i32 0)
%36 = icmp slt i32 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %32
%38 = tail call i32 @err(i32 -1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
br label %39
39: ; preds = %37, %32
%40 = tail call i32 @close(i32 %35)
%41 = load i32, i32* @PF_ROUTE
%42 = load i32, i32* @SOCK_STREAM
%43 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%44 = call i64 @socketpair(i32 %41, i32 %42, i32 0, i32* %43)
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %53
46: ; preds = %39
%47 = load i32, i32* %43
%48 = call i32 @close(i32 %47)
%49 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%50 = load i32, i32* %49
%51 = call i32 @close(i32 %50)
%52 = call i32 (i32, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0))
br label %53
53: ; preds = %46, %39
%54 = load i64, i64* @errno
%55 = load i64, i64* @EPROTONOSUPPORT
%56 = icmp eq i64 %54, %55
br i1 %56, label %59, label %57
57: ; preds = %53
%58 = call i32 @err(i32 -1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0))
br label %59
59: ; preds = %57, %53
%60 = load i32, i32* @PF_ROUTE
%61 = load i32, i32* @SOCK_DGRAM
%62 = call i64 @socketpair(i32 %60, i32 %61, i32 0, i32* %43)
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %71
64: ; preds = %59
%65 = load i32, i32* %43
%66 = call i32 @close(i32 %65)
%67 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%68 = load i32, i32* %67
%69 = call i32 @close(i32 %68)
%70 = call i32 (i32, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
br label %71
71: ; preds = %64, %59
%72 = load i64, i64* @errno
%73 = load i64, i64* @EPROTONOSUPPORT
%74 = icmp eq i64 %72, %73
br i1 %74, label %77, label %75
75: ; preds = %71
%76 = call i32 @err(i32 -1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0))
br label %77
77: ; preds = %75, %71
%78 = load i32, i32* @PF_ROUTE
%79 = load i32, i32* @SOCK_RAW
%80 = call i64 @socketpair(i32 %78, i32 %79, i32 0, i32* %43)
%81 = icmp eq i64 %80, 0
br i1 %81, label %82, label %89
82: ; preds = %77
%83 = load i32, i32* %43
%84 = call i32 @close(i32 %83)
%85 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%86 = load i32, i32* %85
%87 = call i32 @close(i32 %86)
%88 = call i32 (i32, i8*, ...) @errx(i32 -1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0))
br label %89
89: ; preds = %82, %77
ret i32 0
}