#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 stat {
  scalar_t__ st_size;
};
typedef int /*<<< orphan*/ req;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ cgi_handler(char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
char getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putc(char, int /*<<< orphan*/);
int /*<<< orphan*/ sscanf(char *, char *, char *, int *);
int /*<<< orphan*/ stat(char *, struct stat *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
scalar_t__ strcmp(char *, char *);
int strlen(char *);
int start(void) {
  char ch;
  char req[1024] = "";
  char reqFile[1024] = "";
  int httpVersion;
  FILE *fin;
  int size;
  struct stat bufStat;
  fgets(req, sizeof(req), stdin);
  sscanf(req, "GET /%s HTTP/1.%d", reqFile, &httpVersion);
  stat(reqFile, &bufStat);
  size = (int)bufStat.st_size;
  printf("HTTP/1.%d 200 OK\r\n", httpVersion);
  if (strcmp(reqFile + strlen(reqFile) - 5, ".html") == 0) {
    printf("Content-Type: text/html\r\n\r\n");
  } else if (strcmp(reqFile + strlen(reqFile) - 4, ".jpg") == 0) {
    printf("Content-Type: image/jpeg\r\n");
    printf("Content-Length: %d\r\n\r\n", size);
  } else if (strcmp(reqFile + strlen(reqFile) - 4, ".png") == 0) {
    printf("Content-Type: image/png\r\n");
    printf("Content-Length: %d\r\n\r\n", size);
  } else if (strcmp(reqFile + strlen(reqFile) - 4, ".gif") == 0) {
    printf("Content-Type: image/gif\r\n");
    printf("Content-Length: %d\r\n\r\n", size);
  } else {
    cgi_handler(reqFile);
    return 0;
  }
  fin = fopen(reqFile, "rb");
  while (size--) {
    ch = getc(fin);
    putc(ch, stdout);
  }
  return 0;
}


x86 assembly (clang, -O0):
<start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x850,%rsp
lea    -0x410(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1060 <memset@plt>
lea    -0x810(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1060 <memset@plt>
lea    -0x410(%rbp),%rdi
mov    0x2df9(%rip),%rax
mov    (%rax),%edx
mov    $0x400,%esi
call   1070 <fgets@plt>
lea    -0x410(%rbp),%rdi
lea    -0x810(%rbp),%rdx
lea    0xdf0(%rip),%rsi
lea    -0x814(%rbp),%rcx
call   10b0 <sscanf@plt>
lea    -0x810(%rbp),%rdi
lea    -0x830(%rbp),%rsi
call   10a0 <stat@plt>
mov    -0x830(%rbp),%rax
mov    %eax,-0x824(%rbp)
mov    -0x814(%rbp),%esi
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x810(%rbp),%rax
mov    %rax,-0x838(%rbp)
lea    -0x810(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x838(%rbp),%rdi
cltq
add    %rax,%rdi
add    $0xfffffffffffffffb,%rdi
lea    0xda4(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    12a3 <start+0xf3>
lea    0xd94(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13ff <start+0x24f>
lea    -0x810(%rbp),%rax
mov    %rax,-0x840(%rbp)
lea    -0x810(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x840(%rbp),%rdi
cltq
add    %rax,%rdi
add    $0xfffffffffffffffc,%rdi
lea    0xd73(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    130a <start+0x15a>
lea    0xd62(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x824(%rbp),%esi
lea    0xd69(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13fa <start+0x24a>
lea    -0x810(%rbp),%rax
mov    %rax,-0x848(%rbp)
lea    -0x810(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x848(%rbp),%rdi
cltq
add    %rax,%rdi
add    $0xfffffffffffffffc,%rdi
lea    0xd43(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1371 <start+0x1c1>
lea    0xd32(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x824(%rbp),%esi
lea    0xd02(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13f5 <start+0x245>
lea    -0x810(%rbp),%rax
mov    %rax,-0x850(%rbp)
lea    -0x810(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x850(%rbp),%rdi
cltq
add    %rax,%rdi
add    $0xfffffffffffffffc,%rdi
lea    0xcfb(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    13d8 <start+0x228>
lea    0xcea(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x824(%rbp),%esi
lea    0xc9b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13f0 <start+0x240>
lea    -0x810(%rbp),%rdi
call   1030 <cgi_handler@plt>
movl   $0x0,-0x4(%rbp)
jmp    1462 <start+0x2b2>
jmp    13f5 <start+0x245>
jmp    13fa <start+0x24a>
jmp    13ff <start+0x24f>
lea    -0x810(%rbp),%rdi
lea    0xcaf(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x820(%rbp)
mov    -0x824(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x824(%rbp)
cmp    $0x0,%eax
je     145b <start+0x2ab>
mov    -0x820(%rbp),%rdi
call   10d0 <getc@plt>
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
mov    0x2b8c(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1090 <putc@plt>
jmp    1419 <start+0x269>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x850,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<start>:
push   %r15
push   %r14
push   %rbx
sub    $0x810,%rsp
lea    0x410(%rsp),%rbx
mov    $0x400,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1070 <memset@plt>
lea    0x10(%rsp),%r14
mov    $0x400,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1070 <memset@plt>
mov    0x2dea(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1080 <fgets@plt>
lea    0xdec(%rip),%rsi
lea    0x4(%rsp),%rcx
mov    %rbx,%rdi
mov    %r14,%rdx
call   10c0 <sscanf@plt>
lea    0x8(%rsp),%rsi
mov    %r14,%rdi
call   10b0 <stat@plt>
mov    0x8(%rsp),%ebx
mov    0x4(%rsp),%esi
lea    0xdd2(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
call   1050 <strlen@plt>
cltq
lea    (%rsp,%rax,1),%rdi
add    $0xb,%rdi
lea    0xdc5(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     12e5 <start+0x125>
lea    0x10(%rsp),%rdi
call   1050 <strlen@plt>
cltq
lea    (%rsp,%rax,1),%rdi
add    $0xc,%rdi
lea    0xda6(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     12f3 <start+0x133>
lea    0x10(%rsp),%rdi
call   1050 <strlen@plt>
cltq
lea    (%rsp,%rax,1),%rdi
add    $0xc,%rdi
lea    0xd9d(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     12fc <start+0x13c>
lea    0x10(%rsp),%rdi
call   1050 <strlen@plt>
cltq
lea    (%rsp,%rax,1),%rdi
add    $0xc,%rdi
lea    0xd7d(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1305 <start+0x145>
lea    0x10(%rsp),%rdi
call   1030 <cgi_handler@plt>
jmp    1358 <start+0x198>
lea    0xdb4(%rip),%rdi
call   1040 <puts@plt>
jmp    1321 <start+0x161>
lea    0xd8c(%rip),%rdi
jmp    130c <start+0x14c>
lea    0xd6a(%rip),%rdi
jmp    130c <start+0x14c>
lea    0xd48(%rip),%rdi
call   1040 <puts@plt>
lea    0xd18(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xd29(%rip),%rsi
lea    0x10(%rsp),%rdi
call   10d0 <fopen@plt>
test   %ebx,%ebx
je     1358 <start+0x198>
mov    %rax,%r14
mov    0x2c98(%rip),%r15
mov    %r14,%rdi
call   10e0 <getc@plt>
mov    (%r15),%esi
movsbl %al,%edi
call   10a0 <putc@plt>
add    $0xffffffff,%ebx
jne    1340 <start+0x180>
xor    %eax,%eax
add    $0x810,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
@stdin = global i32 0
@.str = [18 x i8] c"GET /%s HTTP/1.%d\00"
@.str.1 = [19 x i8] c"HTTP/1.%d 200 OK\0D\0A\00"
@.str.2 = [6 x i8] c".html\00"
@.str.3 = [28 x i8] c"Content-Type: text/html\0D\0A\0D\0A\00"
@.str.4 = [5 x i8] c".jpg\00"
@.str.5 = [27 x i8] c"Content-Type: image/jpeg\0D\0A\00"
@.str.6 = [23 x i8] c"Content-Length: %d\0D\0A\0D\0A\00"
@.str.7 = [5 x i8] c".png\00"
@.str.8 = [26 x i8] c"Content-Type: image/png\0D\0A\00"
@.str.9 = [5 x i8] c".gif\00"
@.str.10 = [26 x i8] c"Content-Type: image/gif\0D\0A\00"
@.str.11 = [3 x i8] c"rb\00"
@stdout = global i32 0
define i32 @start() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca [1024 x i8]
%4 = alloca [1024 x i8]
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca %struct.stat
%9 = bitcast [1024 x i8]* %3 to i8*
%10 = bitcast [1024 x i8]* %4 to i8*
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%12 = load i32, i32* @stdin
%13 = call i32 @fgets(i8* %11, i32 1024, i32 %12)
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%15 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%16 = call i32 @sscanf(i8* %14, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %15, i32* %5)
%17 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%18 = call i32 @stat(i8* %17, %struct.stat* %8)
%19 = getelementptr inbounds %struct.stat, %struct.stat* %8, i32 0, i32 0
%20 = load i64, i64* %19
%21 = trunc i64 %20 to i32
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %22)
%24 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%25 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%26 = call i32 @strlen(i8* %25)
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %24, i64 %27
%29 = getelementptr inbounds i8, i8* %28, i64 -5
%30 = call i64 @strcmp(i8* %29, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %0
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
br label %79
34: ; preds = %0
%35 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%36 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%37 = call i32 @strlen(i8* %36)
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8, i8* %35, i64 %38
%40 = getelementptr inbounds i8, i8* %39, i64 -4
%41 = call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %47
43: ; preds = %34
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%45 = load i32, i32* %7
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %45)
br label %78
47: ; preds = %34
%48 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%49 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%50 = call i32 @strlen(i8* %49)
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i8, i8* %48, i64 %51
%53 = getelementptr inbounds i8, i8* %52, i64 -4
%54 = call i64 @strcmp(i8* %53, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %60
56: ; preds = %47
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0))
%58 = load i32, i32* %7
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %58)
br label %77
60: ; preds = %47
%61 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%62 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%63 = call i32 @strlen(i8* %62)
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i8, i8* %61, i64 %64
%66 = getelementptr inbounds i8, i8* %65, i64 -4
%67 = call i64 @strcmp(i8* %66, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%68 = icmp eq i64 %67, 0
br i1 %68, label %69, label %73
69: ; preds = %60
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0))
%71 = load i32, i32* %7
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %71)
br label %76
73: ; preds = %60
%74 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%75 = call i32 @cgi_handler(i8* %74)
store i32 0, i32* %1
br label %93
76: ; preds = %69
br label %77
77: ; preds = %76, %56
br label %78
78: ; preds = %77, %43
br label %79
79: ; preds = %78, %32
%80 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%81 = call i32* @fopen(i8* %80, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
store i32* %81, i32** %6
br label %82
82: ; preds = %86, %79
%83 = load i32, i32* %7
%84 = add nsw i32 %83, -1
store i32 %84, i32* %7
%85 = icmp ne i32 %83, 0
br i1 %85, label %86, label %92
86: ; preds = %82
%87 = load i32*, i32** %6
%88 = call signext i8 @getc(i32* %87)
store i8 %88, i8* %2
%89 = load i8, i8* %2
%90 = load i32, i32* @stdout
%91 = call i32 @putc(i8 signext %89, i32 %90)
br label %82
92: ; preds = %82
store i32 0, i32* %1
br label %93
93: ; preds = %92, %73
%94 = load i32, i32* %1
ret i32 %94
}

LLVM IR (-O2):
%struct.stat = type { i64 }
@stdin = global i32 0
@.str = [18 x i8] c"GET /%s HTTP/1.%d\00"
@.str.1 = [19 x i8] c"HTTP/1.%d 200 OK\0D\0A\00"
@.str.2 = [6 x i8] c".html\00"
@.str.4 = [5 x i8] c".jpg\00"
@.str.6 = [23 x i8] c"Content-Length: %d\0D\0A\0D\0A\00"
@.str.7 = [5 x i8] c".png\00"
@.str.9 = [5 x i8] c".gif\00"
@.str.11 = [3 x i8] c"rb\00"
@stdout = global i32 0
@str = [25 x i8] c"Content-Type: image/gif\0D\00"
@str.12 = [25 x i8] c"Content-Type: image/png\0D\00"
@str.13 = [26 x i8] c"Content-Type: image/jpeg\0D\00"
@str.14 = [27 x i8] c"Content-Type: text/html\0D\0A\0D\00"
define i32 @start() {
%1 = alloca [1024 x i8]
%2 = alloca [1024 x i8]
%3 = alloca i32
%4 = alloca %struct.stat
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%7 = bitcast i32* %3 to i8*
%8 = bitcast %struct.stat* %4 to i8*
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %5, i32 1024, i32 %9)
%11 = call i32 @sscanf(i8* %5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %6, i32* %3)
%12 = call i32 @stat(i8* %6, %struct.stat* %4)
%13 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 0
%14 = load i64, i64* %13
%15 = trunc i64 %14 to i32
%16 = load i32, i32* %3
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %16)
%18 = call i32 @strlen(i8* %6)
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %19
%21 = getelementptr inbounds i8, i8* %20, i64 -5
%22 = call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %0
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.14, i64 0, i64 0))
br label %58
26: ; preds = %0
%27 = call i32 @strlen(i8* %6)
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %28
%30 = getelementptr inbounds i8, i8* %29, i64 -4
%31 = call i64 @strcmp(i8* %30, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %36
33: ; preds = %26
%34 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.13, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %15)
br label %58
36: ; preds = %26
%37 = call i32 @strlen(i8* %6)
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %38
%40 = getelementptr inbounds i8, i8* %39, i64 -4
%41 = call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %46
43: ; preds = %36
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.12, i64 0, i64 0))
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %15)
br label %58
46: ; preds = %36
%47 = call i32 @strlen(i8* %6)
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %48
%50 = getelementptr inbounds i8, i8* %49, i64 -4
%51 = call i64 @strcmp(i8* %50, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%52 = icmp eq i64 %51, 0
br i1 %52, label %53, label %56
53: ; preds = %46
%54 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %15)
br label %58
56: ; preds = %46
%57 = call i32 @cgi_handler(i8* %6)
br label %68
58: ; preds = %33, %53, %43, %24
%59 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%60 = icmp eq i32 %15, 0
br i1 %60, label %68, label %61
61: ; preds = %58, %61
%62 = phi i32 [ %63, %61 ], [ %15, %58 ]
%63 = add nsw i32 %62, -1
%64 = call signext i8 @getc(i32* %59)
%65 = load i32, i32* @stdout
%66 = call i32 @putc(i8 signext %64, i32 %65)
%67 = icmp eq i32 %63, 0
br i1 %67, label %68, label %61
68: ; preds = %61, %58, %56
ret i32 0
}