#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 /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ AF_INET6;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ build_rcv_fd(int /*<<< orphan*/, int /*<<< orphan*/, int *,
                                int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ test(int *, int, int /*<<< orphan*/);
int main(void) {
  int rcv_fds[32], i;
  fprintf(stderr, "---- UDP IPv4 created before IPv6 ----\n");
  build_rcv_fd(AF_INET, SOCK_DGRAM, rcv_fds, 5);
  build_rcv_fd(AF_INET6, SOCK_DGRAM, &(rcv_fds[5]), 5);
  test(rcv_fds, 10, SOCK_DGRAM);
  for (i = 0; i < 10; ++i) {
    close(rcv_fds[i]);
  }
  fprintf(stderr, "---- UDP IPv6 created before IPv4 ----\n");
  build_rcv_fd(AF_INET6, SOCK_DGRAM, rcv_fds, 5);
  build_rcv_fd(AF_INET, SOCK_DGRAM, &(rcv_fds[5]), 5);
  test(rcv_fds, 10, SOCK_DGRAM);
  for (i = 0; i < 10; ++i) {
    close(rcv_fds[i]);
  }
  fprintf(stderr, "---- UDP IPv4 created before IPv6 (large) ----\n");
  build_rcv_fd(AF_INET, SOCK_DGRAM, rcv_fds, 16);
  build_rcv_fd(AF_INET6, SOCK_DGRAM, &(rcv_fds[16]), 16);
  test(rcv_fds, 32, SOCK_DGRAM);
  for (i = 0; i < 32; ++i) {
    close(rcv_fds[i]);
  }
  fprintf(stderr, "---- UDP IPv6 created before IPv4 (large) ----\n");
  build_rcv_fd(AF_INET6, SOCK_DGRAM, rcv_fds, 16);
  build_rcv_fd(AF_INET, SOCK_DGRAM, &(rcv_fds[16]), 16);
  test(rcv_fds, 32, SOCK_DGRAM);
  for (i = 0; i < 32; ++i) {
    close(rcv_fds[i]);
  }
  fprintf(stderr, "---- TCP IPv4 created before IPv6 ----\n");
  build_rcv_fd(AF_INET, SOCK_STREAM, rcv_fds, 5);
  build_rcv_fd(AF_INET6, SOCK_STREAM, &(rcv_fds[5]), 5);
  test(rcv_fds, 10, SOCK_STREAM);
  for (i = 0; i < 10; ++i) {
    close(rcv_fds[i]);
  }
  fprintf(stderr, "---- TCP IPv6 created before IPv4 ----\n");
  build_rcv_fd(AF_INET6, SOCK_STREAM, rcv_fds, 5);
  build_rcv_fd(AF_INET, SOCK_STREAM, &(rcv_fds[5]), 5);
  test(rcv_fds, 10, SOCK_STREAM);
  for (i = 0; i < 10; ++i) {
    close(rcv_fds[i]);
  }
  fprintf(stderr, "SUCCESS\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
mov    0x2e69(%rip),%rax
mov    (%rax),%esi
lea    -0x90(%rbp),%rdx
mov    $0x5,%ecx
call   1030 <build_rcv_fd@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%edi
mov    0x2e46(%rip),%rax
mov    (%rax),%esi
lea    -0x90(%rbp),%rdx
add    $0x14,%rdx
mov    $0x5,%ecx
call   1030 <build_rcv_fd@plt>
lea    -0x90(%rbp),%rdi
mov    0x2e21(%rip),%rax
mov    (%rax),%edx
mov    $0xa,%esi
call   1060 <test@plt>
movl   $0x0,-0x94(%rbp)
cmpl   $0xa,-0x94(%rbp)
jge    1209 <main+0xc9>
movslq -0x94(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%edi
call   1040 <close@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    11d5 <main+0x95>
mov    0x2db8(%rip),%rax
mov    (%rax),%edi
lea    0xe0f(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2db3(%rip),%rax
mov    (%rax),%edi
mov    0x2db2(%rip),%rax
mov    (%rax),%esi
lea    -0x90(%rbp),%rdx
mov    $0x5,%ecx
call   1030 <build_rcv_fd@plt>
mov    0x2da0(%rip),%rax
mov    (%rax),%edi
mov    0x2d8f(%rip),%rax
mov    (%rax),%esi
lea    -0x90(%rbp),%rdx
add    $0x14,%rdx
mov    $0x5,%ecx
call   1030 <build_rcv_fd@plt>
lea    -0x90(%rbp),%rdi
mov    0x2d6a(%rip),%rax
mov    (%rax),%edx
mov    $0xa,%esi
call   1060 <test@plt>
movl   $0x0,-0x94(%rbp)
cmpl   $0xa,-0x94(%rbp)
jge    12c0 <main+0x180>
movslq -0x94(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%edi
call   1040 <close@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    128c <main+0x14c>
mov    0x2d01(%rip),%rax
mov    (%rax),%edi
lea    0xd80(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2d0c(%rip),%rax
mov    (%rax),%edi
mov    0x2cfb(%rip),%rax
mov    (%rax),%esi
lea    -0x90(%rbp),%rdx
mov    $0x10,%ecx
call   1030 <build_rcv_fd@plt>
mov    0x2cd9(%rip),%rax
mov    (%rax),%edi
mov    0x2cd8(%rip),%rax
mov    (%rax),%esi
lea    -0x90(%rbp),%rdx
add    $0x40,%rdx
mov    $0x10,%ecx
call   1030 <build_rcv_fd@plt>
lea    -0x90(%rbp),%rdi
mov    0x2cb3(%rip),%rax
mov    (%rax),%edx
mov    $0x20,%esi
call   1060 <test@plt>
movl   $0x0,-0x94(%rbp)
cmpl   $0x20,-0x94(%rbp)
jge    1377 <main+0x237>
movslq -0x94(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%edi
call   1040 <close@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1343 <main+0x203>
mov    0x2c4a(%rip),%rax
mov    (%rax),%edi
lea    0xcf9(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2c45(%rip),%rax
mov    (%rax),%edi
mov    0x2c44(%rip),%rax
mov    (%rax),%esi
lea    -0x90(%rbp),%rdx
mov    $0x10,%ecx
call   1030 <build_rcv_fd@plt>
mov    0x2c32(%rip),%rax
mov    (%rax),%edi
mov    0x2c21(%rip),%rax
mov    (%rax),%esi
lea    -0x90(%rbp),%rdx
add    $0x40,%rdx
mov    $0x10,%ecx
call   1030 <build_rcv_fd@plt>
lea    -0x90(%rbp),%rdi
mov    0x2bfc(%rip),%rax
mov    (%rax),%edx
mov    $0x20,%esi
call   1060 <test@plt>
movl   $0x0,-0x94(%rbp)
cmpl   $0x20,-0x94(%rbp)
jge    142e <main+0x2ee>
movslq -0x94(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%edi
call   1040 <close@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    13fa <main+0x2ba>
mov    0x2b93(%rip),%rax
mov    (%rax),%edi
lea    0xc72(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2b9e(%rip),%rax
mov    (%rax),%edi
mov    0x2b6d(%rip),%rax
mov    (%rax),%esi
lea    -0x90(%rbp),%rdx
mov    $0x5,%ecx
call   1030 <build_rcv_fd@plt>
mov    0x2b6b(%rip),%rax
mov    (%rax),%edi
mov    0x2b4a(%rip),%rax
mov    (%rax),%esi
lea    -0x90(%rbp),%rdx
add    $0x14,%rdx
mov    $0x5,%ecx
call   1030 <build_rcv_fd@plt>
lea    -0x90(%rbp),%rdi
mov    0x2b25(%rip),%rax
mov    (%rax),%edx
mov    $0xa,%esi
call   1060 <test@plt>
movl   $0x0,-0x94(%rbp)
cmpl   $0xa,-0x94(%rbp)
jge    14e5 <main+0x3a5>
movslq -0x94(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%edi
call   1040 <close@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    14b1 <main+0x371>
mov    0x2adc(%rip),%rax
mov    (%rax),%edi
lea    0xbe3(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2ad7(%rip),%rax
mov    (%rax),%edi
mov    0x2ab6(%rip),%rax
mov    (%rax),%esi
lea    -0x90(%rbp),%rdx
mov    $0x5,%ecx
call   1030 <build_rcv_fd@plt>
mov    0x2ac4(%rip),%rax
mov    (%rax),%edi
mov    0x2a93(%rip),%rax
mov    (%rax),%esi
lea    -0x90(%rbp),%rdx
add    $0x14,%rdx
mov    $0x5,%ecx
call   1030 <build_rcv_fd@plt>
lea    -0x90(%rbp),%rdi
mov    0x2a6e(%rip),%rax
mov    (%rax),%edx
mov    $0xa,%esi
call   1060 <test@plt>
movl   $0x0,-0x94(%rbp)
cmpl   $0xa,-0x94(%rbp)
jge    159c <main+0x45c>
movslq -0x94(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%edi
call   1040 <close@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1568 <main+0x428>
mov    0x2a25(%rip),%rax
mov    (%rax),%edi
lea    0xb54(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
mov    %rax,%rbx
lea    0xe9c(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
mov    %rax,%r15
mov    0x2e64(%rip),%r14
mov    (%r14),%esi
mov    %rsp,%r12
mov    %r12,%rdx
mov    $0x5,%ecx
call   1030 <build_rcv_fd@plt>
mov    0x2e42(%rip),%r13
mov    0x0(%r13),%edi
mov    (%r14),%esi
lea    0x14(%rsp),%rbp
mov    %rbp,%rdx
mov    $0x5,%ecx
call   1030 <build_rcv_fd@plt>
mov    (%r14),%edx
mov    %r12,%rdi
mov    $0xa,%esi
call   1060 <test@plt>
mov    (%rsp),%edi
call   1040 <close@plt>
mov    0x4(%rsp),%edi
call   1040 <close@plt>
mov    0x8(%rsp),%edi
call   1040 <close@plt>
mov    0xc(%rsp),%edi
call   1040 <close@plt>
mov    0x10(%rsp),%edi
call   1040 <close@plt>
mov    0x14(%rsp),%edi
call   1040 <close@plt>
mov    0x18(%rsp),%edi
call   1040 <close@plt>
mov    0x1c(%rsp),%edi
call   1040 <close@plt>
mov    0x20(%rsp),%edi
call   1040 <close@plt>
mov    0x24(%rsp),%edi
call   1040 <close@plt>
mov    (%rbx),%edi
lea    0xe07(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
mov    (%r14),%esi
mov    %r12,%rdx
mov    $0x5,%ecx
call   1030 <build_rcv_fd@plt>
mov    (%r15),%edi
mov    (%r14),%esi
mov    %rbp,%rdx
mov    $0x5,%ecx
call   1030 <build_rcv_fd@plt>
mov    (%r14),%edx
mov    %r12,%rdi
mov    $0xa,%esi
call   1060 <test@plt>
mov    (%rsp),%edi
call   1040 <close@plt>
mov    0x4(%rsp),%edi
call   1040 <close@plt>
mov    0x8(%rsp),%edi
call   1040 <close@plt>
mov    0xc(%rsp),%edi
call   1040 <close@plt>
mov    0x10(%rsp),%edi
call   1040 <close@plt>
mov    0x14(%rsp),%edi
call   1040 <close@plt>
mov    0x18(%rsp),%edi
call   1040 <close@plt>
mov    0x1c(%rsp),%edi
call   1040 <close@plt>
mov    0x20(%rsp),%edi
call   1040 <close@plt>
mov    0x24(%rsp),%edi
call   1040 <close@plt>
mov    (%rbx),%edi
lea    0xd91(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%r15),%edi
mov    %r15,%rbp
mov    (%r14),%esi
mov    %r12,%rdx
mov    $0x10,%ecx
call   1030 <build_rcv_fd@plt>
mov    0x0(%r13),%edi
mov    (%r14),%esi
lea    0x40(%rsp),%r15
mov    %r15,%rdx
mov    $0x10,%ecx
call   1030 <build_rcv_fd@plt>
mov    (%r14),%edx
mov    %r12,%rdi
mov    $0x20,%esi
call   1060 <test@plt>
mov    (%rsp),%edi
call   1040 <close@plt>
mov    0x4(%rsp),%edi
call   1040 <close@plt>
mov    0x8(%rsp),%edi
call   1040 <close@plt>
mov    0xc(%rsp),%edi
call   1040 <close@plt>
mov    0x10(%rsp),%edi
call   1040 <close@plt>
mov    0x14(%rsp),%edi
call   1040 <close@plt>
mov    0x18(%rsp),%edi
call   1040 <close@plt>
mov    0x1c(%rsp),%edi
call   1040 <close@plt>
mov    0x20(%rsp),%edi
call   1040 <close@plt>
mov    0x24(%rsp),%edi
call   1040 <close@plt>
mov    0x28(%rsp),%edi
call   1040 <close@plt>
mov    0x2c(%rsp),%edi
call   1040 <close@plt>
mov    0x30(%rsp),%edi
call   1040 <close@plt>
mov    0x34(%rsp),%edi
call   1040 <close@plt>
mov    0x38(%rsp),%edi
call   1040 <close@plt>
mov    0x3c(%rsp),%edi
call   1040 <close@plt>
mov    0x40(%rsp),%edi
call   1040 <close@plt>
mov    0x44(%rsp),%edi
call   1040 <close@plt>
mov    0x48(%rsp),%edi
call   1040 <close@plt>
mov    0x4c(%rsp),%edi
call   1040 <close@plt>
mov    0x50(%rsp),%edi
call   1040 <close@plt>
mov    0x54(%rsp),%edi
call   1040 <close@plt>
mov    0x58(%rsp),%edi
call   1040 <close@plt>
mov    0x5c(%rsp),%edi
call   1040 <close@plt>
mov    0x60(%rsp),%edi
call   1040 <close@plt>
mov    0x64(%rsp),%edi
call   1040 <close@plt>
mov    0x68(%rsp),%edi
call   1040 <close@plt>
mov    0x6c(%rsp),%edi
call   1040 <close@plt>
mov    0x70(%rsp),%edi
call   1040 <close@plt>
mov    0x74(%rsp),%edi
call   1040 <close@plt>
mov    0x78(%rsp),%edi
call   1040 <close@plt>
mov    0x7c(%rsp),%edi
call   1040 <close@plt>
mov    (%rbx),%edi
lea    0xc55(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
mov    (%r14),%esi
mov    %r12,%rdx
mov    $0x10,%ecx
call   1030 <build_rcv_fd@plt>
mov    0x0(%rbp),%edi
mov    (%r14),%esi
mov    %r15,%rdx
mov    $0x10,%ecx
call   1030 <build_rcv_fd@plt>
mov    (%r14),%edx
mov    %r12,%rdi
mov    $0x20,%esi
call   1060 <test@plt>
mov    (%rsp),%edi
call   1040 <close@plt>
mov    0x4(%rsp),%edi
call   1040 <close@plt>
mov    0x8(%rsp),%edi
call   1040 <close@plt>
mov    0xc(%rsp),%edi
call   1040 <close@plt>
mov    0x10(%rsp),%edi
call   1040 <close@plt>
mov    0x14(%rsp),%edi
call   1040 <close@plt>
mov    0x18(%rsp),%edi
call   1040 <close@plt>
mov    0x1c(%rsp),%edi
call   1040 <close@plt>
mov    0x20(%rsp),%edi
call   1040 <close@plt>
mov    0x24(%rsp),%edi
call   1040 <close@plt>
mov    0x28(%rsp),%edi
call   1040 <close@plt>
mov    0x2c(%rsp),%edi
call   1040 <close@plt>
mov    0x30(%rsp),%edi
call   1040 <close@plt>
mov    0x34(%rsp),%edi
call   1040 <close@plt>
mov    0x38(%rsp),%edi
call   1040 <close@plt>
mov    0x3c(%rsp),%edi
call   1040 <close@plt>
mov    0x40(%rsp),%edi
call   1040 <close@plt>
mov    0x44(%rsp),%edi
call   1040 <close@plt>
mov    0x48(%rsp),%edi
call   1040 <close@plt>
mov    0x4c(%rsp),%edi
call   1040 <close@plt>
mov    0x50(%rsp),%edi
call   1040 <close@plt>
mov    0x54(%rsp),%edi
call   1040 <close@plt>
mov    0x58(%rsp),%edi
call   1040 <close@plt>
mov    0x5c(%rsp),%edi
call   1040 <close@plt>
mov    0x60(%rsp),%edi
call   1040 <close@plt>
mov    0x64(%rsp),%edi
call   1040 <close@plt>
mov    0x68(%rsp),%edi
call   1040 <close@plt>
mov    0x6c(%rsp),%edi
call   1040 <close@plt>
mov    0x70(%rsp),%edi
call   1040 <close@plt>
mov    0x74(%rsp),%edi
call   1040 <close@plt>
mov    0x78(%rsp),%edi
call   1040 <close@plt>
mov    0x7c(%rsp),%edi
call   1040 <close@plt>
mov    %rbx,%r15
mov    (%rbx),%edi
lea    0xb1e(%rip),%rsi
call   1050 <fprintf@plt>
mov    %rbp,%r14
mov    0x0(%rbp),%edi
mov    0x2a1c(%rip),%rbp
mov    0x0(%rbp),%esi
mov    %r12,%rdx
mov    $0x5,%ecx
call   1030 <build_rcv_fd@plt>
mov    0x0(%r13),%edi
mov    0x0(%rbp),%esi
lea    0x14(%rsp),%rbx
mov    %rbx,%rdx
mov    $0x5,%ecx
call   1030 <build_rcv_fd@plt>
mov    0x0(%rbp),%edx
mov    %r12,%rdi
mov    $0xa,%esi
call   1060 <test@plt>
mov    (%rsp),%edi
call   1040 <close@plt>
mov    0x4(%rsp),%edi
call   1040 <close@plt>
mov    0x8(%rsp),%edi
call   1040 <close@plt>
mov    0xc(%rsp),%edi
call   1040 <close@plt>
mov    0x10(%rsp),%edi
call   1040 <close@plt>
mov    0x14(%rsp),%edi
call   1040 <close@plt>
mov    0x18(%rsp),%edi
call   1040 <close@plt>
mov    0x1c(%rsp),%edi
call   1040 <close@plt>
mov    0x20(%rsp),%edi
call   1040 <close@plt>
mov    0x24(%rsp),%edi
call   1040 <close@plt>
mov    (%r15),%edi
lea    0xa98(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
mov    0x0(%rbp),%esi
mov    %r12,%rdx
mov    $0x5,%ecx
call   1030 <build_rcv_fd@plt>
mov    (%r14),%edi
mov    0x0(%rbp),%esi
mov    %rbx,%rdx
mov    $0x5,%ecx
call   1030 <build_rcv_fd@plt>
mov    0x0(%rbp),%edx
mov    %r12,%rdi
mov    $0xa,%esi
call   1060 <test@plt>
mov    (%rsp),%edi
call   1040 <close@plt>
mov    0x4(%rsp),%edi
call   1040 <close@plt>
mov    0x8(%rsp),%edi
call   1040 <close@plt>
mov    0xc(%rsp),%edi
call   1040 <close@plt>
mov    0x10(%rsp),%edi
call   1040 <close@plt>
mov    0x14(%rsp),%edi
call   1040 <close@plt>
mov    0x18(%rsp),%edi
call   1040 <close@plt>
mov    0x1c(%rsp),%edi
call   1040 <close@plt>
mov    0x20(%rsp),%edi
call   1040 <close@plt>
mov    0x24(%rsp),%edi
call   1040 <close@plt>
mov    (%r15),%edi
lea    0xa21(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"---- UDP IPv4 created before IPv6 ----\0A\00"
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@AF_INET6 = global i32 0
@.str.1 = [40 x i8] c"---- UDP IPv6 created before IPv4 ----\0A\00"
@.str.2 = [48 x i8] c"---- UDP IPv4 created before IPv6 (large) ----\0A\00"
@.str.3 = [48 x i8] c"---- UDP IPv6 created before IPv4 (large) ----\0A\00"
@.str.4 = [40 x i8] c"---- TCP IPv4 created before IPv6 ----\0A\00"
@SOCK_STREAM = global i32 0
@.str.5 = [40 x i8] c"---- TCP IPv6 created before IPv4 ----\0A\00"
@.str.6 = [9 x i8] c"SUCCESS\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [32 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @AF_INET
%7 = load i32, i32* @SOCK_DGRAM
%8 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 0
%9 = call i32 @build_rcv_fd(i32 %6, i32 %7, i32* %8, i32 5)
%10 = load i32, i32* @AF_INET6
%11 = load i32, i32* @SOCK_DGRAM
%12 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 5
%13 = call i32 @build_rcv_fd(i32 %10, i32 %11, i32* %12, i32 5)
%14 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 0
%15 = load i32, i32* @SOCK_DGRAM
%16 = call i32 @test(i32* %14, i32 10, i32 %15)
store i32 0, i32* %3
br label %17
17: ; preds = %26, %0
%18 = load i32, i32* %3
%19 = icmp slt i32 %18, 10
br i1 %19, label %20, label %29
20: ; preds = %17
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %22
%24 = load i32, i32* %23
%25 = call i32 @close(i32 %24)
br label %26
26: ; preds = %20
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
br label %17
29: ; preds = %17
%30 = load i32, i32* @stderr
%31 = call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%32 = load i32, i32* @AF_INET6
%33 = load i32, i32* @SOCK_DGRAM
%34 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 0
%35 = call i32 @build_rcv_fd(i32 %32, i32 %33, i32* %34, i32 5)
%36 = load i32, i32* @AF_INET
%37 = load i32, i32* @SOCK_DGRAM
%38 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 5
%39 = call i32 @build_rcv_fd(i32 %36, i32 %37, i32* %38, i32 5)
%40 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 0
%41 = load i32, i32* @SOCK_DGRAM
%42 = call i32 @test(i32* %40, i32 10, i32 %41)
store i32 0, i32* %3
br label %43
43: ; preds = %52, %29
%44 = load i32, i32* %3
%45 = icmp slt i32 %44, 10
br i1 %45, label %46, label %55
46: ; preds = %43
%47 = load i32, i32* %3
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %48
%50 = load i32, i32* %49
%51 = call i32 @close(i32 %50)
br label %52
52: ; preds = %46
%53 = load i32, i32* %3
%54 = add nsw i32 %53, 1
store i32 %54, i32* %3
br label %43
55: ; preds = %43
%56 = load i32, i32* @stderr
%57 = call i32 @fprintf(i32 %56, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
%58 = load i32, i32* @AF_INET
%59 = load i32, i32* @SOCK_DGRAM
%60 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 0
%61 = call i32 @build_rcv_fd(i32 %58, i32 %59, i32* %60, i32 16)
%62 = load i32, i32* @AF_INET6
%63 = load i32, i32* @SOCK_DGRAM
%64 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 16
%65 = call i32 @build_rcv_fd(i32 %62, i32 %63, i32* %64, i32 16)
%66 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 0
%67 = load i32, i32* @SOCK_DGRAM
%68 = call i32 @test(i32* %66, i32 32, i32 %67)
store i32 0, i32* %3
br label %69
69: ; preds = %78, %55
%70 = load i32, i32* %3
%71 = icmp slt i32 %70, 32
br i1 %71, label %72, label %81
72: ; preds = %69
%73 = load i32, i32* %3
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %74
%76 = load i32, i32* %75
%77 = call i32 @close(i32 %76)
br label %78
78: ; preds = %72
%79 = load i32, i32* %3
%80 = add nsw i32 %79, 1
store i32 %80, i32* %3
br label %69
81: ; preds = %69
%82 = load i32, i32* @stderr
%83 = call i32 @fprintf(i32 %82, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.3, i64 0, i64 0))
%84 = load i32, i32* @AF_INET6
%85 = load i32, i32* @SOCK_DGRAM
%86 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 0
%87 = call i32 @build_rcv_fd(i32 %84, i32 %85, i32* %86, i32 16)
%88 = load i32, i32* @AF_INET
%89 = load i32, i32* @SOCK_DGRAM
%90 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 16
%91 = call i32 @build_rcv_fd(i32 %88, i32 %89, i32* %90, i32 16)
%92 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 0
%93 = load i32, i32* @SOCK_DGRAM
%94 = call i32 @test(i32* %92, i32 32, i32 %93)
store i32 0, i32* %3
br label %95
95: ; preds = %104, %81
%96 = load i32, i32* %3
%97 = icmp slt i32 %96, 32
br i1 %97, label %98, label %107
98: ; preds = %95
%99 = load i32, i32* %3
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %100
%102 = load i32, i32* %101
%103 = call i32 @close(i32 %102)
br label %104
104: ; preds = %98
%105 = load i32, i32* %3
%106 = add nsw i32 %105, 1
store i32 %106, i32* %3
br label %95
107: ; preds = %95
%108 = load i32, i32* @stderr
%109 = call i32 @fprintf(i32 %108, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
%110 = load i32, i32* @AF_INET
%111 = load i32, i32* @SOCK_STREAM
%112 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 0
%113 = call i32 @build_rcv_fd(i32 %110, i32 %111, i32* %112, i32 5)
%114 = load i32, i32* @AF_INET6
%115 = load i32, i32* @SOCK_STREAM
%116 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 5
%117 = call i32 @build_rcv_fd(i32 %114, i32 %115, i32* %116, i32 5)
%118 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 0
%119 = load i32, i32* @SOCK_STREAM
%120 = call i32 @test(i32* %118, i32 10, i32 %119)
store i32 0, i32* %3
br label %121
121: ; preds = %130, %107
%122 = load i32, i32* %3
%123 = icmp slt i32 %122, 10
br i1 %123, label %124, label %133
124: ; preds = %121
%125 = load i32, i32* %3
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %126
%128 = load i32, i32* %127
%129 = call i32 @close(i32 %128)
br label %130
130: ; preds = %124
%131 = load i32, i32* %3
%132 = add nsw i32 %131, 1
store i32 %132, i32* %3
br label %121
133: ; preds = %121
%134 = load i32, i32* @stderr
%135 = call i32 @fprintf(i32 %134, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0))
%136 = load i32, i32* @AF_INET6
%137 = load i32, i32* @SOCK_STREAM
%138 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 0
%139 = call i32 @build_rcv_fd(i32 %136, i32 %137, i32* %138, i32 5)
%140 = load i32, i32* @AF_INET
%141 = load i32, i32* @SOCK_STREAM
%142 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 5
%143 = call i32 @build_rcv_fd(i32 %140, i32 %141, i32* %142, i32 5)
%144 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 0
%145 = load i32, i32* @SOCK_STREAM
%146 = call i32 @test(i32* %144, i32 10, i32 %145)
store i32 0, i32* %3
br label %147
147: ; preds = %156, %133
%148 = load i32, i32* %3
%149 = icmp slt i32 %148, 10
br i1 %149, label %150, label %159
150: ; preds = %147
%151 = load i32, i32* %3
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 %152
%154 = load i32, i32* %153
%155 = call i32 @close(i32 %154)
br label %156
156: ; preds = %150
%157 = load i32, i32* %3
%158 = add nsw i32 %157, 1
store i32 %158, i32* %3
br label %147
159: ; preds = %147
%160 = load i32, i32* @stderr
%161 = call i32 @fprintf(i32 %160, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"---- UDP IPv4 created before IPv6 ----\0A\00"
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@AF_INET6 = global i32 0
@.str.1 = [40 x i8] c"---- UDP IPv6 created before IPv4 ----\0A\00"
@.str.2 = [48 x i8] c"---- UDP IPv4 created before IPv6 (large) ----\0A\00"
@.str.3 = [48 x i8] c"---- UDP IPv6 created before IPv4 (large) ----\0A\00"
@.str.4 = [40 x i8] c"---- TCP IPv4 created before IPv6 ----\0A\00"
@SOCK_STREAM = global i32 0
@.str.5 = [40 x i8] c"---- TCP IPv6 created before IPv4 ----\0A\00"
@.str.6 = [9 x i8] c"SUCCESS\0A\00"
define i32 @main() {
%1 = alloca [32 x i32]
%2 = bitcast [32 x i32]* %1 to i8*
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @AF_INET
%6 = load i32, i32* @SOCK_DGRAM
%7 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 0
%8 = call i32 @build_rcv_fd(i32 %5, i32 %6, i32* %7, i32 5)
%9 = load i32, i32* @AF_INET6
%10 = load i32, i32* @SOCK_DGRAM
%11 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 5
%12 = call i32 @build_rcv_fd(i32 %9, i32 %10, i32* %11, i32 5)
%13 = load i32, i32* @SOCK_DGRAM
%14 = call i32 @test(i32* %7, i32 10, i32 %13)
%15 = load i32, i32* %7
%16 = call i32 @close(i32 %15)
%17 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 1
%18 = load i32, i32* %17
%19 = call i32 @close(i32 %18)
%20 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 2
%21 = load i32, i32* %20
%22 = call i32 @close(i32 %21)
%23 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 3
%24 = load i32, i32* %23
%25 = call i32 @close(i32 %24)
%26 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 4
%27 = load i32, i32* %26
%28 = call i32 @close(i32 %27)
%29 = load i32, i32* %11
%30 = call i32 @close(i32 %29)
%31 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 6
%32 = load i32, i32* %31
%33 = call i32 @close(i32 %32)
%34 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 7
%35 = load i32, i32* %34
%36 = call i32 @close(i32 %35)
%37 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 8
%38 = load i32, i32* %37
%39 = call i32 @close(i32 %38)
%40 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 9
%41 = load i32, i32* %40
%42 = call i32 @close(i32 %41)
%43 = load i32, i32* @stderr
%44 = call i32 @fprintf(i32 %43, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%45 = load i32, i32* @AF_INET6
%46 = load i32, i32* @SOCK_DGRAM
%47 = call i32 @build_rcv_fd(i32 %45, i32 %46, i32* %7, i32 5)
%48 = load i32, i32* @AF_INET
%49 = load i32, i32* @SOCK_DGRAM
%50 = call i32 @build_rcv_fd(i32 %48, i32 %49, i32* %11, i32 5)
%51 = load i32, i32* @SOCK_DGRAM
%52 = call i32 @test(i32* %7, i32 10, i32 %51)
%53 = load i32, i32* %7
%54 = call i32 @close(i32 %53)
%55 = load i32, i32* %17
%56 = call i32 @close(i32 %55)
%57 = load i32, i32* %20
%58 = call i32 @close(i32 %57)
%59 = load i32, i32* %23
%60 = call i32 @close(i32 %59)
%61 = load i32, i32* %26
%62 = call i32 @close(i32 %61)
%63 = load i32, i32* %11
%64 = call i32 @close(i32 %63)
%65 = load i32, i32* %31
%66 = call i32 @close(i32 %65)
%67 = load i32, i32* %34
%68 = call i32 @close(i32 %67)
%69 = load i32, i32* %37
%70 = call i32 @close(i32 %69)
%71 = load i32, i32* %40
%72 = call i32 @close(i32 %71)
%73 = load i32, i32* @stderr
%74 = call i32 @fprintf(i32 %73, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
%75 = load i32, i32* @AF_INET
%76 = load i32, i32* @SOCK_DGRAM
%77 = call i32 @build_rcv_fd(i32 %75, i32 %76, i32* %7, i32 16)
%78 = load i32, i32* @AF_INET6
%79 = load i32, i32* @SOCK_DGRAM
%80 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 16
%81 = call i32 @build_rcv_fd(i32 %78, i32 %79, i32* %80, i32 16)
%82 = load i32, i32* @SOCK_DGRAM
%83 = call i32 @test(i32* %7, i32 32, i32 %82)
%84 = load i32, i32* %7
%85 = call i32 @close(i32 %84)
%86 = load i32, i32* %17
%87 = call i32 @close(i32 %86)
%88 = load i32, i32* %20
%89 = call i32 @close(i32 %88)
%90 = load i32, i32* %23
%91 = call i32 @close(i32 %90)
%92 = load i32, i32* %26
%93 = call i32 @close(i32 %92)
%94 = load i32, i32* %11
%95 = call i32 @close(i32 %94)
%96 = load i32, i32* %31
%97 = call i32 @close(i32 %96)
%98 = load i32, i32* %34
%99 = call i32 @close(i32 %98)
%100 = load i32, i32* %37
%101 = call i32 @close(i32 %100)
%102 = load i32, i32* %40
%103 = call i32 @close(i32 %102)
%104 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 10
%105 = load i32, i32* %104
%106 = call i32 @close(i32 %105)
%107 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 11
%108 = load i32, i32* %107
%109 = call i32 @close(i32 %108)
%110 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 12
%111 = load i32, i32* %110
%112 = call i32 @close(i32 %111)
%113 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 13
%114 = load i32, i32* %113
%115 = call i32 @close(i32 %114)
%116 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 14
%117 = load i32, i32* %116
%118 = call i32 @close(i32 %117)
%119 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 15
%120 = load i32, i32* %119
%121 = call i32 @close(i32 %120)
%122 = load i32, i32* %80
%123 = call i32 @close(i32 %122)
%124 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 17
%125 = load i32, i32* %124
%126 = call i32 @close(i32 %125)
%127 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 18
%128 = load i32, i32* %127
%129 = call i32 @close(i32 %128)
%130 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 19
%131 = load i32, i32* %130
%132 = call i32 @close(i32 %131)
%133 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 20
%134 = load i32, i32* %133
%135 = call i32 @close(i32 %134)
%136 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 21
%137 = load i32, i32* %136
%138 = call i32 @close(i32 %137)
%139 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 22
%140 = load i32, i32* %139
%141 = call i32 @close(i32 %140)
%142 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 23
%143 = load i32, i32* %142
%144 = call i32 @close(i32 %143)
%145 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 24
%146 = load i32, i32* %145
%147 = call i32 @close(i32 %146)
%148 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 25
%149 = load i32, i32* %148
%150 = call i32 @close(i32 %149)
%151 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 26
%152 = load i32, i32* %151
%153 = call i32 @close(i32 %152)
%154 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 27
%155 = load i32, i32* %154
%156 = call i32 @close(i32 %155)
%157 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 28
%158 = load i32, i32* %157
%159 = call i32 @close(i32 %158)
%160 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 29
%161 = load i32, i32* %160
%162 = call i32 @close(i32 %161)
%163 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 30
%164 = load i32, i32* %163
%165 = call i32 @close(i32 %164)
%166 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 31
%167 = load i32, i32* %166
%168 = call i32 @close(i32 %167)
%169 = load i32, i32* @stderr
%170 = call i32 @fprintf(i32 %169, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.3, i64 0, i64 0))
%171 = load i32, i32* @AF_INET6
%172 = load i32, i32* @SOCK_DGRAM
%173 = call i32 @build_rcv_fd(i32 %171, i32 %172, i32* %7, i32 16)
%174 = load i32, i32* @AF_INET
%175 = load i32, i32* @SOCK_DGRAM
%176 = call i32 @build_rcv_fd(i32 %174, i32 %175, i32* %80, i32 16)
%177 = load i32, i32* @SOCK_DGRAM
%178 = call i32 @test(i32* %7, i32 32, i32 %177)
%179 = load i32, i32* %7
%180 = call i32 @close(i32 %179)
%181 = load i32, i32* %17
%182 = call i32 @close(i32 %181)
%183 = load i32, i32* %20
%184 = call i32 @close(i32 %183)
%185 = load i32, i32* %23
%186 = call i32 @close(i32 %185)
%187 = load i32, i32* %26
%188 = call i32 @close(i32 %187)
%189 = load i32, i32* %11
%190 = call i32 @close(i32 %189)
%191 = load i32, i32* %31
%192 = call i32 @close(i32 %191)
%193 = load i32, i32* %34
%194 = call i32 @close(i32 %193)
%195 = load i32, i32* %37
%196 = call i32 @close(i32 %195)
%197 = load i32, i32* %40
%198 = call i32 @close(i32 %197)
%199 = load i32, i32* %104
%200 = call i32 @close(i32 %199)
%201 = load i32, i32* %107
%202 = call i32 @close(i32 %201)
%203 = load i32, i32* %110
%204 = call i32 @close(i32 %203)
%205 = load i32, i32* %113
%206 = call i32 @close(i32 %205)
%207 = load i32, i32* %116
%208 = call i32 @close(i32 %207)
%209 = load i32, i32* %119
%210 = call i32 @close(i32 %209)
%211 = load i32, i32* %80
%212 = call i32 @close(i32 %211)
%213 = load i32, i32* %124
%214 = call i32 @close(i32 %213)
%215 = load i32, i32* %127
%216 = call i32 @close(i32 %215)
%217 = load i32, i32* %130
%218 = call i32 @close(i32 %217)
%219 = load i32, i32* %133
%220 = call i32 @close(i32 %219)
%221 = load i32, i32* %136
%222 = call i32 @close(i32 %221)
%223 = load i32, i32* %139
%224 = call i32 @close(i32 %223)
%225 = load i32, i32* %142
%226 = call i32 @close(i32 %225)
%227 = load i32, i32* %145
%228 = call i32 @close(i32 %227)
%229 = load i32, i32* %148
%230 = call i32 @close(i32 %229)
%231 = load i32, i32* %151
%232 = call i32 @close(i32 %231)
%233 = load i32, i32* %154
%234 = call i32 @close(i32 %233)
%235 = load i32, i32* %157
%236 = call i32 @close(i32 %235)
%237 = load i32, i32* %160
%238 = call i32 @close(i32 %237)
%239 = load i32, i32* %163
%240 = call i32 @close(i32 %239)
%241 = load i32, i32* %166
%242 = call i32 @close(i32 %241)
%243 = load i32, i32* @stderr
%244 = call i32 @fprintf(i32 %243, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
%245 = load i32, i32* @AF_INET
%246 = load i32, i32* @SOCK_STREAM
%247 = call i32 @build_rcv_fd(i32 %245, i32 %246, i32* %7, i32 5)
%248 = load i32, i32* @AF_INET6
%249 = load i32, i32* @SOCK_STREAM
%250 = call i32 @build_rcv_fd(i32 %248, i32 %249, i32* %11, i32 5)
%251 = load i32, i32* @SOCK_STREAM
%252 = call i32 @test(i32* %7, i32 10, i32 %251)
%253 = load i32, i32* %7
%254 = call i32 @close(i32 %253)
%255 = load i32, i32* %17
%256 = call i32 @close(i32 %255)
%257 = load i32, i32* %20
%258 = call i32 @close(i32 %257)
%259 = load i32, i32* %23
%260 = call i32 @close(i32 %259)
%261 = load i32, i32* %26
%262 = call i32 @close(i32 %261)
%263 = load i32, i32* %11
%264 = call i32 @close(i32 %263)
%265 = load i32, i32* %31
%266 = call i32 @close(i32 %265)
%267 = load i32, i32* %34
%268 = call i32 @close(i32 %267)
%269 = load i32, i32* %37
%270 = call i32 @close(i32 %269)
%271 = load i32, i32* %40
%272 = call i32 @close(i32 %271)
%273 = load i32, i32* @stderr
%274 = call i32 @fprintf(i32 %273, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0))
%275 = load i32, i32* @AF_INET6
%276 = load i32, i32* @SOCK_STREAM
%277 = call i32 @build_rcv_fd(i32 %275, i32 %276, i32* %7, i32 5)
%278 = load i32, i32* @AF_INET
%279 = load i32, i32* @SOCK_STREAM
%280 = call i32 @build_rcv_fd(i32 %278, i32 %279, i32* %11, i32 5)
%281 = load i32, i32* @SOCK_STREAM
%282 = call i32 @test(i32* %7, i32 10, i32 %281)
%283 = load i32, i32* %7
%284 = call i32 @close(i32 %283)
%285 = load i32, i32* %17
%286 = call i32 @close(i32 %285)
%287 = load i32, i32* %20
%288 = call i32 @close(i32 %287)
%289 = load i32, i32* %23
%290 = call i32 @close(i32 %289)
%291 = load i32, i32* %26
%292 = call i32 @close(i32 %291)
%293 = load i32, i32* %11
%294 = call i32 @close(i32 %293)
%295 = load i32, i32* %31
%296 = call i32 @close(i32 %295)
%297 = load i32, i32* %34
%298 = call i32 @close(i32 %297)
%299 = load i32, i32* %37
%300 = call i32 @close(i32 %299)
%301 = load i32, i32* %40
%302 = call i32 @close(i32 %301)
%303 = load i32, i32* @stderr
%304 = call i32 @fprintf(i32 %303, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}