#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 winsize {
  int dummy;
};
struct termios {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
scalar_t__ STDERR_FILENO;
scalar_t__ STDIN_FILENO;
scalar_t__ STDOUT_FILENO;
int /*<<< orphan*/ TCSANOW;
int /*<<< orphan*/ TIOCSWINSZ;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ die(char *, ...);
scalar_t__ dup2(int, scalar_t__);
int /*<<< orphan*/ fork();
scalar_t__ ioctl(int, int /*<<< orphan*/, struct winsize *);
int pty_open(char *);
scalar_t__ setsid();
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ tcsetattr(int, int /*<<< orphan*/, struct termios *);
int tty_open(int, char *);
pid_t pty_fork(int *ptrfdm, char *slave_name, struct termios *slave_termios,
               struct winsize *slave_winsize) {
  int fdm, fds;
  pid_t pid;
  char pts_name[20];
  if ((fdm = pty_open(pts_name)) < 0)
    die("can't open pty %s\n", pts_name);
  if (slave_name)
    strcpy(slave_name, pts_name);
  if ((pid = fork()) < 0)
    die("fork error\n");
  if (!pid) {
    if (setsid() < 0)
      die("setsid error");
    if ((fds = tty_open(fdm, pts_name)) < 0)
      die("can't open slave pty %s\n", pts_name);
    close(fdm);
    if (slave_termios) {
      if (tcsetattr(fds, TCSANOW, slave_termios) < 0)
        die("tcsetattr error on slave pty");
    }
    if (slave_winsize) {
      if (ioctl(fds, TIOCSWINSZ, slave_winsize) < 0)
        die("TIOCSWINSZ error on slave pty");
    }
    if (dup2(fds, STDIN_FILENO) != STDIN_FILENO)
      die("dup2 error to stdin");
    if (dup2(fds, STDOUT_FILENO) != STDOUT_FILENO)
      die("dup2 error to stdout");
    if (dup2(fds, STDERR_FILENO) != STDERR_FILENO)
      die("dup2 error to stderr");
    if (fds > STDERR_FILENO)
      close(fds);
    return (0);
  }
  *ptrfdm = fdm;
  return (pid);
}


x86 assembly (clang, -O0):
<pty_fork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
lea    -0x50(%rbp),%rdi
call   1040 <pty_open@plt>
mov    %eax,-0x2c(%rbp)
cmp    $0x0,%eax
jge    11df <pty_fork+0x3f>
lea    -0x50(%rbp),%rsi
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   10a0 <die@plt>
cmpq   $0x0,-0x18(%rbp)
je     11f7 <pty_fork+0x57>
mov    -0x18(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1030 <strcpy@plt>
mov    $0x0,%al
call   10c0 <fork@plt>
mov    %eax,-0x34(%rbp)
cmp    $0x0,%eax
jge    1218 <pty_fork+0x78>
lea    0xe02(%rip),%rdi
mov    $0x0,%al
call   10a0 <die@plt>
cmpl   $0x0,-0x34(%rbp)
jne    13a5 <pty_fork+0x205>
mov    $0x0,%al
call   1080 <setsid@plt>
cmp    $0x0,%rax
jge    1241 <pty_fork+0xa1>
lea    0xde5(%rip),%rdi
mov    $0x0,%al
call   10a0 <die@plt>
mov    -0x2c(%rbp),%edi
lea    -0x50(%rbp),%rsi
call   10b0 <tty_open@plt>
mov    %eax,-0x30(%rbp)
cmp    $0x0,%eax
jge    126b <pty_fork+0xcb>
lea    -0x50(%rbp),%rsi
lea    0xdc8(%rip),%rdi
mov    $0x0,%al
call   10a0 <die@plt>
mov    -0x2c(%rbp),%edi
call   1070 <close@plt>
cmpq   $0x0,-0x20(%rbp)
je     12b0 <pty_fork+0x110>
mov    -0x30(%rbp),%edi
mov    0x2d58(%rip),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rdx
call   1090 <tcsetattr@plt>
cmp    $0x0,%rax
jge    12ab <pty_fork+0x10b>
lea    0xda1(%rip),%rdi
mov    $0x0,%al
call   10a0 <die@plt>
jmp    12b0 <pty_fork+0x110>
cmpq   $0x0,-0x28(%rbp)
je     12ed <pty_fork+0x14d>
mov    -0x30(%rbp),%edi
mov    0x2d13(%rip),%rax
mov    (%rax),%esi
mov    -0x28(%rbp),%rdx
call   1060 <ioctl@plt>
cmp    $0x0,%rax
jge    12e8 <pty_fork+0x148>
lea    0xd81(%rip),%rdi
mov    $0x0,%al
call   10a0 <die@plt>
jmp    12ed <pty_fork+0x14d>
mov    -0x30(%rbp),%edi
mov    0x2cc9(%rip),%rax
mov    (%rax),%rsi
call   1050 <dup2@plt>
mov    0x2cba(%rip),%rcx
cmp    (%rcx),%rax
je     131d <pty_fork+0x17d>
lea    0xd6a(%rip),%rdi
mov    $0x0,%al
call   10a0 <die@plt>
mov    -0x30(%rbp),%edi
mov    0x2cc9(%rip),%rax
mov    (%rax),%rsi
call   1050 <dup2@plt>
mov    0x2cba(%rip),%rcx
cmp    (%rcx),%rax
je     134d <pty_fork+0x1ad>
lea    0xd4e(%rip),%rdi
mov    $0x0,%al
call   10a0 <die@plt>
mov    -0x30(%rbp),%edi
mov    0x2c71(%rip),%rax
mov    (%rax),%rsi
call   1050 <dup2@plt>
mov    0x2c62(%rip),%rcx
cmp    (%rcx),%rax
je     137d <pty_fork+0x1dd>
lea    0xd33(%rip),%rdi
mov    $0x0,%al
call   10a0 <die@plt>
movslq -0x30(%rbp),%rax
mov    0x2c40(%rip),%rcx
cmp    (%rcx),%rax
jle    1399 <pty_fork+0x1f9>
mov    -0x30(%rbp),%edi
call   1070 <close@plt>
movl   $0x0,-0x4(%rbp)
jmp    13b4 <pty_fork+0x214>
mov    -0x2c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x34(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pty_fork>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%r12
mov    %rsp,%rdi
call   1040 <pty_open@plt>
mov    %eax,%ebp
test   %eax,%eax
jns    11d9 <pty_fork+0x39>
lea    0xe31(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   10a0 <die@plt>
test   %rbx,%rbx
je     11e9 <pty_fork+0x49>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
xor    %eax,%eax
call   10c0 <fork@plt>
mov    %eax,%r13d
test   %eax,%eax
js     1320 <pty_fork+0x180>
jne    132e <pty_fork+0x18e>
xor    %eax,%eax
call   1080 <setsid@plt>
test   %rax,%rax
jns    121b <pty_fork+0x7b>
lea    0xe0b(%rip),%rdi
xor    %eax,%eax
call   10a0 <die@plt>
mov    %rsp,%rsi
mov    %ebp,%edi
call   10b0 <tty_open@plt>
mov    %eax,%r12d
test   %eax,%eax
jns    123d <pty_fork+0x9d>
lea    0xdf9(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   10a0 <die@plt>
mov    %ebp,%edi
call   1070 <close@plt>
test   %r15,%r15
je     1270 <pty_fork+0xd0>
mov    0x2d90(%rip),%rax
mov    (%rax),%esi
mov    %r12d,%edi
mov    %r15,%rdx
call   1090 <tcsetattr@plt>
test   %rax,%rax
jns    1270 <pty_fork+0xd0>
lea    0xddc(%rip),%rdi
xor    %eax,%eax
call   10a0 <die@plt>
test   %r14,%r14
je     129c <pty_fork+0xfc>
mov    0x2d5c(%rip),%rax
mov    (%rax),%esi
mov    %r12d,%edi
mov    %r14,%rdx
call   1060 <ioctl@plt>
test   %rax,%rax
jns    129c <pty_fork+0xfc>
lea    0xdcd(%rip),%rdi
xor    %eax,%eax
call   10a0 <die@plt>
mov    0x2d1d(%rip),%rbx
mov    (%rbx),%rsi
mov    %r12d,%edi
call   1050 <dup2@plt>
cmp    (%rbx),%rax
je     12c1 <pty_fork+0x121>
lea    0xdc6(%rip),%rdi
xor    %eax,%eax
call   10a0 <die@plt>
mov    0x2d28(%rip),%rbx
mov    (%rbx),%rsi
mov    %r12d,%edi
call   1050 <dup2@plt>
cmp    (%rbx),%rax
je     12e6 <pty_fork+0x146>
lea    0xdb5(%rip),%rdi
xor    %eax,%eax
call   10a0 <die@plt>
mov    0x2cdb(%rip),%rbx
mov    (%rbx),%rsi
mov    %r12d,%edi
call   1050 <dup2@plt>
cmp    (%rbx),%rax
je     130e <pty_fork+0x16e>
lea    0xda5(%rip),%rdi
xor    %eax,%eax
call   10a0 <die@plt>
mov    (%rbx),%rax
movslq %r12d,%rcx
cmp    %rcx,%rax
jge    1332 <pty_fork+0x192>
mov    %r12d,%edi
call   1070 <close@plt>
jmp    1332 <pty_fork+0x192>
lea    0xcec(%rip),%rdi
xor    %eax,%eax
call   10a0 <die@plt>
mov    %ebp,(%r12)
mov    %r13d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
%struct.winsize = type { i32 }
@.str = [19 x i8] c"can't open pty %s\0A\00"
@.str.1 = [12 x i8] c"fork error\0A\00"
@.str.2 = [13 x i8] c"setsid error\00"
@.str.3 = [25 x i8] c"can't open slave pty %s\0A\00"
@TCSANOW = global i32 0
@.str.4 = [29 x i8] c"tcsetattr error on slave pty\00"
@TIOCSWINSZ = global i32 0
@.str.5 = [30 x i8] c"TIOCSWINSZ error on slave pty\00"
@STDIN_FILENO = global i64 0
@.str.6 = [20 x i8] c"dup2 error to stdin\00"
@STDOUT_FILENO = global i64 0
@.str.7 = [21 x i8] c"dup2 error to stdout\00"
@STDERR_FILENO = global i64 0
@.str.8 = [21 x i8] c"dup2 error to stderr\00"
define i32 @pty_fork(i32* %0, i8* %1, %struct.termios* %2, %struct.winsize* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca %struct.termios*
%9 = alloca %struct.winsize*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca [20 x i8]
store i32* %0, i32** %6
store i8* %1, i8** %7
store %struct.termios* %2, %struct.termios** %8
store %struct.winsize* %3, %struct.winsize** %9
%14 = getelementptr inbounds [20 x i8], [20 x i8]* %13, i64 0, i64 0
%15 = call i32 @pty_open(i8* %14)
store i32 %15, i32* %10
%16 = icmp slt i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %4
%18 = getelementptr inbounds [20 x i8], [20 x i8]* %13, i64 0, i64 0
%19 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %18)
br label %20
20: ; preds = %17, %4
%21 = load i8*, i8** %7
%22 = icmp ne i8* %21, null
br i1 %22, label %23, label %27
23: ; preds = %20
%24 = load i8*, i8** %7
%25 = getelementptr inbounds [20 x i8], [20 x i8]* %13, i64 0, i64 0
%26 = call i32 @strcpy(i8* %24, i8* %25)
br label %27
27: ; preds = %23, %20
%28 = call i32 (...) @fork()
store i32 %28, i32* %12
%29 = icmp slt i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %32
32: ; preds = %30, %27
%33 = load i32, i32* %12
%34 = icmp ne i32 %33, 0
br i1 %34, label %107, label %35
35: ; preds = %32
%36 = call i64 (...) @setsid()
%37 = icmp slt i64 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
br label %40
40: ; preds = %38, %35
%41 = load i32, i32* %10
%42 = getelementptr inbounds [20 x i8], [20 x i8]* %13, i64 0, i64 0
%43 = call i32 @tty_open(i32 %41, i8* %42)
store i32 %43, i32* %11
%44 = icmp slt i32 %43, 0
br i1 %44, label %45, label %48
45: ; preds = %40
%46 = getelementptr inbounds [20 x i8], [20 x i8]* %13, i64 0, i64 0
%47 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* %46)
br label %48
48: ; preds = %45, %40
%49 = load i32, i32* %10
%50 = call i32 @close(i32 %49)
%51 = load %struct.termios*, %struct.termios** %8
%52 = icmp ne %struct.termios* %51, null
br i1 %52, label %53, label %62
53: ; preds = %48
%54 = load i32, i32* %11
%55 = load i32, i32* @TCSANOW
%56 = load %struct.termios*, %struct.termios** %8
%57 = call i64 @tcsetattr(i32 %54, i32 %55, %struct.termios* %56)
%58 = icmp slt i64 %57, 0
br i1 %58, label %59, label %61
59: ; preds = %53
%60 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
br label %61
61: ; preds = %59, %53
br label %62
62: ; preds = %61, %48
%63 = load %struct.winsize*, %struct.winsize** %9
%64 = icmp ne %struct.winsize* %63, null
br i1 %64, label %65, label %74
65: ; preds = %62
%66 = load i32, i32* %11
%67 = load i32, i32* @TIOCSWINSZ
%68 = load %struct.winsize*, %struct.winsize** %9
%69 = call i64 @ioctl(i32 %66, i32 %67, %struct.winsize* %68)
%70 = icmp slt i64 %69, 0
br i1 %70, label %71, label %73
71: ; preds = %65
%72 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0))
br label %73
73: ; preds = %71, %65
br label %74
74: ; preds = %73, %62
%75 = load i32, i32* %11
%76 = load i64, i64* @STDIN_FILENO
%77 = call i64 @dup2(i32 %75, i64 %76)
%78 = load i64, i64* @STDIN_FILENO
%79 = icmp ne i64 %77, %78
br i1 %79, label %80, label %82
80: ; preds = %74
%81 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
br label %82
82: ; preds = %80, %74
%83 = load i32, i32* %11
%84 = load i64, i64* @STDOUT_FILENO
%85 = call i64 @dup2(i32 %83, i64 %84)
%86 = load i64, i64* @STDOUT_FILENO
%87 = icmp ne i64 %85, %86
br i1 %87, label %88, label %90
88: ; preds = %82
%89 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
br label %90
90: ; preds = %88, %82
%91 = load i32, i32* %11
%92 = load i64, i64* @STDERR_FILENO
%93 = call i64 @dup2(i32 %91, i64 %92)
%94 = load i64, i64* @STDERR_FILENO
%95 = icmp ne i64 %93, %94
br i1 %95, label %96, label %98
96: ; preds = %90
%97 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
br label %98
98: ; preds = %96, %90
%99 = load i32, i32* %11
%100 = sext i32 %99 to i64
%101 = load i64, i64* @STDERR_FILENO
%102 = icmp sgt i64 %100, %101
br i1 %102, label %103, label %106
103: ; preds = %98
%104 = load i32, i32* %11
%105 = call i32 @close(i32 %104)
br label %106
106: ; preds = %103, %98
store i32 0, i32* %5
br label %111
107: ; preds = %32
%108 = load i32, i32* %10
%109 = load i32*, i32** %6
store i32 %108, i32* %109
%110 = load i32, i32* %12
store i32 %110, i32* %5
br label %111
111: ; preds = %107, %106
%112 = load i32, i32* %5
ret i32 %112
}

LLVM IR (-O2):
%struct.termios = type { i32 }
%struct.winsize = type { i32 }
@.str = [19 x i8] c"can't open pty %s\0A\00"
@.str.1 = [12 x i8] c"fork error\0A\00"
@.str.2 = [13 x i8] c"setsid error\00"
@.str.3 = [25 x i8] c"can't open slave pty %s\0A\00"
@TCSANOW = global i32 0
@.str.4 = [29 x i8] c"tcsetattr error on slave pty\00"
@TIOCSWINSZ = global i32 0
@.str.5 = [30 x i8] c"TIOCSWINSZ error on slave pty\00"
@STDIN_FILENO = global i64 0
@.str.6 = [20 x i8] c"dup2 error to stdin\00"
@STDOUT_FILENO = global i64 0
@.str.7 = [21 x i8] c"dup2 error to stdout\00"
@STDERR_FILENO = global i64 0
@.str.8 = [21 x i8] c"dup2 error to stderr\00"
define i32 @pty_fork(i32* nocapture writeonly %0, i8* %1, %struct.termios* %2, %struct.winsize* %3) {
%5 = alloca [20 x i8]
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%7 = call i32 @pty_open(i8* %6)
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %11
11: ; preds = %9, %4
%12 = icmp eq i8* %1, null
br i1 %12, label %15, label %13
13: ; preds = %11
%14 = call i32 @strcpy(i8* %1, i8* %6)
br label %15
15: ; preds = %13, %11
%16 = call i32 (...) @fork()
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %77
20: ; preds = %15
%21 = icmp eq i32 %16, 0
br i1 %21, label %22, label %77
22: ; preds = %20
%23 = call i64 (...) @setsid()
%24 = icmp slt i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
br label %27
27: ; preds = %25, %22
%28 = call i32 @tty_open(i32 %7, i8* %6)
%29 = icmp slt i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* %6)
br label %32
32: ; preds = %30, %27
%33 = call i32 @close(i32 %7)
%34 = icmp eq %struct.termios* %2, null
br i1 %34, label %41, label %35
35: ; preds = %32
%36 = load i32, i32* @TCSANOW
%37 = call i64 @tcsetattr(i32 %28, i32 %36, %struct.termios* %2)
%38 = icmp slt i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %35
%40 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
br label %41
41: ; preds = %35, %39, %32
%42 = icmp eq %struct.winsize* %3, null
br i1 %42, label %49, label %43
43: ; preds = %41
%44 = load i32, i32* @TIOCSWINSZ
%45 = call i64 @ioctl(i32 %28, i32 %44, %struct.winsize* %3)
%46 = icmp slt i64 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %43
%48 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0))
br label %49
49: ; preds = %43, %47, %41
%50 = load i64, i64* @STDIN_FILENO
%51 = call i64 @dup2(i32 %28, i64 %50)
%52 = load i64, i64* @STDIN_FILENO
%53 = icmp eq i64 %51, %52
br i1 %53, label %56, label %54
54: ; preds = %49
%55 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
br label %56
56: ; preds = %54, %49
%57 = load i64, i64* @STDOUT_FILENO
%58 = call i64 @dup2(i32 %28, i64 %57)
%59 = load i64, i64* @STDOUT_FILENO
%60 = icmp eq i64 %58, %59
br i1 %60, label %63, label %61
61: ; preds = %56
%62 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
br label %63
63: ; preds = %61, %56
%64 = load i64, i64* @STDERR_FILENO
%65 = call i64 @dup2(i32 %28, i64 %64)
%66 = load i64, i64* @STDERR_FILENO
%67 = icmp eq i64 %65, %66
br i1 %67, label %71, label %68
68: ; preds = %63
%69 = call i32 (i8*, ...) @die(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
%70 = load i64, i64* @STDERR_FILENO
br label %71
71: ; preds = %68, %63
%72 = phi i64 [ %70, %68 ], [ %65, %63 ]
%73 = sext i32 %28 to i64
%74 = icmp slt i64 %72, %73
br i1 %74, label %75, label %78
75: ; preds = %71
%76 = call i32 @close(i32 %28)
br label %78
77: ; preds = %18, %20
store i32 %7, i32* %0
br label %78
78: ; preds = %71, %75, %77
ret i32 %16
}