#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*/ O_RDWR;
int sf_open(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int open_pty_master(char **ptyslave, int *sfdp) {
  int mfd;
  char *major, *minor;
  static char majorchars[] = "pqrstuvwxyzabcdePQRSTUVWXYZABCDE";
  static char minorchars[] = "0123456789abcdefghijklmnopqrstuv"
                             "wxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_+";
  {
    static char ptyname[] = "/dev/pty/mX";
    for (minor = minorchars; *minor; minor++) {
      ptyname[10] = *minor;
      if ((mfd = sf_open(ptyname, O_RDWR, 0)) >= 0) {
        ptyname[9] = 's';
        *ptyslave = ptyname;
        return mfd;
      }
    }
  }
  {
    static char ptyname[] = "/dev/ptym/ptyXY";
    static char ttyname[] = "/dev/pty/ttyXY";
    for (major = majorchars; *major; major++) {
      ptyname[13] = *major;
      for (minor = minorchars; *minor; minor++) {
        ptyname[14] = *minor;
        if ((mfd = sf_open(ptyname, O_RDWR, 0)) >= 0) {
          ttyname[12] = *major;
          ttyname[13] = *minor;
          *ptyslave = ttyname;
          return mfd;
        }
      }
    }
  }
  {
    static char ptyname[] = "/dev/ptyXY";
    for (major = majorchars; *major; major++) {
      ptyname[8] = *major;
      for (minor = minorchars; *minor; minor++) {
        ptyname[9] = *minor;
        if ((mfd = sf_open(ptyname, O_RDWR, 0)) >= 0) {
          ptyname[5] = 't';
          *ptyslave = ptyname;
          return mfd;
        }
      }
    }
  }
  return -1;
}


x86 assembly (clang, -O0):
<open_pty_master>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    0x2f39(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmpb   $0x0,(%rax)
je     119d <open_pty_master+0x8d>
mov    -0x30(%rbp),%rax
mov    (%rax),%al
mov    %al,0x2f67(%rip)
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
lea    0x2f4d(%rip),%rdi
xor    %edx,%edx
call   1030 <sf_open@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jl     1187 <open_pty_master+0x77>
movb   $0x73,0x2f3c(%rip)
mov    -0x10(%rbp),%rax
lea    0x2f28(%rip),%rcx
mov    %rcx,(%rax)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1323 <open_pty_master+0x213>
jmp    118c <open_pty_master+0x7c>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    112b <open_pty_master+0x1b>
lea    0x2e8c(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmpb   $0x0,(%rax)
je     1265 <open_pty_master+0x155>
mov    -0x28(%rbp),%rax
mov    (%rax),%al
mov    %al,0x2efc(%rip)
lea    0x2e98(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmpb   $0x0,(%rax)
je     124f <open_pty_master+0x13f>
mov    -0x30(%rbp),%rax
mov    (%rax),%al
mov    %al,0x2ed9(%rip)
mov    0x2dfc(%rip),%rax
mov    (%rax),%esi
lea    0x2ebb(%rip),%rdi
xor    %edx,%edx
call   1030 <sf_open@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jl     1239 <open_pty_master+0x129>
mov    -0x28(%rbp),%rax
mov    (%rax),%al
mov    %al,0x2eb8(%rip)
mov    -0x30(%rbp),%rax
mov    (%rax),%al
mov    %al,0x2ead(%rip)
mov    -0x10(%rbp),%rax
lea    0x2e95(%rip),%rcx
mov    %rcx,(%rax)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1323 <open_pty_master+0x213>
jmp    123e <open_pty_master+0x12e>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11cc <open_pty_master+0xbc>
jmp    1254 <open_pty_master+0x144>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    11a8 <open_pty_master+0x98>
lea    0x2dc4(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmpb   $0x0,(%rax)
je     131c <open_pty_master+0x20c>
mov    -0x28(%rbp),%rax
mov    (%rax),%al
mov    %al,0x2e4e(%rip)
lea    0x2dd0(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmpb   $0x0,(%rax)
je     1306 <open_pty_master+0x1f6>
mov    -0x30(%rbp),%rax
mov    (%rax),%al
mov    %al,0x2e2b(%rip)
mov    0x2d34(%rip),%rax
mov    (%rax),%esi
lea    0x2e12(%rip),%rdi
xor    %edx,%edx
call   1030 <sf_open@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jl     12f0 <open_pty_master+0x1e0>
movb   $0x74,0x2dfd(%rip)
mov    -0x10(%rbp),%rax
lea    0x2ded(%rip),%rcx
mov    %rcx,(%rax)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1323 <open_pty_master+0x213>
jmp    12f5 <open_pty_master+0x1e5>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1294 <open_pty_master+0x184>
jmp    130b <open_pty_master+0x1fb>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1270 <open_pty_master+0x160>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_pty_master>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x30,%al
xor    %ebp,%ebp
lea    0x2f07(%rip),%rbx
mov    0x2eb8(%rip),%r12
lea    0xef9(%rip),%r15
nopw   0x0(%rax,%rax,1)
mov    %al,0x2ef4(%rip)
mov    (%r12),%esi
mov    %rbx,%rdi
xor    %edx,%edx
call   1030 <sf_open@plt>
test   %eax,%eax
jns    1233 <open_pty_master+0x123>
movzbl 0x1(%rbp,%r15,1),%eax
add    $0x1,%rbp
cmp    $0x40,%rbp
jne    1140 <open_pty_master+0x30>
lea    0xe8d(%rip),%rbp
mov    $0x70,%al
lea    0x2ec4(%rip),%rbx
mov    %al,0x2ecb(%rip)
mov    $0x30,%al
xor    %r13d,%r13d
nopw   0x0(%rax,%rax,1)
mov    %al,0x2eb8(%rip)
mov    (%r12),%esi
mov    %rbx,%rdi
xor    %edx,%edx
call   1030 <sf_open@plt>
test   %eax,%eax
jns    123c <open_pty_master+0x12c>
movzbl 0x1(%r13,%r15,1),%eax
add    $0x1,%r13
cmp    $0x40,%r13
jne    1190 <open_pty_master+0x80>
mov    0x1(%rbp),%al
add    $0x1,%rbp
lea    0xe56(%rip),%rcx
cmp    %rcx,%rbp
jne    117c <open_pty_master+0x6c>
lea    0xe2a(%rip),%r13
mov    $0x70,%cl
lea    0x2e80(%rip),%rbx
mov    %cl,0x2e82(%rip)
mov    $0x30,%al
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    %al,0x2e72(%rip)
mov    (%r12),%esi
mov    %rbx,%rdi
xor    %edx,%edx
call   1030 <sf_open@plt>
test   %eax,%eax
jns    1269 <open_pty_master+0x159>
movzbl 0x1(%rbp,%r15,1),%eax
add    $0x1,%rbp
cmp    $0x40,%rbp
jne    11f0 <open_pty_master+0xe0>
mov    0x1(%r13),%cl
add    $0x1,%r13
mov    $0xffffffff,%eax
lea    0xdf4(%rip),%rdx
cmp    %rdx,%r13
jne    11df <open_pty_master+0xcf>
jmp    125a <open_pty_master+0x14a>
movb   $0x73,0x2dff(%rip)
jmp    1257 <open_pty_master+0x147>
mov    0x0(%rbp),%cl
mov    %cl,0x2e17(%rip)
lea    0x2e04(%rip),%rbx
mov    0x0(%r13,%r15,1),%cl
mov    %cl,0x2e06(%rip)
mov    %rbx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movb   $0x74,0x2df4(%rip)
jmp    1257 <open_pty_master+0x147>

LLVM IR (-O0):
@open_pty_master.majorchars = internal global [33 x i8] c"pqrstuvwxyzabcdePQRSTUVWXYZABCDE\00"
@open_pty_master.minorchars = internal global [65 x i8] c"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_+\00"
@open_pty_master.ptyname = internal global [12 x i8] c"/dev/pty/mX\00"
@O_RDWR = global i32 0
@open_pty_master.ptyname.1 = internal global [16 x i8] c"/dev/ptym/ptyXY\00"
@open_pty_master.ttyname = internal global [15 x i8] c"/dev/pty/ttyXY\00"
@open_pty_master.ptyname.2 = internal global [11 x i8] c"/dev/ptyXY\00"
define i32 @open_pty_master(i8** %0, i32* %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8** %0, i8*** %4
store i32* %1, i32** %5
store i8* getelementptr inbounds ([65 x i8], [65 x i8]* @open_pty_master.minorchars, i64 0, i64 0), i8** %8
br label %9
9: ; preds = %23, %2
%10 = load i8*, i8** %8
%11 = load i8, i8* %10
%12 = icmp ne i8 %11, 0
br i1 %12, label %13, label %26
13: ; preds = %9
%14 = load i8*, i8** %8
%15 = load i8, i8* %14
store i8 %15, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @open_pty_master.ptyname, i64 0, i64 10)
%16 = load i32, i32* @O_RDWR
%17 = call i32 @sf_open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @open_pty_master.ptyname, i64 0, i64 0), i32 %16, i32 0)
store i32 %17, i32* %6
%18 = icmp sge i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %13
store i8 115, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @open_pty_master.ptyname, i64 0, i64 9)
%20 = load i8**, i8*** %4
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @open_pty_master.ptyname, i64 0, i64 0), i8** %20
%21 = load i32, i32* %6
store i32 %21, i32* %3
br label %89
22: ; preds = %13
br label %23
23: ; preds = %22
%24 = load i8*, i8** %8
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %8
br label %9
26: ; preds = %9
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @open_pty_master.majorchars, i64 0, i64 0), i8** %7
br label %27
27: ; preds = %56, %26
%28 = load i8*, i8** %7
%29 = load i8, i8* %28
%30 = icmp ne i8 %29, 0
br i1 %30, label %31, label %59
31: ; preds = %27
%32 = load i8*, i8** %7
%33 = load i8, i8* %32
store i8 %33, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @open_pty_master.ptyname.1, i64 0, i64 13)
store i8* getelementptr inbounds ([65 x i8], [65 x i8]* @open_pty_master.minorchars, i64 0, i64 0), i8** %8
br label %34
34: ; preds = %52, %31
%35 = load i8*, i8** %8
%36 = load i8, i8* %35
%37 = icmp ne i8 %36, 0
br i1 %37, label %38, label %55
38: ; preds = %34
%39 = load i8*, i8** %8
%40 = load i8, i8* %39
store i8 %40, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @open_pty_master.ptyname.1, i64 0, i64 14)
%41 = load i32, i32* @O_RDWR
%42 = call i32 @sf_open(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @open_pty_master.ptyname.1, i64 0, i64 0), i32 %41, i32 0)
store i32 %42, i32* %6
%43 = icmp sge i32 %42, 0
br i1 %43, label %44, label %51
44: ; preds = %38
%45 = load i8*, i8** %7
%46 = load i8, i8* %45
store i8 %46, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @open_pty_master.ttyname, i64 0, i64 12)
%47 = load i8*, i8** %8
%48 = load i8, i8* %47
store i8 %48, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @open_pty_master.ttyname, i64 0, i64 13)
%49 = load i8**, i8*** %4
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @open_pty_master.ttyname, i64 0, i64 0), i8** %49
%50 = load i32, i32* %6
store i32 %50, i32* %3
br label %89
51: ; preds = %38
br label %52
52: ; preds = %51
%53 = load i8*, i8** %8
%54 = getelementptr inbounds i8, i8* %53, i32 1
store i8* %54, i8** %8
br label %34
55: ; preds = %34
br label %56
56: ; preds = %55
%57 = load i8*, i8** %7
%58 = getelementptr inbounds i8, i8* %57, i32 1
store i8* %58, i8** %7
br label %27
59: ; preds = %27
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @open_pty_master.majorchars, i64 0, i64 0), i8** %7
br label %60
60: ; preds = %85, %59
%61 = load i8*, i8** %7
%62 = load i8, i8* %61
%63 = icmp ne i8 %62, 0
br i1 %63, label %64, label %88
64: ; preds = %60
%65 = load i8*, i8** %7
%66 = load i8, i8* %65
store i8 %66, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @open_pty_master.ptyname.2, i64 0, i64 8)
store i8* getelementptr inbounds ([65 x i8], [65 x i8]* @open_pty_master.minorchars, i64 0, i64 0), i8** %8
br label %67
67: ; preds = %81, %64
%68 = load i8*, i8** %8
%69 = load i8, i8* %68
%70 = icmp ne i8 %69, 0
br i1 %70, label %71, label %84
71: ; preds = %67
%72 = load i8*, i8** %8
%73 = load i8, i8* %72
store i8 %73, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @open_pty_master.ptyname.2, i64 0, i64 9)
%74 = load i32, i32* @O_RDWR
%75 = call i32 @sf_open(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @open_pty_master.ptyname.2, i64 0, i64 0), i32 %74, i32 0)
store i32 %75, i32* %6
%76 = icmp sge i32 %75, 0
br i1 %76, label %77, label %80
77: ; preds = %71
store i8 116, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @open_pty_master.ptyname.2, i64 0, i64 5)
%78 = load i8**, i8*** %4
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @open_pty_master.ptyname.2, i64 0, i64 0), i8** %78
%79 = load i32, i32* %6
store i32 %79, i32* %3
br label %89
80: ; preds = %71
br label %81
81: ; preds = %80
%82 = load i8*, i8** %8
%83 = getelementptr inbounds i8, i8* %82, i32 1
store i8* %83, i8** %8
br label %67
84: ; preds = %67
br label %85
85: ; preds = %84
%86 = load i8*, i8** %7
%87 = getelementptr inbounds i8, i8* %86, i32 1
store i8* %87, i8** %7
br label %60
88: ; preds = %60
store i32 -1, i32* %3
br label %89
89: ; preds = %88, %77, %44, %19
%90 = load i32, i32* %3
ret i32 %90
}

LLVM IR (-O2):
@open_pty_master.majorchars = internal unnamed_addr constant [33 x i8] c"pqrstuvwxyzabcdePQRSTUVWXYZABCDE\00"
@open_pty_master.minorchars = internal unnamed_addr constant [65 x i8] c"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_+\00"
@open_pty_master.ptyname = internal global [12 x i8] c"/dev/pty/mX\00"
@O_RDWR = global i32 0
@open_pty_master.ptyname.1 = internal global [16 x i8] c"/dev/ptym/ptyXY\00"
@open_pty_master.ttyname = internal global [15 x i8] c"/dev/pty/ttyXY\00"
@open_pty_master.ptyname.2 = internal global [11 x i8] c"/dev/ptyXY\00"
define i32 @open_pty_master(i8** nocapture writeonly %0, i32* nocapture readnone %1) {
br label %6
3: ; preds = %6
%4 = load i8, i8* %12
%5 = icmp eq i8* %12, getelementptr inbounds ([65 x i8], [65 x i8]* @open_pty_master.minorchars, i64 0, i64 64)
br i1 %5, label %14, label %6
6: ; preds = %2, %3
%7 = phi i8 [ 48, %2 ], [ %4, %3 ]
%8 = phi i8* [ getelementptr inbounds ([65 x i8], [65 x i8]* @open_pty_master.minorchars, i64 0, i64 0), %2 ], [ %12, %3 ]
store i8 %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @open_pty_master.ptyname, i64 0, i64 10)
%9 = load i32, i32* @O_RDWR
%10 = tail call i32 @sf_open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @open_pty_master.ptyname, i64 0, i64 0), i32 %9, i32 0)
%11 = icmp sgt i32 %10, -1
%12 = getelementptr inbounds i8, i8* %8, i64 1
br i1 %11, label %13, label %3
13: ; preds = %6
store i8 115, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @open_pty_master.ptyname, i64 0, i64 9)
br label %52
14: ; preds = %3, %30
%15 = phi i8 [ %32, %30 ], [ 112, %3 ]
%16 = phi i8* [ %31, %30 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @open_pty_master.majorchars, i64 0, i64 0), %3 ]
store i8 %15, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @open_pty_master.ptyname.1, i64 0, i64 13)
br label %17
17: ; preds = %14, %26
%18 = phi i8 [ 48, %14 ], [ %28, %26 ]
%19 = phi i8* [ getelementptr inbounds ([65 x i8], [65 x i8]* @open_pty_master.minorchars, i64 0, i64 0), %14 ], [ %27, %26 ]
store i8 %18, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @open_pty_master.ptyname.1, i64 0, i64 14)
%20 = load i32, i32* @O_RDWR
%21 = tail call i32 @sf_open(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @open_pty_master.ptyname.1, i64 0, i64 0), i32 %20, i32 0)
%22 = icmp sgt i32 %21, -1
br i1 %22, label %23, label %26
23: ; preds = %17
%24 = load i8, i8* %16
store i8 %24, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @open_pty_master.ttyname, i64 0, i64 12)
%25 = load i8, i8* %19
store i8 %25, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @open_pty_master.ttyname, i64 0, i64 13)
br label %52
26: ; preds = %17
%27 = getelementptr inbounds i8, i8* %19, i64 1
%28 = load i8, i8* %27
%29 = icmp eq i8* %27, getelementptr inbounds ([65 x i8], [65 x i8]* @open_pty_master.minorchars, i64 0, i64 64)
br i1 %29, label %30, label %17
30: ; preds = %26
%31 = getelementptr inbounds i8, i8* %16, i64 1
%32 = load i8, i8* %31
%33 = icmp eq i8* %31, getelementptr inbounds ([33 x i8], [33 x i8]* @open_pty_master.majorchars, i64 0, i64 32)
br i1 %33, label %34, label %14
34: ; preds = %30, %48
%35 = phi i8 [ %50, %48 ], [ 112, %30 ]
%36 = phi i8* [ %49, %48 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @open_pty_master.majorchars, i64 0, i64 0), %30 ]
store i8 %35, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @open_pty_master.ptyname.2, i64 0, i64 8)
br label %40
37: ; preds = %40
%38 = load i8, i8* %46
%39 = icmp eq i8* %46, getelementptr inbounds ([65 x i8], [65 x i8]* @open_pty_master.minorchars, i64 0, i64 64)
br i1 %39, label %48, label %40
40: ; preds = %34, %37
%41 = phi i8 [ 48, %34 ], [ %38, %37 ]
%42 = phi i8* [ getelementptr inbounds ([65 x i8], [65 x i8]* @open_pty_master.minorchars, i64 0, i64 0), %34 ], [ %46, %37 ]
store i8 %41, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @open_pty_master.ptyname.2, i64 0, i64 9)
%43 = load i32, i32* @O_RDWR
%44 = tail call i32 @sf_open(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @open_pty_master.ptyname.2, i64 0, i64 0), i32 %43, i32 0)
%45 = icmp sgt i32 %44, -1
%46 = getelementptr inbounds i8, i8* %42, i64 1
br i1 %45, label %47, label %37
47: ; preds = %40
store i8 116, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @open_pty_master.ptyname.2, i64 0, i64 5)
br label %52
48: ; preds = %37
%49 = getelementptr inbounds i8, i8* %36, i64 1
%50 = load i8, i8* %49
%51 = icmp eq i8* %49, getelementptr inbounds ([33 x i8], [33 x i8]* @open_pty_master.majorchars, i64 0, i64 32)
br i1 %51, label %55, label %34
52: ; preds = %13, %23, %47
%53 = phi i8* [ getelementptr inbounds ([11 x i8], [11 x i8]* @open_pty_master.ptyname.2, i64 0, i64 0), %47 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @open_pty_master.ttyname, i64 0, i64 0), %23 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @open_pty_master.ptyname, i64 0, i64 0), %13 ]
%54 = phi i32 [ %44, %47 ], [ %21, %23 ], [ %10, %13 ]
store i8* %53, i8** %0
br label %55
55: ; preds = %48, %52
%56 = phi i32 [ %54, %52 ], [ -1, %48 ]
ret i32 %56
}