#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_RDONLY;
int /*<<< orphan*/ O_WRONLY;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ lseek(int, int /*<<< orphan*/, int /*<<< orphan*/);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ read(int, char *, int);
int /*<<< orphan*/ write(int, char *, int);
int main() {
  int exporter = open("/sys/class/gpio/export", O_WRONLY);
  if (exporter < 0) {
    printf("fail to open exporter\n");
    return -1;
  }
  write(exporter, "91", 2);
  close(exporter);
  int direction = open("/sys/class/gpio/gpio91/direction", O_WRONLY);
  if (direction < 0) {
    printf("fail to open direction\n");
    return -1;
  }
  write(direction, "in", 2);
  close(direction);
  int value = open("/sys/class/gpio/gpio91/value", O_RDONLY);
  if (value < 0) {
    printf("fail to open value\n");
    return -1;
  }
  exporter = open("/sys/class/gpio/export", O_WRONLY);
  if (exporter < 0) {
    printf("fail to open exporter\n");
    return -1;
  }
  write(exporter, "191", 3);
  close(exporter);
  direction = open("/sys/class/gpio/gpio191/direction", O_WRONLY);
  if (direction < 0) {
    printf("fail to open direction\n");
    return -1;
  }
  write(direction, "out", 3);
  close(direction);
  int writeval = open("/sys/class/gpio/gpio191/value", O_WRONLY);
  if (writeval < 0) {
    printf("fail to open value\n");
    return -1;
  }
  char zero = '0';
  char one = '1';
  write(writeval, &zero, 1);
  int i = 0;
  int count = 0;
  char oldc = '1';
  char c = '1';
  for (i = 0; i < 10000000 / 2; ++i) {
    read(value, &c, 1);
    lseek(value, 0, SEEK_SET);
    if (c == oldc) {
      continue;
    } else {
      write(writeval, &one, 1);
      oldc = c;
    }
  }
  close(value);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e52(%rip),%rax
mov    (%rax),%esi
lea    0xe81(%rip),%rdi
call   1080 <open@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    11a9 <main+0x49>
lea    0xe7f(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13f0 <main+0x290>
mov    -0x8(%rbp),%edi
lea    0xee9(%rip),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
mov    -0x8(%rbp),%edi
call   1060 <close@plt>
mov    0x2dfc(%rip),%rax
mov    (%rax),%esi
lea    0xe59(%rip),%rdi
call   1080 <open@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    11ff <main+0x9f>
lea    0xe61(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13f0 <main+0x290>
mov    -0xc(%rbp),%edi
lea    0xe5e(%rip),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
mov    -0xc(%rbp),%edi
call   1060 <close@plt>
mov    0x2dc6(%rip),%rax
mov    (%rax),%esi
lea    0xe3f(%rip),%rdi
call   1080 <open@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    1255 <main+0xf5>
lea    0xe43(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13f0 <main+0x290>
mov    0x2d6c(%rip),%rax
mov    (%rax),%esi
lea    0xd9b(%rip),%rdi
call   1080 <open@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    128f <main+0x12f>
lea    0xd99(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13f0 <main+0x290>
mov    -0x8(%rbp),%edi
lea    0xe02(%rip),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
mov    -0x8(%rbp),%edi
call   1060 <close@plt>
mov    0x2d16(%rip),%rax
mov    (%rax),%esi
lea    0xde4(%rip),%rdi
call   1080 <open@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    12e5 <main+0x185>
lea    0xd7b(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13f0 <main+0x290>
mov    -0xc(%rbp),%edi
lea    0xdd2(%rip),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
mov    -0xc(%rbp),%edi
call   1060 <close@plt>
mov    0x2cc0(%rip),%rax
mov    (%rax),%esi
lea    0xdb4(%rip),%rdi
call   1080 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    133b <main+0x1db>
lea    0xd5d(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13f0 <main+0x290>
movb   $0x30,-0x15(%rbp)
movb   $0x31,-0x16(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x15(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movb   $0x31,-0x21(%rbp)
movb   $0x31,-0x22(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4c4b40,-0x1c(%rbp)
jge    13e1 <main+0x281>
mov    -0x10(%rbp),%edi
lea    -0x22(%rbp),%rsi
mov    $0x1,%edx
call   1070 <read@plt>
mov    -0x10(%rbp),%edi
mov    0x2c3f(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <lseek@plt>
movsbl -0x22(%rbp),%eax
movsbl -0x21(%rbp),%ecx
cmp    %ecx,%eax
jne    13b7 <main+0x257>
jmp    13d3 <main+0x273>
mov    -0x14(%rbp),%edi
lea    -0x16(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    -0x22(%rbp),%al
mov    %al,-0x21(%rbp)
jmp    13d3 <main+0x273>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1371 <main+0x211>
mov    -0x10(%rbp),%edi
call   1060 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2e56(%rip),%r14
mov    (%r14),%esi
lea    0xe84(%rip),%rdi
call   1080 <open@plt>
test   %eax,%eax
js     12f4 <main+0x194>
mov    %eax,%ebx
lea    0xec7(%rip),%rsi
mov    %eax,%edi
mov    $0x2,%edx
call   1040 <write@plt>
mov    %ebx,%edi
call   1060 <close@plt>
mov    (%r14),%esi
lea    0xe68(%rip),%rdi
call   1080 <open@plt>
test   %eax,%eax
js     12fd <main+0x19d>
mov    %eax,%ebx
lea    0xe73(%rip),%rsi
mov    %eax,%edi
mov    $0x2,%edx
call   1040 <write@plt>
mov    %ebx,%edi
call   1060 <close@plt>
mov    0x2e09(%rip),%rax
mov    (%rax),%esi
lea    0xe53(%rip),%rdi
call   1080 <open@plt>
test   %eax,%eax
js     1306 <main+0x1a6>
mov    %eax,%ebx
mov    (%r14),%esi
lea    0xdff(%rip),%rdi
call   1080 <open@plt>
test   %eax,%eax
js     12f4 <main+0x194>
mov    %eax,%ebp
lea    0xe41(%rip),%rsi
mov    %eax,%edi
mov    $0x3,%edx
call   1040 <write@plt>
mov    %ebp,%edi
call   1060 <close@plt>
mov    (%r14),%esi
lea    0xe28(%rip),%rdi
call   1080 <open@plt>
test   %eax,%eax
js     12fd <main+0x19d>
mov    %eax,%ebp
lea    0xe34(%rip),%rsi
mov    %eax,%edi
mov    $0x3,%edx
call   1040 <write@plt>
mov    %ebp,%edi
call   1060 <close@plt>
mov    (%r14),%esi
lea    0xe1b(%rip),%rdi
call   1080 <open@plt>
test   %eax,%eax
js     1306 <main+0x1a6>
movb   $0x30,0x3(%rsp)
movb   $0x31,0x2(%rsp)
lea    0x3(%rsp),%rsi
mov    %eax,0x4(%rsp)
mov    %eax,%edi
mov    $0x1,%edx
call   1040 <write@plt>
movb   $0x31,0x1(%rsp)
mov    $0x31,%r14b
mov    $0x4c4b40,%ebp
lea    0x1(%rsp),%r12
mov    0x2d2c(%rip),%r13
jmp    12b5 <main+0x155>
xchg   %ax,%ax
add    $0xffffffff,%ebp
je     1326 <main+0x1c6>
mov    %ebx,%edi
mov    %r12,%rsi
mov    $0x1,%edx
call   1070 <read@plt>
mov    0x0(%r13),%edx
mov    %ebx,%edi
xor    %esi,%esi
call   1050 <lseek@plt>
movzbl 0x1(%rsp),%r15d
cmp    %r14b,%r15b
je     12b0 <main+0x150>
mov    0x4(%rsp),%edi
lea    0x2(%rsp),%rsi
mov    $0x1,%edx
call   1040 <write@plt>
mov    %r15d,%r14d
jmp    12b0 <main+0x150>
lea    0xdcf(%rip),%rdi
jmp    130d <main+0x1ad>
lea    0xdaf(%rip),%rdi
jmp    130d <main+0x1ad>
lea    0xd93(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %ebx,%edi
call   1060 <close@plt>
xor    %eax,%eax
jmp    1317 <main+0x1b7>

LLVM IR (-O0):
@.str = [23 x i8] c"/sys/class/gpio/export\00"
@O_WRONLY = global i32 0
@.str.1 = [23 x i8] c"fail to open exporter\0A\00"
@.str.2 = [3 x i8] c"91\00"
@.str.3 = [33 x i8] c"/sys/class/gpio/gpio91/direction\00"
@.str.4 = [24 x i8] c"fail to open direction\0A\00"
@.str.5 = [3 x i8] c"in\00"
@.str.6 = [29 x i8] c"/sys/class/gpio/gpio91/value\00"
@O_RDONLY = global i32 0
@.str.7 = [20 x i8] c"fail to open value\0A\00"
@.str.8 = [4 x i8] c"191\00"
@.str.9 = [34 x i8] c"/sys/class/gpio/gpio191/direction\00"
@.str.10 = [4 x i8] c"out\00"
@.str.11 = [30 x i8] c"/sys/class/gpio/gpio191/value\00"
@SEEK_SET = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
%7 = alloca i8
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8
%11 = alloca i8
store i32 0, i32* %1
%12 = load i32, i32* @O_WRONLY
%13 = call i32 @open(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %12)
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %0
%17 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %1
br label %98
18: ; preds = %0
%19 = load i32, i32* %2
%20 = call i32 @write(i32 %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 2)
%21 = load i32, i32* %2
%22 = call i32 @close(i32 %21)
%23 = load i32, i32* @O_WRONLY
%24 = call i32 @open(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 %23)
store i32 %24, i32* %3
%25 = load i32, i32* %3
%26 = icmp slt i32 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %18
%28 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
store i32 -1, i32* %1
br label %98
29: ; preds = %18
%30 = load i32, i32* %3
%31 = call i32 @write(i32 %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 2)
%32 = load i32, i32* %3
%33 = call i32 @close(i32 %32)
%34 = load i32, i32* @O_RDONLY
%35 = call i32 @open(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i32 %34)
store i32 %35, i32* %4
%36 = load i32, i32* %4
%37 = icmp slt i32 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %29
%39 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
store i32 -1, i32* %1
br label %98
40: ; preds = %29
%41 = load i32, i32* @O_WRONLY
%42 = call i32 @open(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %41)
store i32 %42, i32* %2
%43 = load i32, i32* %2
%44 = icmp slt i32 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %40
%46 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %1
br label %98
47: ; preds = %40
%48 = load i32, i32* %2
%49 = call i32 @write(i32 %48, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%50 = load i32, i32* %2
%51 = call i32 @close(i32 %50)
%52 = load i32, i32* @O_WRONLY
%53 = call i32 @open(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), i32 %52)
store i32 %53, i32* %3
%54 = load i32, i32* %3
%55 = icmp slt i32 %54, 0
br i1 %55, label %56, label %58
56: ; preds = %47
%57 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
store i32 -1, i32* %1
br label %98
58: ; preds = %47
%59 = load i32, i32* %3
%60 = call i32 @write(i32 %59, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 3)
%61 = load i32, i32* %3
%62 = call i32 @close(i32 %61)
%63 = load i32, i32* @O_WRONLY
%64 = call i32 @open(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0), i32 %63)
store i32 %64, i32* %5
%65 = load i32, i32* %5
%66 = icmp slt i32 %65, 0
br i1 %66, label %67, label %69
67: ; preds = %58
%68 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
store i32 -1, i32* %1
br label %98
69: ; preds = %58
store i8 48, i8* %6
store i8 49, i8* %7
%70 = load i32, i32* %5
%71 = call i32 @write(i32 %70, i8* %6, i32 1)
store i32 0, i32* %8
store i32 0, i32* %9
store i8 49, i8* %10
store i8 49, i8* %11
store i32 0, i32* %8
br label %72
72: ; preds = %92, %69
%73 = load i32, i32* %8
%74 = icmp slt i32 %73, 5000000
br i1 %74, label %75, label %95
75: ; preds = %72
%76 = load i32, i32* %4
%77 = call i32 @read(i32 %76, i8* %11, i32 1)
%78 = load i32, i32* %4
%79 = load i32, i32* @SEEK_SET
%80 = call i32 @lseek(i32 %78, i32 0, i32 %79)
%81 = load i8, i8* %11
%82 = sext i8 %81 to i32
%83 = load i8, i8* %10
%84 = sext i8 %83 to i32
%85 = icmp eq i32 %82, %84
br i1 %85, label %86, label %87
86: ; preds = %75
br label %92
87: ; preds = %75
%88 = load i32, i32* %5
%89 = call i32 @write(i32 %88, i8* %7, i32 1)
%90 = load i8, i8* %11
store i8 %90, i8* %10
br label %91
91: ; preds = %87
br label %92
92: ; preds = %91, %86
%93 = load i32, i32* %8
%94 = add nsw i32 %93, 1
store i32 %94, i32* %8
br label %72
95: ; preds = %72
%96 = load i32, i32* %4
%97 = call i32 @close(i32 %96)
store i32 0, i32* %1
br label %98
98: ; preds = %95, %67, %56, %45, %38, %27, %16
%99 = load i32, i32* %1
ret i32 %99
}

LLVM IR (-O2):
@.str = [23 x i8] c"/sys/class/gpio/export\00"
@O_WRONLY = global i32 0
@.str.2 = [3 x i8] c"91\00"
@.str.3 = [33 x i8] c"/sys/class/gpio/gpio91/direction\00"
@.str.5 = [3 x i8] c"in\00"
@.str.6 = [29 x i8] c"/sys/class/gpio/gpio91/value\00"
@O_RDONLY = global i32 0
@.str.8 = [4 x i8] c"191\00"
@.str.9 = [34 x i8] c"/sys/class/gpio/gpio191/direction\00"
@.str.10 = [4 x i8] c"out\00"
@.str.11 = [30 x i8] c"/sys/class/gpio/gpio191/value\00"
@SEEK_SET = global i32 0
@str.14 = [19 x i8] c"fail to open value\00"
@str.15 = [23 x i8] c"fail to open direction\00"
@str.16 = [22 x i8] c"fail to open exporter\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = load i32, i32* @O_WRONLY
%5 = tail call i32 @open(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.16, i64 0, i64 0))
br label %65
9: ; preds = %0
%10 = tail call i32 @write(i32 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 2)
%11 = tail call i32 @close(i32 %5)
%12 = load i32, i32* @O_WRONLY
%13 = tail call i32 @open(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %9
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.15, i64 0, i64 0))
br label %65
17: ; preds = %9
%18 = tail call i32 @write(i32 %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 2)
%19 = tail call i32 @close(i32 %13)
%20 = load i32, i32* @O_RDONLY
%21 = tail call i32 @open(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i32 %20)
%22 = icmp slt i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %17
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.14, i64 0, i64 0))
br label %65
25: ; preds = %17
%26 = load i32, i32* @O_WRONLY
%27 = tail call i32 @open(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %26)
%28 = icmp slt i32 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %25
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.16, i64 0, i64 0))
br label %65
31: ; preds = %25
%32 = tail call i32 @write(i32 %27, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%33 = tail call i32 @close(i32 %27)
%34 = load i32, i32* @O_WRONLY
%35 = tail call i32 @open(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), i32 %34)
%36 = icmp slt i32 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %31
%38 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.15, i64 0, i64 0))
br label %65
39: ; preds = %31
%40 = tail call i32 @write(i32 %35, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 3)
%41 = tail call i32 @close(i32 %35)
%42 = load i32, i32* @O_WRONLY
%43 = tail call i32 @open(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0), i32 %42)
%44 = icmp slt i32 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %39
%46 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.14, i64 0, i64 0))
br label %65
47: ; preds = %39
store i8 48, i8* %1
store i8 49, i8* %2
%48 = call i32 @write(i32 %43, i8* %1, i32 1)
store i8 49, i8* %3
br label %49
49: ; preds = %47, %59
%50 = phi i8 [ 49, %47 ], [ %60, %59 ]
%51 = phi i32 [ 0, %47 ], [ %61, %59 ]
%52 = call i32 @read(i32 %21, i8* %3, i32 1)
%53 = load i32, i32* @SEEK_SET
%54 = tail call i32 @lseek(i32 %21, i32 0, i32 %53)
%55 = load i8, i8* %3
%56 = icmp eq i8 %55, %50
br i1 %56, label %59, label %57
57: ; preds = %49
%58 = call i32 @write(i32 %43, i8* %2, i32 1)
br label %59
59: ; preds = %49, %57
%60 = phi i8 [ %50, %49 ], [ %55, %57 ]
%61 = add nuw nsw i32 %51, 1
%62 = icmp eq i32 %61, 5000000
br i1 %62, label %63, label %49
63: ; preds = %59
%64 = tail call i32 @close(i32 %21)
br label %65
65: ; preds = %15, %45, %63, %37, %29, %23, %7
%66 = phi i32 [ -1, %7 ], [ -1, %15 ], [ -1, %23 ], [ -1, %29 ], [ -1, %37 ], [ -1, %45 ], [ 0, %63 ]
ret i32 %66
}