#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 my_write(int, char *, int);
int read(int, char *, int);
scalar_t__ strcasecmp(char *, char *);
int strlen(char *);
int write_page(int cfd, char *path) {
  int n;
  char buf[1024];
  if (my_write(cfd, "HTTP/1.1 200 OK\r\n", strlen("HTTP/1.1 200 OK\r\n")) == -1)
    return -1;
  if (my_write(cfd, "Content-Type: ", strlen("Content-Type: ")) == -1)
    return -1;
  n = strlen(path);
  if (strcasecmp(&path[n - 3], "jpg") == 0 ||
      (strcasecmp(&path[n - 4], "jpeg") == 0))
    if (my_write(cfd, "image/jpeg", strlen("image/jpeg")) == -1)
      return -1;
    else if (strcasecmp(&path[n - 3], "gif") == 0)
      if (my_write(cfd, "image/gif", strlen("image/gif")) == -1)
        return -1;
      else if (strcasecmp(&path[n - 3], "png") == 0)
        if (my_write(cfd, "image/png", strlen("image/png")) == -1)
          return -1;
        else if (my_write(cfd, "text/html", strlen("text/html")) == -1)
          return -1;
  if (my_write(cfd, "\r\n\r\n", 4) == -1)
    return -1;
  while ((n = read(cfd, buf, 1024)) > 0)
    if (my_write(cfd, buf, n) == -1)
      return -1;
  return 0;
}


x86 assembly (clang, -O0):
<write_page>:
push   %rbp
mov    %rsp,%rbp
sub    $0x440,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x424(%rbp)
lea    0xe9e(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x424(%rbp),%edi
mov    %eax,%edx
lea    0xe8a(%rip),%rsi
call   1060 <my_write@plt>
cmp    $0xffffffff,%eax
jne    1190 <write_page+0x50>
movl   $0xffffffff,-0x4(%rbp)
jmp    1405 <write_page+0x2c5>
mov    -0x8(%rbp),%eax
mov    %eax,-0x428(%rbp)
lea    0xe72(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x428(%rbp),%edi
mov    %eax,%edx
lea    0xe5e(%rip),%rsi
call   1060 <my_write@plt>
cmp    $0xffffffff,%eax
jne    11ce <write_page+0x8e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1405 <write_page+0x2c5>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%eax
sub    $0x3,%eax
cltq
add    %rax,%rdi
lea    0xe31(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
je     1224 <write_page+0xe4>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%eax
sub    $0x4,%eax
cltq
add    %rax,%rdi
lea    0xe16(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1384 <write_page+0x244>
mov    -0x8(%rbp),%eax
mov    %eax,-0x42c(%rbp)
lea    0xdf1(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x42c(%rbp),%edi
mov    %eax,%edx
lea    0xddd(%rip),%rsi
call   1060 <my_write@plt>
cmp    $0xffffffff,%eax
jne    1262 <write_page+0x122>
movl   $0xffffffff,-0x4(%rbp)
jmp    1405 <write_page+0x2c5>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%eax
sub    $0x3,%eax
cltq
add    %rax,%rdi
lea    0xdbe(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    137a <write_page+0x23a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x430(%rbp)
lea    0xd99(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x430(%rbp),%edi
mov    %eax,%edx
lea    0xd85(%rip),%rsi
call   1060 <my_write@plt>
cmp    $0xffffffff,%eax
jne    12c5 <write_page+0x185>
movl   $0xffffffff,-0x4(%rbp)
jmp    1405 <write_page+0x2c5>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%eax
sub    $0x3,%eax
cltq
add    %rax,%rdi
lea    0xd65(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1370 <write_page+0x230>
mov    -0x8(%rbp),%eax
mov    %eax,-0x434(%rbp)
lea    0xd40(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x434(%rbp),%edi
mov    %eax,%edx
lea    0xd2c(%rip),%rsi
call   1060 <my_write@plt>
cmp    $0xffffffff,%eax
jne    1328 <write_page+0x1e8>
movl   $0xffffffff,-0x4(%rbp)
jmp    1405 <write_page+0x2c5>
mov    -0x8(%rbp),%eax
mov    %eax,-0x438(%rbp)
lea    0xd0c(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x438(%rbp),%edi
mov    %eax,%edx
lea    0xcf8(%rip),%rsi
call   1060 <my_write@plt>
cmp    $0xffffffff,%eax
jne    1366 <write_page+0x226>
movl   $0xffffffff,-0x4(%rbp)
jmp    1405 <write_page+0x2c5>
jmp    136b <write_page+0x22b>
jmp    1370 <write_page+0x230>
jmp    1375 <write_page+0x235>
jmp    137a <write_page+0x23a>
jmp    137f <write_page+0x23f>
jmp    1384 <write_page+0x244>
mov    -0x8(%rbp),%edi
lea    0xcc0(%rip),%rsi
mov    $0x4,%edx
call   1060 <my_write@plt>
cmp    $0xffffffff,%eax
jne    13ad <write_page+0x26d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1405 <write_page+0x2c5>
jmp    13b2 <write_page+0x272>
mov    -0x8(%rbp),%edi
lea    -0x420(%rbp),%rsi
mov    $0x400,%edx
call   1050 <read@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jle    13fe <write_page+0x2be>
mov    -0x8(%rbp),%edi
lea    -0x420(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1060 <my_write@plt>
cmp    $0xffffffff,%eax
jne    13f9 <write_page+0x2b9>
movl   $0xffffffff,-0x4(%rbp)
jmp    1405 <write_page+0x2c5>
jmp    13b2 <write_page+0x272>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x440,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_page>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x400,%rsp
mov    %rsi,%r12
mov    %edi,%ebp
lea    0xea5(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1060 <my_write@plt>
mov    $0xffffffff,%r14d
cmp    $0xffffffff,%eax
je     1269 <write_page+0x129>
lea    0xe8d(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1060 <my_write@plt>
cmp    $0xffffffff,%eax
je     1269 <write_page+0x129>
mov    %r12,%rdi
call   1040 <strlen@plt>
movslq %eax,%rbx
lea    (%rbx,%r12,1),%r15
add    $0xfffffffffffffffd,%r15
lea    0xe65(%rip),%rsi
mov    %r15,%rdi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     11e2 <write_page+0xa2>
lea    (%rbx,%r12,1),%rdi
add    $0xfffffffffffffffc,%rdi
lea    0xe53(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
jne    1216 <write_page+0xd6>
lea    0xe3c(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1060 <my_write@plt>
cmp    $0xffffffff,%eax
je     1269 <write_page+0x129>
lea    0xe2d(%rip),%rsi
mov    %r15,%rdi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     127c <write_page+0x13c>
lea    0xe31(%rip),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1060 <my_write@plt>
cmp    $0xffffffff,%eax
je     1269 <write_page+0x129>
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x400,%edx
call   1050 <read@plt>
test   %eax,%eax
jle    1266 <write_page+0x126>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1060 <my_write@plt>
cmp    $0xffffffff,%eax
jne    1240 <write_page+0x100>
jmp    1269 <write_page+0x129>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x400,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xdad(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1060 <my_write@plt>
cmp    $0xffffffff,%eax
je     1269 <write_page+0x129>
lea    0xd9d(%rip),%rsi
mov    %r15,%rdi
call   1030 <strcasecmp@plt>
test   %rax,%rax
jne    1216 <write_page+0xd6>
lea    0xd7f(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1060 <my_write@plt>
cmp    $0xffffffff,%eax
je     1269 <write_page+0x129>
lea    0xd69(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1060 <my_write@plt>
cmp    $0xffffffff,%eax
jne    1216 <write_page+0xd6>
jmp    1269 <write_page+0x129>

LLVM IR (-O0):
@.str = [18 x i8] c"HTTP/1.1 200 OK\0D\0A\00"
@.str.1 = [15 x i8] c"Content-Type: \00"
@.str.2 = [4 x i8] c"jpg\00"
@.str.3 = [5 x i8] c"jpeg\00"
@.str.4 = [11 x i8] c"image/jpeg\00"
@.str.5 = [4 x i8] c"gif\00"
@.str.6 = [10 x i8] c"image/gif\00"
@.str.7 = [4 x i8] c"png\00"
@.str.8 = [10 x i8] c"image/png\00"
@.str.9 = [10 x i8] c"text/html\00"
@.str.10 = [5 x i8] c"\0D\0A\0D\0A\00"
define i32 @write_page(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [1024 x i8]
store i32 %0, i32* %4
store i8* %1, i8** %5
%8 = load i32, i32* %4
%9 = call i32 @strlen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @my_write(i32 %8, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 -1, i32* %3
br label %103
13: ; preds = %2
%14 = load i32, i32* %4
%15 = call i32 @strlen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 @my_write(i32 %14, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = icmp eq i32 %16, -1
br i1 %17, label %18, label %19
18: ; preds = %13
store i32 -1, i32* %3
br label %103
19: ; preds = %13
%20 = load i8*, i8** %5
%21 = call i32 @strlen(i8* %20)
store i32 %21, i32* %6
%22 = load i8*, i8** %5
%23 = load i32, i32* %6
%24 = sub nsw i32 %23, 3
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8, i8* %22, i64 %25
%27 = call i64 @strcasecmp(i8* %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %37, label %29
29: ; preds = %19
%30 = load i8*, i8** %5
%31 = load i32, i32* %6
%32 = sub nsw i32 %31, 4
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8, i8* %30, i64 %33
%35 = call i64 @strcasecmp(i8* %34, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %83
37: ; preds = %29, %19
%38 = load i32, i32* %4
%39 = call i32 @strlen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%40 = call i32 @my_write(i32 %38, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 %39)
%41 = icmp eq i32 %40, -1
br i1 %41, label %42, label %43
42: ; preds = %37
store i32 -1, i32* %3
br label %103
43: ; preds = %37
%44 = load i8*, i8** %5
%45 = load i32, i32* %6
%46 = sub nsw i32 %45, 3
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i8, i8* %44, i64 %47
%49 = call i64 @strcasecmp(i8* %48, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %81
51: ; preds = %43
%52 = load i32, i32* %4
%53 = call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%54 = call i32 @my_write(i32 %52, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 %53)
%55 = icmp eq i32 %54, -1
br i1 %55, label %56, label %57
56: ; preds = %51
store i32 -1, i32* %3
br label %103
57: ; preds = %51
%58 = load i8*, i8** %5
%59 = load i32, i32* %6
%60 = sub nsw i32 %59, 3
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i8, i8* %58, i64 %61
%63 = call i64 @strcasecmp(i8* %62, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%64 = icmp eq i64 %63, 0
br i1 %64, label %65, label %79
65: ; preds = %57
%66 = load i32, i32* %4
%67 = call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
%68 = call i32 @my_write(i32 %66, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 %67)
%69 = icmp eq i32 %68, -1
br i1 %69, label %70, label %71
70: ; preds = %65
store i32 -1, i32* %3
br label %103
71: ; preds = %65
%72 = load i32, i32* %4
%73 = call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%74 = call i32 @my_write(i32 %72, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 %73)
%75 = icmp eq i32 %74, -1
br i1 %75, label %76, label %77
76: ; preds = %71
store i32 -1, i32* %3
br label %103
77: ; preds = %71
br label %78
78: ; preds = %77
br label %79
79: ; preds = %78, %57
br label %80
80: ; preds = %79
br label %81
81: ; preds = %80, %43
br label %82
82: ; preds = %81
br label %83
83: ; preds = %82, %29
%84 = load i32, i32* %4
%85 = call i32 @my_write(i32 %84, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i32 4)
%86 = icmp eq i32 %85, -1
br i1 %86, label %87, label %88
87: ; preds = %83
store i32 -1, i32* %3
br label %103
88: ; preds = %83
br label %89
89: ; preds = %101, %88
%90 = load i32, i32* %4
%91 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%92 = call i32 @read(i32 %90, i8* %91, i32 1024)
store i32 %92, i32* %6
%93 = icmp sgt i32 %92, 0
br i1 %93, label %94, label %102
94: ; preds = %89
%95 = load i32, i32* %4
%96 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%97 = load i32, i32* %6
%98 = call i32 @my_write(i32 %95, i8* %96, i32 %97)
%99 = icmp eq i32 %98, -1
br i1 %99, label %100, label %101
100: ; preds = %94
store i32 -1, i32* %3
br label %103
101: ; preds = %94
br label %89
102: ; preds = %89
store i32 0, i32* %3
br label %103
103: ; preds = %102, %100, %87, %76, %70, %56, %42, %18, %12
%104 = load i32, i32* %3
ret i32 %104
}

LLVM IR (-O2):
@.str = [18 x i8] c"HTTP/1.1 200 OK\0D\0A\00"
@.str.1 = [15 x i8] c"Content-Type: \00"
@.str.2 = [4 x i8] c"jpg\00"
@.str.3 = [5 x i8] c"jpeg\00"
@.str.4 = [11 x i8] c"image/jpeg\00"
@.str.5 = [4 x i8] c"gif\00"
@.str.6 = [10 x i8] c"image/gif\00"
@.str.7 = [4 x i8] c"png\00"
@.str.8 = [10 x i8] c"image/png\00"
@.str.9 = [10 x i8] c"text/html\00"
@.str.10 = [5 x i8] c"\0D\0A\0D\0A\00"
define i32 @write_page(i32 %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @strlen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @my_write(i32 %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = icmp eq i32 %6, -1
br i1 %7, label %56, label %8
8: ; preds = %2
%9 = tail call i32 @strlen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 @my_write(i32 %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = icmp eq i32 %10, -1
br i1 %11, label %56, label %12
12: ; preds = %8
%13 = tail call i32 @strlen(i8* %1)
%14 = add nsw i32 %13, -3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %1, i64 %15
%17 = tail call i64 @strcasecmp(i8* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %25, label %19
19: ; preds = %12
%20 = add nsw i32 %13, -4
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %1, i64 %21
%23 = tail call i64 @strcasecmp(i8* %22, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %47
25: ; preds = %19, %12
%26 = tail call i32 @strlen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%27 = tail call i32 @my_write(i32 %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 %26)
%28 = icmp eq i32 %27, -1
br i1 %28, label %56, label %29
29: ; preds = %25
%30 = tail call i64 @strcasecmp(i8* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %47
32: ; preds = %29
%33 = tail call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%34 = tail call i32 @my_write(i32 %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 %33)
%35 = icmp eq i32 %34, -1
br i1 %35, label %56, label %36
36: ; preds = %32
%37 = tail call i64 @strcasecmp(i8* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %47
39: ; preds = %36
%40 = tail call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
%41 = tail call i32 @my_write(i32 %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 %40)
%42 = icmp eq i32 %41, -1
br i1 %42, label %56, label %43
43: ; preds = %39
%44 = tail call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%45 = tail call i32 @my_write(i32 %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 %44)
%46 = icmp eq i32 %45, -1
br i1 %46, label %56, label %47
47: ; preds = %43, %36, %29, %19
%48 = tail call i32 @my_write(i32 %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i32 4)
%49 = icmp eq i32 %48, -1
br i1 %49, label %56, label %50
50: ; preds = %47, %53
%51 = call i32 @read(i32 %0, i8* %4, i32 1024)
%52 = icmp sgt i32 %51, 0
br i1 %52, label %53, label %56
53: ; preds = %50
%54 = call i32 @my_write(i32 %0, i8* %4, i32 %51)
%55 = icmp eq i32 %54, -1
br i1 %55, label %56, label %50
56: ; preds = %50, %53, %47, %43, %39, %32, %25, %8, %2
%57 = phi i32 [ -1, %2 ], [ -1, %8 ], [ -1, %25 ], [ -1, %32 ], [ -1, %39 ], [ -1, %43 ], [ -1, %47 ], [ 0, %50 ], [ -1, %53 ]
ret i32 %57
}