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

/* Variables and functions */
int /*<<< orphan*/ TCSANOW;
int /*<<< orphan*/ TIOCSCTTY;
int WEXITSTATUS(int);
scalar_t__ WIFEXITED(int);
int WTERMSIG(int);
int /*<<< orphan*/ cfmakeraw(struct termios *);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ dup2(int, int);
scalar_t__ errno;
int /*<<< orphan*/ execvp(char const *, char *const *);
int fork();
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, int *);
scalar_t__ openpty(int *, int *, int /*<<< orphan*/, int /*<<< orphan*/,
                   int /*<<< orphan*/);
int read(int, char *, int);
int /*<<< orphan*/ setsid();
int /*<<< orphan*/ syserr(char *, ...);
int /*<<< orphan*/ tcgetattr(int, struct termios *);
int /*<<< orphan*/ tcsetattr(int, int /*<<< orphan*/, struct termios *);
int waitpid(int, int *, int /*<<< orphan*/);
int write(int, char *, int);
int main(int argc, const char **argv) {
  if (argc < 2)
    errno = 0, syserr("missing command");
  int master, slave;
  if (openpty(&master, &slave, 0, 0, 0))
    syserr("can't allocate a pseudo-terminal");
  if (master > 31)
    errno = 0, syserr("bad fd from openpty(): %d", master);
  struct termios ti;
  if (!tcgetattr(slave, &ti)) {
    cfmakeraw(&ti);
    tcsetattr(slave, TCSANOW, &ti);
  }
  int pid = fork();
  if (pid == -1)
    syserr("fork failed");
  if (!pid) {
    close(master);
    setsid();
    dup2(slave, 1);
    dup2(slave, 2);
    close(slave);
    int zero = 0;
    ioctl(1, TIOCSCTTY, &zero);
    execvp(argv[1], (char *const *)argv + 1);
    syserr("%s", argv[1]);
    return 127;
  }
  close(slave);
  char buf[16384];
  int r;
  while ((r = read(master, buf, sizeof(buf))) > 0) {
    if (write(1, buf, r) != r)
      syserr("error writing to stdout");
  }
  int ret;
  if (waitpid(pid, &ret, 0) == -1)
    syserr("waitpid failed");
  return WIFEXITED(ret) ? WEXITSTATUS(ret) : WTERMSIG(ret) + 128;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4040,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    124f <main+0x3f>
mov    0x2d9e(%rip),%rax
movq   $0x0,(%rax)
lea    0xdb8(%rip),%rdi
mov    $0x0,%al
call   1050 <syserr@plt>
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
call   10b0 <openpty@plt>
cmp    $0x0,%rax
je     127d <main+0x6d>
lea    0xd9a(%rip),%rdi
mov    $0x0,%al
call   1050 <syserr@plt>
cmpl   $0x1f,-0x14(%rbp)
jle    12a6 <main+0x96>
mov    0x2d4a(%rip),%rax
movq   $0x0,(%rax)
mov    -0x14(%rbp),%esi
lea    0xd92(%rip),%rdi
mov    $0x0,%al
call   1050 <syserr@plt>
mov    -0x18(%rbp),%edi
lea    -0x20(%rbp),%rsi
call   10f0 <tcgetattr@plt>
cmp    $0x0,%eax
jne    12d9 <main+0xc9>
lea    -0x20(%rbp),%rdi
call   10c0 <cfmakeraw@plt>
mov    -0x18(%rbp),%edi
mov    0x2d1a(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1100 <tcsetattr@plt>
mov    $0x0,%al
call   1130 <fork@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0xffffffff,-0x24(%rbp)
jne    12fb <main+0xeb>
lea    0xd57(%rip),%rdi
mov    $0x0,%al
call   1050 <syserr@plt>
cmpl   $0x0,-0x24(%rbp)
jne    138b <main+0x17b>
mov    -0x14(%rbp),%edi
call   1070 <close@plt>
mov    $0x0,%al
call   1080 <setsid@plt>
mov    -0x18(%rbp),%edi
mov    $0x1,%esi
call   1040 <dup2@plt>
mov    -0x18(%rbp),%edi
mov    $0x2,%esi
call   1040 <dup2@plt>
mov    -0x18(%rbp),%edi
call   1070 <close@plt>
movl   $0x0,-0x28(%rbp)
mov    0x2c8c(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edi
lea    -0x28(%rbp),%rdx
call   1060 <ioctl@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1110 <execvp@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xcdf(%rip),%rdi
mov    $0x0,%al
call   1050 <syserr@plt>
movl   $0x7f,-0x4(%rbp)
jmp    145e <main+0x24e>
mov    -0x18(%rbp),%edi
call   1070 <close@plt>
mov    -0x14(%rbp),%edi
lea    -0x4030(%rbp),%rsi
mov    $0x4000,%edx
call   1090 <read@plt>
mov    %eax,-0x4034(%rbp)
cmp    $0x0,%eax
jle    13ec <main+0x1dc>
lea    -0x4030(%rbp),%rsi
mov    -0x4034(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
cmp    -0x4034(%rbp),%eax
je     13e7 <main+0x1d7>
lea    0xc7a(%rip),%rdi
mov    $0x0,%al
call   1050 <syserr@plt>
jmp    1393 <main+0x183>
mov    -0x24(%rbp),%edi
lea    -0x4038(%rbp),%rsi
xor    %edx,%edx
call   10e0 <waitpid@plt>
cmp    $0xffffffff,%eax
jne    1414 <main+0x204>
lea    0xc65(%rip),%rdi
mov    $0x0,%al
call   1050 <syserr@plt>
mov    -0x4038(%rbp),%edi
call   1120 <WIFEXITED@plt>
cmp    $0x0,%rax
je     143f <main+0x22f>
mov    -0x4038(%rbp),%edi
call   10d0 <WEXITSTATUS@plt>
mov    %eax,-0x403c(%rbp)
jmp    1455 <main+0x245>
mov    -0x4038(%rbp),%edi
call   10a0 <WTERMSIG@plt>
add    $0x80,%eax
mov    %eax,-0x403c(%rbp)
mov    -0x403c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4040,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x4028,%rsp
mov    %rsi,%rbx
cmp    $0x1,%edi
jg     1241 <main+0x31>
mov    0x2dac(%rip),%rax
movq   $0x0,(%rax)
lea    0xdc6(%rip),%rdi
xor    %eax,%eax
call   1050 <syserr@plt>
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   10b0 <openpty@plt>
test   %rax,%rax
je     126a <main+0x5a>
lea    0xdad(%rip),%rdi
xor    %eax,%eax
call   1050 <syserr@plt>
mov    0x10(%rsp),%esi
cmp    $0x20,%esi
jl     128f <main+0x7f>
mov    0x2d5e(%rip),%rax
movq   $0x0,(%rax)
lea    0xda9(%rip),%rdi
xor    %eax,%eax
call   1050 <syserr@plt>
mov    0xc(%rsp),%edi
lea    0x18(%rsp),%rsi
call   10f0 <tcgetattr@plt>
test   %eax,%eax
jne    12c3 <main+0xb3>
lea    0x18(%rsp),%rbp
mov    %rbp,%rdi
call   10c0 <cfmakeraw@plt>
mov    0xc(%rsp),%edi
mov    0x2d2f(%rip),%rax
mov    (%rax),%esi
mov    %rbp,%rdx
call   1100 <tcsetattr@plt>
xor    %eax,%eax
call   1130 <fork@plt>
test   %eax,%eax
je     1398 <main+0x188>
mov    %eax,%r14d
cmp    $0xffffffff,%eax
jne    12e8 <main+0xd8>
lea    0xd6a(%rip),%rdi
xor    %eax,%eax
call   1050 <syserr@plt>
mov    0xc(%rsp),%edi
call   1070 <close@plt>
mov    0x10(%rsp),%edi
lea    0x20(%rsp),%rsi
mov    $0x4000,%edx
call   1090 <read@plt>
test   %eax,%eax
jle    1356 <main+0x146>
mov    %eax,%ebp
lea    0x20(%rsp),%rbx
lea    0xd44(%rip),%r15
jmp    1337 <main+0x127>
nopl   0x0(%rax,%rax,1)
mov    0x10(%rsp),%edi
mov    %rbx,%rsi
mov    $0x4000,%edx
call   1090 <read@plt>
mov    %eax,%ebp
test   %eax,%eax
jle    1356 <main+0x146>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1030 <write@plt>
cmp    %ebp,%eax
je     1320 <main+0x110>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <syserr@plt>
jmp    1320 <main+0x110>
lea    0x14(%rsp),%rsi
mov    %r14d,%edi
xor    %edx,%edx
call   10e0 <waitpid@plt>
cmp    $0xffffffff,%eax
jne    1378 <main+0x168>
lea    0xd01(%rip),%rdi
xor    %eax,%eax
call   1050 <syserr@plt>
mov    0x14(%rsp),%edi
call   1120 <WIFEXITED@plt>
mov    0x14(%rsp),%edi
test   %rax,%rax
je     1413 <main+0x203>
call   10d0 <WEXITSTATUS@plt>
jmp    141b <main+0x20b>
mov    0x10(%rsp),%edi
call   1070 <close@plt>
xor    %eax,%eax
call   1080 <setsid@plt>
mov    0xc(%rsp),%edi
mov    $0x1,%esi
call   1040 <dup2@plt>
mov    0xc(%rsp),%edi
mov    $0x2,%esi
call   1040 <dup2@plt>
mov    0xc(%rsp),%edi
call   1070 <close@plt>
movl   $0x0,0x20(%rsp)
mov    0x2bf4(%rip),%rax
mov    (%rax),%esi
lea    0x20(%rsp),%rdx
mov    $0x1,%edi
call   1060 <ioctl@plt>
lea    0x8(%rbx),%rsi
mov    0x8(%rbx),%rdi
call   1110 <execvp@plt>
mov    0x8(%rbx),%rsi
lea    0xc52(%rip),%rdi
xor    %eax,%eax
call   1050 <syserr@plt>
mov    $0x7f,%eax
jmp    141b <main+0x20b>
call   10a0 <WTERMSIG@plt>
sub    $0xffffff80,%eax
add    $0x4028,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
@errno = global i64 0
@.str = [16 x i8] c"missing command\00"
@.str.1 = [33 x i8] c"can't allocate a pseudo-terminal\00"
@.str.2 = [26 x i8] c"bad fd from openpty(): %d\00"
@TCSANOW = global i32 0
@.str.3 = [12 x i8] c"fork failed\00"
@TIOCSCTTY = global i32 0
@.str.4 = [3 x i8] c"%s\00"
@.str.5 = [24 x i8] c"error writing to stdout\00"
@.str.6 = [15 x i8] c"waitpid failed\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.termios
%9 = alloca i32
%10 = alloca i32
%11 = alloca [16384 x i8]
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 2
br i1 %15, label %16, label %18
16: ; preds = %2
store i64 0, i64* @errno
%17 = call i32 (i8*, ...) @syserr(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %2
%19 = call i64 @openpty(i32* %6, i32* %7, i32 0, i32 0, i32 0)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 (i8*, ...) @syserr(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
%25 = icmp sgt i32 %24, 31
br i1 %25, label %26, label %29
26: ; preds = %23
store i64 0, i64* @errno
%27 = load i32, i32* %6
%28 = call i32 (i8*, ...) @syserr(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %27)
br label %29
29: ; preds = %26, %23
%30 = load i32, i32* %7
%31 = call i32 @tcgetattr(i32 %30, %struct.termios* %8)
%32 = icmp ne i32 %31, 0
br i1 %32, label %38, label %33
33: ; preds = %29
%34 = call i32 @cfmakeraw(%struct.termios* %8)
%35 = load i32, i32* %7
%36 = load i32, i32* @TCSANOW
%37 = call i32 @tcsetattr(i32 %35, i32 %36, %struct.termios* %8)
br label %38
38: ; preds = %33, %29
%39 = call i32 (...) @fork()
store i32 %39, i32* %9
%40 = load i32, i32* %9
%41 = icmp eq i32 %40, -1
br i1 %41, label %42, label %44
42: ; preds = %38
%43 = call i32 (i8*, ...) @syserr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
br label %44
44: ; preds = %42, %38
%45 = load i32, i32* %9
%46 = icmp ne i32 %45, 0
br i1 %46, label %69, label %47
47: ; preds = %44
%48 = load i32, i32* %6
%49 = call i32 @close(i32 %48)
%50 = call i32 (...) @setsid()
%51 = load i32, i32* %7
%52 = call i32 @dup2(i32 %51, i32 1)
%53 = load i32, i32* %7
%54 = call i32 @dup2(i32 %53, i32 2)
%55 = load i32, i32* %7
%56 = call i32 @close(i32 %55)
store i32 0, i32* %10
%57 = load i32, i32* @TIOCSCTTY
%58 = call i32 @ioctl(i32 1, i32 %57, i32* %10)
%59 = load i8**, i8*** %5
%60 = getelementptr inbounds i8*, i8** %59, i64 1
%61 = load i8*, i8** %60
%62 = load i8**, i8*** %5
%63 = getelementptr inbounds i8*, i8** %62, i64 1
%64 = call i32 @execvp(i8* %61, i8** %63)
%65 = load i8**, i8*** %5
%66 = getelementptr inbounds i8*, i8** %65, i64 1
%67 = load i8*, i8** %66
%68 = call i32 (i8*, ...) @syserr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %67)
store i32 127, i32* %3
br label %105
69: ; preds = %44
%70 = load i32, i32* %7
%71 = call i32 @close(i32 %70)
br label %72
72: ; preds = %85, %69
%73 = load i32, i32* %6
%74 = getelementptr inbounds [16384 x i8], [16384 x i8]* %11, i64 0, i64 0
%75 = call i32 @read(i32 %73, i8* %74, i32 16384)
store i32 %75, i32* %12
%76 = icmp sgt i32 %75, 0
br i1 %76, label %77, label %86
77: ; preds = %72
%78 = getelementptr inbounds [16384 x i8], [16384 x i8]* %11, i64 0, i64 0
%79 = load i32, i32* %12
%80 = call i32 @write(i32 1, i8* %78, i32 %79)
%81 = load i32, i32* %12
%82 = icmp ne i32 %80, %81
br i1 %82, label %83, label %85
83: ; preds = %77
%84 = call i32 (i8*, ...) @syserr(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
br label %85
85: ; preds = %83, %77
br label %72
86: ; preds = %72
%87 = load i32, i32* %9
%88 = call i32 @waitpid(i32 %87, i32* %13, i32 0)
%89 = icmp eq i32 %88, -1
br i1 %89, label %90, label %92
90: ; preds = %86
%91 = call i32 (i8*, ...) @syserr(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
br label %92
92: ; preds = %90, %86
%93 = load i32, i32* %13
%94 = call i64 @WIFEXITED(i32 %93)
%95 = icmp ne i64 %94, 0
br i1 %95, label %96, label %99
96: ; preds = %92
%97 = load i32, i32* %13
%98 = call i32 @WEXITSTATUS(i32 %97)
br label %103
99: ; preds = %92
%100 = load i32, i32* %13
%101 = call i32 @WTERMSIG(i32 %100)
%102 = add nsw i32 %101, 128
br label %103
103: ; preds = %99, %96
%104 = phi i32 [ %98, %96 ], [ %102, %99 ]
store i32 %104, i32* %3
br label %105
105: ; preds = %103, %47
%106 = load i32, i32* %3
ret i32 %106
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@errno = global i64 0
@.str = [16 x i8] c"missing command\00"
@.str.1 = [33 x i8] c"can't allocate a pseudo-terminal\00"
@.str.2 = [26 x i8] c"bad fd from openpty(): %d\00"
@TCSANOW = global i32 0
@.str.3 = [12 x i8] c"fork failed\00"
@TIOCSCTTY = global i32 0
@.str.4 = [3 x i8] c"%s\00"
@.str.5 = [24 x i8] c"error writing to stdout\00"
@.str.6 = [15 x i8] c"waitpid failed\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.termios
%6 = alloca i32
%7 = alloca [16384 x i8]
%8 = alloca i32
%9 = icmp slt i32 %0, 2
br i1 %9, label %10, label %12
10: ; preds = %2
store i64 0, i64* @errno
%11 = tail call i32 (i8*, ...) @syserr(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
%13 = bitcast i32* %3 to i8*
%14 = bitcast i32* %4 to i8*
%15 = call i64 @openpty(i32* %3, i32* %4, i32 0, i32 0, i32 0)
%16 = icmp eq i64 %15, 0
br i1 %16, label %19, label %17
17: ; preds = %12
%18 = call i32 (i8*, ...) @syserr(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %17, %12
%20 = load i32, i32* %3
%21 = icmp sgt i32 %20, 31
br i1 %21, label %22, label %24
22: ; preds = %19
store i64 0, i64* @errno
%23 = call i32 (i8*, ...) @syserr(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %20)
br label %24
24: ; preds = %22, %19
%25 = bitcast %struct.termios* %5 to i8*
%26 = load i32, i32* %4
%27 = call i32 @tcgetattr(i32 %26, %struct.termios* %5)
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %34
29: ; preds = %24
%30 = call i32 @cfmakeraw(%struct.termios* %5)
%31 = load i32, i32* %4
%32 = load i32, i32* @TCSANOW
%33 = call i32 @tcsetattr(i32 %31, i32 %32, %struct.termios* %5)
br label %34
34: ; preds = %29, %24
%35 = call i32 (...) @fork()
switch i32 %35, label %56 [
i32 -1, label %36
i32 0, label %38
]
36: ; preds = %34
%37 = call i32 (i8*, ...) @syserr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
br label %56
38: ; preds = %34
%39 = load i32, i32* %3
%40 = call i32 @close(i32 %39)
%41 = call i32 (...) @setsid()
%42 = load i32, i32* %4
%43 = call i32 @dup2(i32 %42, i32 1)
%44 = load i32, i32* %4
%45 = call i32 @dup2(i32 %44, i32 2)
%46 = load i32, i32* %4
%47 = call i32 @close(i32 %46)
%48 = bitcast i32* %6 to i8*
store i32 0, i32* %6
%49 = load i32, i32* @TIOCSCTTY
%50 = call i32 @ioctl(i32 1, i32 %49, i32* %6)
%51 = getelementptr inbounds i8*, i8** %1, i64 1
%52 = load i8*, i8** %51
%53 = call i32 @execvp(i8* %52, i8** %51)
%54 = load i8*, i8** %51
%55 = call i32 (i8*, ...) @syserr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %54)
br label %91
56: ; preds = %36, %34
%57 = load i32, i32* %4
%58 = call i32 @close(i32 %57)
%59 = getelementptr inbounds [16384 x i8], [16384 x i8]* %7, i64 0, i64 0
%60 = load i32, i32* %3
%61 = call i32 @read(i32 %60, i8* %59, i32 16384)
%62 = icmp sgt i32 %61, 0
br i1 %62, label %63, label %73
63: ; preds = %56, %69
%64 = phi i32 [ %71, %69 ], [ %61, %56 ]
%65 = call i32 @write(i32 1, i8* %59, i32 %64)
%66 = icmp eq i32 %65, %64
br i1 %66, label %69, label %67
67: ; preds = %63
%68 = call i32 (i8*, ...) @syserr(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
br label %69
69: ; preds = %67, %63
%70 = load i32, i32* %3
%71 = call i32 @read(i32 %70, i8* %59, i32 16384)
%72 = icmp sgt i32 %71, 0
br i1 %72, label %63, label %73
73: ; preds = %69, %56
%74 = bitcast i32* %8 to i8*
%75 = call i32 @waitpid(i32 %35, i32* %8, i32 0)
%76 = icmp eq i32 %75, -1
br i1 %76, label %77, label %79
77: ; preds = %73
%78 = call i32 (i8*, ...) @syserr(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
br label %79
79: ; preds = %77, %73
%80 = load i32, i32* %8
%81 = call i64 @WIFEXITED(i32 %80)
%82 = icmp eq i64 %81, 0
%83 = load i32, i32* %8
br i1 %82, label %86, label %84
84: ; preds = %79
%85 = call i32 @WEXITSTATUS(i32 %83)
br label %89
86: ; preds = %79
%87 = call i32 @WTERMSIG(i32 %83)
%88 = add nsw i32 %87, 128
br label %89
89: ; preds = %86, %84
%90 = phi i32 [ %85, %84 ], [ %88, %86 ]
br label %91
91: ; preds = %89, %38
%92 = phi i32 [ %90, %89 ], [ 127, %38 ]
ret i32 %92
}