#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 */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ closesocketpair(int *);
int /*<<< orphan*/ devnull(char const *, int *);
int /*<<< orphan*/ dofstat(char const *, int, struct stat *);
int /*<<< orphan*/ domainsocketpair(char const *, int *);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ recvfd(char const *, int, int *);
int /*<<< orphan*/ samefile(char const *, struct stat *, struct stat *);
int /*<<< orphan*/ sendfd(char const *, int, int);
int /*<<< orphan*/ tempfile(char const *, int *);
int main(int argc, char *argv[]) {
  struct stat putfd_1_stat, putfd_2_stat, getfd_1_stat, getfd_2_stat;
  int fd[2], putfd_1, putfd_2, getfd_1, getfd_2;
  const char *test;
  test = "test1-simplesendfd";
  printf("beginning %s\n", test);
  domainsocketpair(test, fd);
  tempfile(test, &putfd_1);
  dofstat(test, putfd_1, &putfd_1_stat);
  sendfd(test, fd[0], putfd_1);
  recvfd(test, fd[1], &getfd_1);
  dofstat(test, getfd_1, &getfd_1_stat);
  samefile(test, &putfd_1_stat, &getfd_1_stat);
  close(putfd_1);
  close(getfd_1);
  closesocketpair(fd);
  printf("%s passed\n", test);
  test = "test2-sendandclose";
  printf("beginning %s\n", test);
  domainsocketpair(test, fd);
  tempfile(test, &putfd_1);
  dofstat(test, putfd_1, &putfd_1_stat);
  sendfd(test, fd[0], putfd_1);
  close(putfd_1);
  recvfd(test, fd[1], &getfd_1);
  dofstat(test, getfd_1, &getfd_1_stat);
  samefile(test, &putfd_1_stat, &getfd_1_stat);
  close(getfd_1);
  closesocketpair(fd);
  printf("%s passed\n", test);
  test = "test3-sendandcancel";
  printf("beginning %s\n", test);
  domainsocketpair(test, fd);
  tempfile(test, &putfd_1);
  sendfd(test, fd[0], putfd_1);
  close(putfd_1);
  closesocketpair(fd);
  printf("%s passed\n", test);
  test = "test4-twofile";
  printf("beginning %s\n", test);
  domainsocketpair(test, fd);
  tempfile(test, &putfd_1);
  tempfile(test, &putfd_2);
  dofstat(test, putfd_1, &putfd_1_stat);
  dofstat(test, putfd_2, &putfd_2_stat);
  sendfd(test, fd[0], putfd_1);
  sendfd(test, fd[0], putfd_2);
  close(putfd_1);
  close(putfd_2);
  recvfd(test, fd[1], &getfd_1);
  recvfd(test, fd[1], &getfd_2);
  dofstat(test, getfd_1, &getfd_1_stat);
  dofstat(test, getfd_2, &getfd_2_stat);
  samefile(test, &putfd_1_stat, &getfd_1_stat);
  samefile(test, &putfd_2_stat, &getfd_2_stat);
  close(getfd_1);
  close(getfd_2);
  closesocketpair(fd);
  printf("%s passed\n", test);
  test = "test5-bundle";
  printf("beginning %s\n", test);
  domainsocketpair(test, fd);
  sendfd(test, fd[0], fd[0]);
  close(fd[0]);
  recvfd(test, fd[1], &getfd_1);
  close(getfd_1);
  close(fd[1]);
  printf("%s passed\n", test);
  test = "test6-bundlecancel";
  printf("beginning %s\n", test);
  domainsocketpair(test, fd);
  sendfd(test, fd[0], fd[0]);
  sendfd(test, fd[1], fd[0]);
  closesocketpair(fd);
  printf("%s passed\n", test);
  test = "test7-devfsorphan";
  printf("beginning %s\n", test);
  domainsocketpair(test, fd);
  devnull(test, &putfd_1);
  sendfd(test, fd[0], putfd_1);
  close(putfd_1);
  closesocketpair(fd);
  printf("%s passed\n", test);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe43(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rsi
lea    0xe47(%rip),%rdi
call   1060 <printf@plt>
mov    -0x50(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   10c0 <domainsocketpair@plt>
mov    -0x50(%rbp),%rdi
lea    -0x3c(%rbp),%rsi
call   1030 <tempfile@plt>
mov    -0x50(%rbp),%rdi
mov    -0x3c(%rbp),%esi
lea    -0x18(%rbp),%rdx
call   10a0 <dofstat@plt>
mov    -0x50(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x3c(%rbp),%edx
call   1080 <sendfd@plt>
mov    -0x50(%rbp),%rdi
mov    -0x34(%rbp),%esi
lea    -0x44(%rbp),%rdx
call   1090 <recvfd@plt>
mov    -0x50(%rbp),%rdi
mov    -0x44(%rbp),%esi
lea    -0x28(%rbp),%rdx
call   10a0 <dofstat@plt>
mov    -0x50(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x28(%rbp),%rdx
call   1050 <samefile@plt>
mov    -0x3c(%rbp),%edi
call   1070 <close@plt>
mov    -0x44(%rbp),%edi
call   1070 <close@plt>
lea    -0x38(%rbp),%rdi
call   1040 <closesocketpair@plt>
mov    -0x50(%rbp),%rsi
lea    0xdc2(%rip),%rdi
call   1060 <printf@plt>
lea    0xdc1(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rsi
lea    0xd99(%rip),%rdi
call   1060 <printf@plt>
mov    -0x50(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   10c0 <domainsocketpair@plt>
mov    -0x50(%rbp),%rdi
lea    -0x3c(%rbp),%rsi
call   1030 <tempfile@plt>
mov    -0x50(%rbp),%rdi
mov    -0x3c(%rbp),%esi
lea    -0x18(%rbp),%rdx
call   10a0 <dofstat@plt>
mov    -0x50(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x3c(%rbp),%edx
call   1080 <sendfd@plt>
mov    -0x3c(%rbp),%edi
call   1070 <close@plt>
mov    -0x50(%rbp),%rdi
mov    -0x34(%rbp),%esi
lea    -0x44(%rbp),%rdx
call   1090 <recvfd@plt>
mov    -0x50(%rbp),%rdi
mov    -0x44(%rbp),%esi
lea    -0x28(%rbp),%rdx
call   10a0 <dofstat@plt>
mov    -0x50(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x28(%rbp),%rdx
call   1050 <samefile@plt>
mov    -0x44(%rbp),%edi
call   1070 <close@plt>
lea    -0x38(%rbp),%rdi
call   1040 <closesocketpair@plt>
mov    -0x50(%rbp),%rsi
lea    0xd14(%rip),%rdi
call   1060 <printf@plt>
lea    0xd26(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rsi
lea    0xceb(%rip),%rdi
call   1060 <printf@plt>
mov    -0x50(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   10c0 <domainsocketpair@plt>
mov    -0x50(%rbp),%rdi
lea    -0x3c(%rbp),%rsi
call   1030 <tempfile@plt>
mov    -0x50(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x3c(%rbp),%edx
call   1080 <sendfd@plt>
mov    -0x3c(%rbp),%edi
call   1070 <close@plt>
lea    -0x38(%rbp),%rdi
call   1040 <closesocketpair@plt>
mov    -0x50(%rbp),%rsi
lea    0xcaf(%rip),%rdi
call   1060 <printf@plt>
lea    0xcd5(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rsi
lea    0xc86(%rip),%rdi
call   1060 <printf@plt>
mov    -0x50(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   10c0 <domainsocketpair@plt>
mov    -0x50(%rbp),%rdi
lea    -0x3c(%rbp),%rsi
call   1030 <tempfile@plt>
mov    -0x50(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <tempfile@plt>
mov    -0x50(%rbp),%rdi
mov    -0x3c(%rbp),%esi
lea    -0x18(%rbp),%rdx
call   10a0 <dofstat@plt>
mov    -0x50(%rbp),%rdi
mov    -0x40(%rbp),%esi
lea    -0x20(%rbp),%rdx
call   10a0 <dofstat@plt>
mov    -0x50(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x3c(%rbp),%edx
call   1080 <sendfd@plt>
mov    -0x50(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x40(%rbp),%edx
call   1080 <sendfd@plt>
mov    -0x3c(%rbp),%edi
call   1070 <close@plt>
mov    -0x40(%rbp),%edi
call   1070 <close@plt>
mov    -0x50(%rbp),%rdi
mov    -0x34(%rbp),%esi
lea    -0x44(%rbp),%rdx
call   1090 <recvfd@plt>
mov    -0x50(%rbp),%rdi
mov    -0x34(%rbp),%esi
lea    -0x48(%rbp),%rdx
call   1090 <recvfd@plt>
mov    -0x50(%rbp),%rdi
mov    -0x44(%rbp),%esi
lea    -0x28(%rbp),%rdx
call   10a0 <dofstat@plt>
mov    -0x50(%rbp),%rdi
mov    -0x48(%rbp),%esi
lea    -0x30(%rbp),%rdx
call   10a0 <dofstat@plt>
mov    -0x50(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x28(%rbp),%rdx
call   1050 <samefile@plt>
mov    -0x50(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1050 <samefile@plt>
mov    -0x44(%rbp),%edi
call   1070 <close@plt>
mov    -0x48(%rbp),%edi
call   1070 <close@plt>
lea    -0x38(%rbp),%rdi
call   1040 <closesocketpair@plt>
mov    -0x50(%rbp),%rsi
lea    0xb94(%rip),%rdi
call   1060 <printf@plt>
lea    0xbc8(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rsi
lea    0xb6b(%rip),%rdi
call   1060 <printf@plt>
mov    -0x50(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   10c0 <domainsocketpair@plt>
mov    -0x50(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x38(%rbp),%edx
call   1080 <sendfd@plt>
mov    -0x38(%rbp),%edi
call   1070 <close@plt>
mov    -0x50(%rbp),%rdi
mov    -0x34(%rbp),%esi
lea    -0x44(%rbp),%rdx
call   1090 <recvfd@plt>
mov    -0x44(%rbp),%edi
call   1070 <close@plt>
mov    -0x34(%rbp),%edi
call   1070 <close@plt>
mov    -0x50(%rbp),%rsi
lea    0xb25(%rip),%rdi
call   1060 <printf@plt>
lea    0xb66(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rsi
lea    0xafc(%rip),%rdi
call   1060 <printf@plt>
mov    -0x50(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   10c0 <domainsocketpair@plt>
mov    -0x50(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x38(%rbp),%edx
call   1080 <sendfd@plt>
mov    -0x50(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
call   1080 <sendfd@plt>
lea    -0x38(%rbp),%rdi
call   1040 <closesocketpair@plt>
mov    -0x50(%rbp),%rsi
lea    0xac6(%rip),%rdi
call   1060 <printf@plt>
lea    0xb1a(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rsi
lea    0xa9d(%rip),%rdi
call   1060 <printf@plt>
mov    -0x50(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   10c0 <domainsocketpair@plt>
mov    -0x50(%rbp),%rdi
lea    -0x3c(%rbp),%rsi
call   10b0 <devnull@plt>
mov    -0x50(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x3c(%rbp),%edx
call   1080 <sendfd@plt>
mov    -0x3c(%rbp),%edi
call   1070 <close@plt>
lea    -0x38(%rbp),%rdi
call   1040 <closesocketpair@plt>
mov    -0x50(%rbp),%rsi
lea    0xa61(%rip),%rdi
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
lea    0xe5e(%rip),%r12
lea    0xe44(%rip),%rbp
mov    %r12,%rdi
mov    %rbp,%rsi
call   1060 <printf@plt>
lea    0xc(%rsp),%r14
mov    %rbp,%rdi
mov    %r14,%rsi
call   10c0 <domainsocketpair@plt>
lea    0x4(%rsp),%rsi
mov    %rbp,%rdi
call   1030 <tempfile@plt>
mov    0x4(%rsp),%esi
lea    0x18(%rsp),%rbx
mov    %rbp,%rdi
mov    %rbx,%rdx
call   10a0 <dofstat@plt>
mov    0xc(%rsp),%esi
mov    0x4(%rsp),%edx
mov    %rbp,%rdi
call   1080 <sendfd@plt>
mov    0x10(%rsp),%esi
lea    0x8(%rsp),%rdx
mov    %rbp,%rdi
call   1090 <recvfd@plt>
mov    0x8(%rsp),%esi
lea    0x28(%rsp),%r15
mov    %rbp,%rdi
mov    %r15,%rdx
call   10a0 <dofstat@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1050 <samefile@plt>
mov    0x4(%rsp),%edi
call   1070 <close@plt>
mov    0x8(%rsp),%edi
call   1070 <close@plt>
mov    %r14,%rdi
call   1040 <closesocketpair@plt>
lea    0xdc5(%rip),%r13
mov    %r13,%rdi
mov    %rbp,%rsi
call   1060 <printf@plt>
lea    0xdbe(%rip),%rbp
mov    %r12,%rdi
mov    %rbp,%rsi
call   1060 <printf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   10c0 <domainsocketpair@plt>
mov    %rbp,%rdi
lea    0x4(%rsp),%rsi
call   1030 <tempfile@plt>
mov    0x4(%rsp),%esi
mov    %rbp,%rdi
lea    0x18(%rsp),%rbx
mov    %rbx,%rdx
call   10a0 <dofstat@plt>
mov    0xc(%rsp),%esi
mov    0x4(%rsp),%edx
mov    %rbp,%rdi
call   1080 <sendfd@plt>
mov    0x4(%rsp),%edi
call   1070 <close@plt>
mov    0x10(%rsp),%esi
mov    %rbp,%rdi
lea    0x8(%rsp),%rdx
call   1090 <recvfd@plt>
mov    0x8(%rsp),%esi
mov    %rbp,%rdi
mov    %r15,%rdx
call   10a0 <dofstat@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1050 <samefile@plt>
mov    0x8(%rsp),%edi
call   1070 <close@plt>
mov    %r14,%rdi
call   1040 <closesocketpair@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
call   1060 <printf@plt>
lea    0xd30(%rip),%rbp
mov    %r12,%rdi
mov    %rbp,%rsi
call   1060 <printf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   10c0 <domainsocketpair@plt>
mov    %rbp,%rdi
lea    0x4(%rsp),%rsi
mov    %rsi,%rbx
call   1030 <tempfile@plt>
mov    0xc(%rsp),%esi
mov    0x4(%rsp),%edx
mov    %rbp,%rdi
call   1080 <sendfd@plt>
mov    0x4(%rsp),%edi
call   1070 <close@plt>
mov    %r14,%rdi
call   1040 <closesocketpair@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
call   1060 <printf@plt>
lea    0xceb(%rip),%r13
mov    %r12,%rdi
mov    %r13,%rsi
call   1060 <printf@plt>
mov    %r13,%rdi
mov    %r14,%rsi
call   10c0 <domainsocketpair@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
call   1030 <tempfile@plt>
lea    0x14(%rsp),%rsi
mov    %r13,%rdi
call   1030 <tempfile@plt>
mov    0x4(%rsp),%esi
mov    %r13,%rdi
lea    0x18(%rsp),%rbx
mov    %rbx,%rdx
call   10a0 <dofstat@plt>
mov    0x14(%rsp),%esi
lea    0x30(%rsp),%rbp
mov    %r13,%rdi
mov    %rbp,%rdx
call   10a0 <dofstat@plt>
mov    0xc(%rsp),%esi
mov    0x4(%rsp),%edx
mov    %r13,%rdi
call   1080 <sendfd@plt>
mov    0xc(%rsp),%esi
mov    0x14(%rsp),%edx
mov    %r13,%rdi
call   1080 <sendfd@plt>
mov    0x4(%rsp),%edi
call   1070 <close@plt>
mov    0x14(%rsp),%edi
call   1070 <close@plt>
mov    0x10(%rsp),%esi
mov    %r13,%rdi
lea    0x8(%rsp),%rdx
call   1090 <recvfd@plt>
mov    0x10(%rsp),%esi
lea    0x1c(%rsp),%rdx
mov    %r13,%rdi
call   1090 <recvfd@plt>
mov    0x8(%rsp),%esi
mov    %r13,%rdi
mov    %r15,%rdx
call   10a0 <dofstat@plt>
mov    0x1c(%rsp),%esi
lea    0x20(%rsp),%r12
mov    %r13,%rdi
mov    %r12,%rdx
call   10a0 <dofstat@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1050 <samefile@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
call   1050 <samefile@plt>
mov    0x8(%rsp),%edi
call   1070 <close@plt>
mov    0x1c(%rsp),%edi
call   1070 <close@plt>
mov    %r14,%rdi
call   1040 <closesocketpair@plt>
lea    0xbaf(%rip),%r15
mov    %r15,%rdi
mov    %r13,%rsi
call   1060 <printf@plt>
lea    0xbdd(%rip),%rbp
lea    0xb88(%rip),%rbx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1060 <printf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   10c0 <domainsocketpair@plt>
mov    0xc(%rsp),%edx
mov    %rbp,%rdi
mov    %edx,%esi
call   1080 <sendfd@plt>
mov    0xc(%rsp),%edi
call   1070 <close@plt>
mov    0x10(%rsp),%esi
mov    %rbp,%rdi
lea    0x8(%rsp),%rdx
call   1090 <recvfd@plt>
mov    0x8(%rsp),%edi
call   1070 <close@plt>
mov    0x10(%rsp),%edi
call   1070 <close@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
call   1060 <printf@plt>
lea    0xb81(%rip),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1060 <printf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   10c0 <domainsocketpair@plt>
mov    0xc(%rsp),%edx
mov    %rbp,%rdi
mov    %edx,%esi
call   1080 <sendfd@plt>
mov    0xc(%rsp),%edx
mov    0x10(%rsp),%esi
mov    %rbp,%rdi
call   1080 <sendfd@plt>
mov    %r14,%rdi
call   1040 <closesocketpair@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
call   1060 <printf@plt>
lea    0xb46(%rip),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1060 <printf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   10c0 <domainsocketpair@plt>
mov    %rbp,%rdi
lea    0x4(%rsp),%rsi
call   10b0 <devnull@plt>
mov    0xc(%rsp),%esi
mov    0x4(%rsp),%edx
mov    %rbp,%rdi
call   1080 <sendfd@plt>
mov    0x4(%rsp),%edi
call   1070 <close@plt>
mov    %r14,%rdi
call   1040 <closesocketpair@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [19 x i8] c"test1-simplesendfd\00"
@.str.1 = [14 x i8] c"beginning %s\0A\00"
@.str.2 = [11 x i8] c"%s passed\0A\00"
@.str.3 = [19 x i8] c"test2-sendandclose\00"
@.str.4 = [20 x i8] c"test3-sendandcancel\00"
@.str.5 = [14 x i8] c"test4-twofile\00"
@.str.6 = [13 x i8] c"test5-bundle\00"
@.str.7 = [19 x i8] c"test6-bundlecancel\00"
@.str.8 = [18 x i8] c"test7-devfsorphan\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.stat
%7 = alloca %struct.stat
%8 = alloca %struct.stat
%9 = alloca %struct.stat
%10 = alloca [2 x i32]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8** %15
%16 = load i8*, i8** %15
%17 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %16)
%18 = load i8*, i8** %15
%19 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%20 = call i32 @domainsocketpair(i8* %18, i32* %19)
%21 = load i8*, i8** %15
%22 = call i32 @tempfile(i8* %21, i32* %11)
%23 = load i8*, i8** %15
%24 = load i32, i32* %11
%25 = call i32 @dofstat(i8* %23, i32 %24, %struct.stat* %6)
%26 = load i8*, i8** %15
%27 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%28 = load i32, i32* %27
%29 = load i32, i32* %11
%30 = call i32 @sendfd(i8* %26, i32 %28, i32 %29)
%31 = load i8*, i8** %15
%32 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 1
%33 = load i32, i32* %32
%34 = call i32 @recvfd(i8* %31, i32 %33, i32* %13)
%35 = load i8*, i8** %15
%36 = load i32, i32* %13
%37 = call i32 @dofstat(i8* %35, i32 %36, %struct.stat* %8)
%38 = load i8*, i8** %15
%39 = call i32 @samefile(i8* %38, %struct.stat* %6, %struct.stat* %8)
%40 = load i32, i32* %11
%41 = call i32 @close(i32 %40)
%42 = load i32, i32* %13
%43 = call i32 @close(i32 %42)
%44 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%45 = call i32 @closesocketpair(i32* %44)
%46 = load i8*, i8** %15
%47 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %46)
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8** %15
%48 = load i8*, i8** %15
%49 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %48)
%50 = load i8*, i8** %15
%51 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%52 = call i32 @domainsocketpair(i8* %50, i32* %51)
%53 = load i8*, i8** %15
%54 = call i32 @tempfile(i8* %53, i32* %11)
%55 = load i8*, i8** %15
%56 = load i32, i32* %11
%57 = call i32 @dofstat(i8* %55, i32 %56, %struct.stat* %6)
%58 = load i8*, i8** %15
%59 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%60 = load i32, i32* %59
%61 = load i32, i32* %11
%62 = call i32 @sendfd(i8* %58, i32 %60, i32 %61)
%63 = load i32, i32* %11
%64 = call i32 @close(i32 %63)
%65 = load i8*, i8** %15
%66 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 1
%67 = load i32, i32* %66
%68 = call i32 @recvfd(i8* %65, i32 %67, i32* %13)
%69 = load i8*, i8** %15
%70 = load i32, i32* %13
%71 = call i32 @dofstat(i8* %69, i32 %70, %struct.stat* %8)
%72 = load i8*, i8** %15
%73 = call i32 @samefile(i8* %72, %struct.stat* %6, %struct.stat* %8)
%74 = load i32, i32* %13
%75 = call i32 @close(i32 %74)
%76 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%77 = call i32 @closesocketpair(i32* %76)
%78 = load i8*, i8** %15
%79 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %78)
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8** %15
%80 = load i8*, i8** %15
%81 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %80)
%82 = load i8*, i8** %15
%83 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%84 = call i32 @domainsocketpair(i8* %82, i32* %83)
%85 = load i8*, i8** %15
%86 = call i32 @tempfile(i8* %85, i32* %11)
%87 = load i8*, i8** %15
%88 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%89 = load i32, i32* %88
%90 = load i32, i32* %11
%91 = call i32 @sendfd(i8* %87, i32 %89, i32 %90)
%92 = load i32, i32* %11
%93 = call i32 @close(i32 %92)
%94 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%95 = call i32 @closesocketpair(i32* %94)
%96 = load i8*, i8** %15
%97 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %96)
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i8** %15
%98 = load i8*, i8** %15
%99 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %98)
%100 = load i8*, i8** %15
%101 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%102 = call i32 @domainsocketpair(i8* %100, i32* %101)
%103 = load i8*, i8** %15
%104 = call i32 @tempfile(i8* %103, i32* %11)
%105 = load i8*, i8** %15
%106 = call i32 @tempfile(i8* %105, i32* %12)
%107 = load i8*, i8** %15
%108 = load i32, i32* %11
%109 = call i32 @dofstat(i8* %107, i32 %108, %struct.stat* %6)
%110 = load i8*, i8** %15
%111 = load i32, i32* %12
%112 = call i32 @dofstat(i8* %110, i32 %111, %struct.stat* %7)
%113 = load i8*, i8** %15
%114 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%115 = load i32, i32* %114
%116 = load i32, i32* %11
%117 = call i32 @sendfd(i8* %113, i32 %115, i32 %116)
%118 = load i8*, i8** %15
%119 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%120 = load i32, i32* %119
%121 = load i32, i32* %12
%122 = call i32 @sendfd(i8* %118, i32 %120, i32 %121)
%123 = load i32, i32* %11
%124 = call i32 @close(i32 %123)
%125 = load i32, i32* %12
%126 = call i32 @close(i32 %125)
%127 = load i8*, i8** %15
%128 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 1
%129 = load i32, i32* %128
%130 = call i32 @recvfd(i8* %127, i32 %129, i32* %13)
%131 = load i8*, i8** %15
%132 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 1
%133 = load i32, i32* %132
%134 = call i32 @recvfd(i8* %131, i32 %133, i32* %14)
%135 = load i8*, i8** %15
%136 = load i32, i32* %13
%137 = call i32 @dofstat(i8* %135, i32 %136, %struct.stat* %8)
%138 = load i8*, i8** %15
%139 = load i32, i32* %14
%140 = call i32 @dofstat(i8* %138, i32 %139, %struct.stat* %9)
%141 = load i8*, i8** %15
%142 = call i32 @samefile(i8* %141, %struct.stat* %6, %struct.stat* %8)
%143 = load i8*, i8** %15
%144 = call i32 @samefile(i8* %143, %struct.stat* %7, %struct.stat* %9)
%145 = load i32, i32* %13
%146 = call i32 @close(i32 %145)
%147 = load i32, i32* %14
%148 = call i32 @close(i32 %147)
%149 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%150 = call i32 @closesocketpair(i32* %149)
%151 = load i8*, i8** %15
%152 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %151)
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8** %15
%153 = load i8*, i8** %15
%154 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %153)
%155 = load i8*, i8** %15
%156 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%157 = call i32 @domainsocketpair(i8* %155, i32* %156)
%158 = load i8*, i8** %15
%159 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%160 = load i32, i32* %159
%161 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%162 = load i32, i32* %161
%163 = call i32 @sendfd(i8* %158, i32 %160, i32 %162)
%164 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%165 = load i32, i32* %164
%166 = call i32 @close(i32 %165)
%167 = load i8*, i8** %15
%168 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 1
%169 = load i32, i32* %168
%170 = call i32 @recvfd(i8* %167, i32 %169, i32* %13)
%171 = load i32, i32* %13
%172 = call i32 @close(i32 %171)
%173 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 1
%174 = load i32, i32* %173
%175 = call i32 @close(i32 %174)
%176 = load i8*, i8** %15
%177 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %176)
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i8** %15
%178 = load i8*, i8** %15
%179 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %178)
%180 = load i8*, i8** %15
%181 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%182 = call i32 @domainsocketpair(i8* %180, i32* %181)
%183 = load i8*, i8** %15
%184 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%185 = load i32, i32* %184
%186 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%187 = load i32, i32* %186
%188 = call i32 @sendfd(i8* %183, i32 %185, i32 %187)
%189 = load i8*, i8** %15
%190 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 1
%191 = load i32, i32* %190
%192 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%193 = load i32, i32* %192
%194 = call i32 @sendfd(i8* %189, i32 %191, i32 %193)
%195 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%196 = call i32 @closesocketpair(i32* %195)
%197 = load i8*, i8** %15
%198 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %197)
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i8** %15
%199 = load i8*, i8** %15
%200 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %199)
%201 = load i8*, i8** %15
%202 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%203 = call i32 @domainsocketpair(i8* %201, i32* %202)
%204 = load i8*, i8** %15
%205 = call i32 @devnull(i8* %204, i32* %11)
%206 = load i8*, i8** %15
%207 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%208 = load i32, i32* %207
%209 = load i32, i32* %11
%210 = call i32 @sendfd(i8* %206, i32 %208, i32 %209)
%211 = load i32, i32* %11
%212 = call i32 @close(i32 %211)
%213 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%214 = call i32 @closesocketpair(i32* %213)
%215 = load i8*, i8** %15
%216 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %215)
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [19 x i8] c"test1-simplesendfd\00"
@.str.1 = [14 x i8] c"beginning %s\0A\00"
@.str.2 = [11 x i8] c"%s passed\0A\00"
@.str.3 = [19 x i8] c"test2-sendandclose\00"
@.str.4 = [20 x i8] c"test3-sendandcancel\00"
@.str.5 = [14 x i8] c"test4-twofile\00"
@.str.6 = [13 x i8] c"test5-bundle\00"
@.str.7 = [19 x i8] c"test6-bundlecancel\00"
@.str.8 = [18 x i8] c"test7-devfsorphan\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.stat
%4 = alloca %struct.stat
%5 = alloca %struct.stat
%6 = alloca %struct.stat
%7 = alloca [2 x i32]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = bitcast %struct.stat* %3 to i8*
%13 = bitcast %struct.stat* %4 to i8*
%14 = bitcast %struct.stat* %5 to i8*
%15 = bitcast %struct.stat* %6 to i8*
%16 = bitcast [2 x i32]* %7 to i8*
%17 = bitcast i32* %8 to i8*
%18 = bitcast i32* %9 to i8*
%19 = bitcast i32* %10 to i8*
%20 = bitcast i32* %11 to i8*
%21 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%22 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%23 = call i32 @domainsocketpair(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32* %22)
%24 = call i32 @tempfile(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32* %8)
%25 = load i32, i32* %8
%26 = call i32 @dofstat(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %25, %struct.stat* %3)
%27 = load i32, i32* %22
%28 = load i32, i32* %8
%29 = call i32 @sendfd(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %27, i32 %28)
%30 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%31 = load i32, i32* %30
%32 = call i32 @recvfd(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %31, i32* %10)
%33 = load i32, i32* %10
%34 = call i32 @dofstat(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %33, %struct.stat* %5)
%35 = call i32 @samefile(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), %struct.stat* %3, %struct.stat* %5)
%36 = load i32, i32* %8
%37 = call i32 @close(i32 %36)
%38 = load i32, i32* %10
%39 = call i32 @close(i32 %38)
%40 = call i32 @closesocketpair(i32* %22)
%41 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%42 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%43 = call i32 @domainsocketpair(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32* %22)
%44 = call i32 @tempfile(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32* %8)
%45 = load i32, i32* %8
%46 = call i32 @dofstat(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %45, %struct.stat* %3)
%47 = load i32, i32* %22
%48 = load i32, i32* %8
%49 = call i32 @sendfd(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %47, i32 %48)
%50 = load i32, i32* %8
%51 = call i32 @close(i32 %50)
%52 = load i32, i32* %30
%53 = call i32 @recvfd(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %52, i32* %10)
%54 = load i32, i32* %10
%55 = call i32 @dofstat(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %54, %struct.stat* %5)
%56 = call i32 @samefile(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), %struct.stat* %3, %struct.stat* %5)
%57 = load i32, i32* %10
%58 = call i32 @close(i32 %57)
%59 = call i32 @closesocketpair(i32* %22)
%60 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%61 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%62 = call i32 @domainsocketpair(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32* %22)
%63 = call i32 @tempfile(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32* %8)
%64 = load i32, i32* %22
%65 = load i32, i32* %8
%66 = call i32 @sendfd(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 %64, i32 %65)
%67 = load i32, i32* %8
%68 = call i32 @close(i32 %67)
%69 = call i32 @closesocketpair(i32* %22)
%70 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%71 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%72 = call i32 @domainsocketpair(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32* %22)
%73 = call i32 @tempfile(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32* %8)
%74 = call i32 @tempfile(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32* %9)
%75 = load i32, i32* %8
%76 = call i32 @dofstat(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %75, %struct.stat* %3)
%77 = load i32, i32* %9
%78 = call i32 @dofstat(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %77, %struct.stat* %4)
%79 = load i32, i32* %22
%80 = load i32, i32* %8
%81 = call i32 @sendfd(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %79, i32 %80)
%82 = load i32, i32* %22
%83 = load i32, i32* %9
%84 = call i32 @sendfd(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %82, i32 %83)
%85 = load i32, i32* %8
%86 = call i32 @close(i32 %85)
%87 = load i32, i32* %9
%88 = call i32 @close(i32 %87)
%89 = load i32, i32* %30
%90 = call i32 @recvfd(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %89, i32* %10)
%91 = load i32, i32* %30
%92 = call i32 @recvfd(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %91, i32* %11)
%93 = load i32, i32* %10
%94 = call i32 @dofstat(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %93, %struct.stat* %5)
%95 = load i32, i32* %11
%96 = call i32 @dofstat(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %95, %struct.stat* %6)
%97 = call i32 @samefile(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), %struct.stat* %3, %struct.stat* %5)
%98 = call i32 @samefile(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), %struct.stat* %4, %struct.stat* %6)
%99 = load i32, i32* %10
%100 = call i32 @close(i32 %99)
%101 = load i32, i32* %11
%102 = call i32 @close(i32 %101)
%103 = call i32 @closesocketpair(i32* %22)
%104 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
%105 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
%106 = call i32 @domainsocketpair(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i32* %22)
%107 = load i32, i32* %22
%108 = call i32 @sendfd(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i32 %107, i32 %107)
%109 = load i32, i32* %22
%110 = call i32 @close(i32 %109)
%111 = load i32, i32* %30
%112 = call i32 @recvfd(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i32 %111, i32* %10)
%113 = load i32, i32* %10
%114 = call i32 @close(i32 %113)
%115 = load i32, i32* %30
%116 = call i32 @close(i32 %115)
%117 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
%118 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%119 = call i32 @domainsocketpair(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32* %22)
%120 = load i32, i32* %22
%121 = call i32 @sendfd(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 %120, i32 %120)
%122 = load i32, i32* %30
%123 = load i32, i32* %22
%124 = call i32 @sendfd(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 %122, i32 %123)
%125 = call i32 @closesocketpair(i32* %22)
%126 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%127 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
%128 = call i32 @domainsocketpair(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32* %22)
%129 = call i32 @devnull(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32* %8)
%130 = load i32, i32* %22
%131 = load i32, i32* %8
%132 = call i32 @sendfd(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %130, i32 %131)
%133 = load i32, i32* %8
%134 = call i32 @close(i32 %133)
%135 = call i32 @closesocketpair(i32* %22)
%136 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
ret i32 0
}