#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;
};

/* Variables and functions */
int /*<<< orphan*/ MAP_SHARED;
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ O_RDWR;
int PROT_READ;
int PROT_WRITE;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ execlp(char *, char *, char *, char *, char *,
                          int /*<<< orphan*/ *);
int fork();
int /*<<< orphan*/ fstat(int, struct stat *);
int /*<<< orphan*/ ftruncate(int, scalar_t__);
scalar_t__ mmap(int /*<<< orphan*/ *, scalar_t__, int, int /*<<< orphan*/, int,
                int /*<<< orphan*/);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int read(int, char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stat(char *, struct stat *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ system(char *);
void main() {
  system("rm -f mapa.png");
  system("touch mapa.png");
  int fd, plik;
  int i, iter, status, licznik;
  char nazwa[30], bufor[8192];
  char *mapa;
  struct stat filestat;
  int pid = fork();
  if (pid == -1) {
    puts("Stworzenie procesu potomnego nie powiodlo sie.");
    return;
  }
  if (pid == 0) {
    do {
      sleep(2);
      stat("mapa.png", &filestat);
    } while (filestat.st_size == 0);
    execlp("display", "display", "-update", "2", "mapa.png", NULL);
  } else {
    do {
      puts("Podaj nazwe pliku z obrazem:");
      scanf("%s", nazwa);
      plik = open(nazwa, O_RDONLY);
      if (plik != -1) {
        fstat(plik, &filestat);
        fd = open("mapa.png", O_RDWR);
        ftruncate(fd, filestat.st_size);
        mapa = (char *)mmap(NULL, filestat.st_size, PROT_READ | PROT_WRITE,
                            MAP_SHARED, fd, 0);
        iter = 0;
        while ((licznik = read(plik, bufor, 8192)) > 0)
          for (i = 0; i < licznik; i++) {
            mapa[iter] = bufor[i];
            iter++;
          }
        close(plik);
        close(fd);
      } else if (strcmp("koniec", nazwa) != 0)
        puts("Nie udalo sie otworzyc pliku.");
    } while (strcmp("koniec", nazwa) != 0);
  }
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2060,%rsp
lea    0xe0e(%rip),%rdi
call   1050 <system@plt>
lea    0xe11(%rip),%rdi
call   1050 <system@plt>
mov    $0x0,%al
call   1100 <fork@plt>
mov    %eax,-0x2054(%rbp)
cmpl   $0xffffffff,-0x2054(%rbp)
jne    122e <main+0x4e>
lea    0xdfa(%rip),%rdi
call   1030 <puts@plt>
jmp    1420 <main+0x240>
cmpl   $0x0,-0x2054(%rbp)
jne    1299 <main+0xb9>
jmp    1240 <main+0x60>
mov    $0x2,%edi
call   10e0 <sleep@plt>
lea    0xdb5(%rip),%rdi
lea    -0x2050(%rbp),%rsi
call   10a0 <stat@plt>
cmpq   $0x0,-0x2050(%rbp)
je     1240 <main+0x60>
lea    0xddb(%rip),%rsi
lea    0xddc(%rip),%rdx
lea    0xddd(%rip),%rcx
lea    0xd7f(%rip),%r8
xor    %eax,%eax
mov    %eax,%r9d
mov    %rsi,%rdi
call   10d0 <execlp@plt>
jmp    141b <main+0x23b>
jmp    129e <main+0xbe>
lea    0xdba(%rip),%rdi
call   1030 <puts@plt>
lea    -0x40(%rbp),%rsi
lea    0xdc7(%rip),%rdi
call   10b0 <scanf@plt>
lea    -0x40(%rbp),%rdi
mov    0x2d0b(%rip),%rax
mov    (%rax),%esi
call   10c0 <open@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
je     13cc <main+0x1ec>
mov    -0x8(%rbp),%edi
lea    -0x2050(%rbp),%rsi
call   10f0 <fstat@plt>
mov    0x2ce9(%rip),%rax
mov    (%rax),%esi
lea    0xd0e(%rip),%rdi
call   10c0 <open@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x2050(%rbp),%rsi
call   1060 <ftruncate@plt>
mov    -0x2050(%rbp),%rsi
mov    0x2cdb(%rip),%rax
mov    (%rax),%edx
mov    0x2c9a(%rip),%rax
or     (%rax),%edx
mov    0x2cb9(%rip),%rax
mov    (%rax),%ecx
mov    -0x4(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%edi
xor    %r9d,%r9d
call   1040 <mmap@plt>
mov    %rax,-0x2048(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x2040(%rbp),%rsi
mov    $0x2000,%edx
call   1080 <read@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
jle    13b7 <main+0x1d7>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    13b2 <main+0x1d2>
movslq -0xc(%rbp),%rax
mov    -0x2040(%rbp,%rax,1),%dl
mov    -0x2048(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1376 <main+0x196>
jmp    134f <main+0x16f>
mov    -0x8(%rbp),%edi
call   1070 <close@plt>
mov    -0x4(%rbp),%edi
call   1070 <close@plt>
jmp    13f7 <main+0x217>
lea    -0x40(%rbp),%rsi
lea    0xca8(%rip),%rdi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
je     13f2 <main+0x212>
lea    0xc99(%rip),%rdi
call   1030 <puts@plt>
jmp    13f7 <main+0x217>
jmp    13fc <main+0x21c>
lea    -0x40(%rbp),%rsi
lea    0xc78(%rip),%rdi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    129e <main+0xbe>
jmp    141b <main+0x23b>
jmp    1420 <main+0x240>
add    $0x2060,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2038,%rsp
lea    0xdf8(%rip),%rdi
call   1050 <system@plt>
lea    0xdfb(%rip),%rdi
call   1050 <system@plt>
xor    %eax,%eax
call   1110 <fork@plt>
cmp    $0xffffffff,%eax
je     1295 <main+0xa5>
test   %eax,%eax
jne    12b2 <main+0xc2>
lea    0xdd2(%rip),%rbx
lea    0x8(%rsp),%rbp
nopl   0x0(%rax)
mov    $0x2,%edi
call   10f0 <sleep@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10a0 <stat@plt>
cmpq   $0x0,0x8(%rsp)
je     1240 <main+0x50>
lea    0xde9(%rip),%rdi
lea    0xdea(%rip),%rdx
lea    0xdeb(%rip),%rcx
lea    0xd8d(%rip),%r8
mov    %rdi,%rsi
xor    %r9d,%r9d
add    $0x2038,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10e0 <execlp@plt>
lea    0xd82(%rip),%rdi
add    $0x2038,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>
lea    0x10(%rsp),%rbx
lea    0xdc1(%rip),%r14
lea    0x30(%rsp),%rbp
jmp    1300 <main+0x110>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r13d,%edi
call   1070 <close@plt>
mov    %r14d,%edi
call   1070 <close@plt>
lea    0x10(%rsp),%rbx
lea    0xd93(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1425 <main+0x235>
lea    0xd58(%rip),%rdi
call   1030 <puts@plt>
lea    0xd69(%rip),%rdi
mov    %rbx,%rsi
call   10c0 <scanf@plt>
mov    0x2cae(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   10d0 <open@plt>
cmp    $0xffffffff,%eax
je     1400 <main+0x210>
mov    %eax,%r13d
mov    %eax,%edi
lea    0x8(%rsp),%rsi
call   1100 <fstat@plt>
mov    0x2c8d(%rip),%rax
mov    (%rax),%esi
lea    0xcb2(%rip),%rdi
call   10d0 <open@plt>
mov    %eax,%r14d
mov    0x8(%rsp),%rbx
mov    %eax,%edi
mov    %rbx,%rsi
call   1060 <ftruncate@plt>
mov    0x2c4e(%rip),%rax
mov    (%rax),%edx
mov    0x2c7d(%rip),%rax
or     (%rax),%edx
mov    0x2c64(%rip),%rax
mov    (%rax),%ecx
xor    %edi,%edi
mov    %rbx,%rsi
mov    %r14d,%r8d
xor    %r9d,%r9d
call   1040 <mmap@plt>
mov    %rax,%r15
mov    %r13d,%edi
mov    %rbp,%rsi
mov    $0x2000,%edx
call   1080 <read@plt>
test   %eax,%eax
jle    12d0 <main+0xe0>
mov    %eax,%r12d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movslq %ebx,%rbx
lea    (%r15,%rbx,1),%rdi
mov    %r12d,%edx
mov    %rbp,%rsi
call   10b0 <memcpy@plt>
add    %r12d,%ebx
mov    %r13d,%edi
mov    %rbp,%rsi
mov    $0x2000,%edx
call   1080 <read@plt>
mov    %eax,%r12d
test   %eax,%eax
jg     13c0 <main+0x1d0>
jmp    12d0 <main+0xe0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     12ec <main+0xfc>
lea    0xc6b(%rip),%rdi
call   1030 <puts@plt>
jmp    12ec <main+0xfc>
add    $0x2038,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
@.str = [15 x i8] c"rm -f mapa.png\00"
@.str.1 = [15 x i8] c"touch mapa.png\00"
@.str.2 = [47 x i8] c"Stworzenie procesu potomnego nie powiodlo sie.\00"
@.str.3 = [9 x i8] c"mapa.png\00"
@.str.4 = [8 x i8] c"display\00"
@.str.5 = [8 x i8] c"-update\00"
@.str.6 = [2 x i8] c"2\00"
@.str.7 = [29 x i8] c"Podaj nazwe pliku z obrazem:\00"
@.str.8 = [3 x i8] c"%s\00"
@O_RDONLY = global i32 0
@O_RDWR = global i32 0
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@.str.9 = [7 x i8] c"koniec\00"
@.str.10 = [30 x i8] c"Nie udalo sie otworzyc pliku.\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [30 x i8]
%8 = alloca [8192 x i8]
%9 = alloca i8*
%10 = alloca %struct.stat
%11 = alloca i32
%12 = call i32 @system(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @system(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 (...) @fork()
store i32 %14, i32* %11
%15 = load i32, i32* %11
%16 = icmp eq i32 %15, -1
br i1 %16, label %17, label %19
17: ; preds = %0
%18 = call i32 @puts(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
br label %104
19: ; preds = %0
%20 = load i32, i32* %11
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %32
22: ; preds = %19
br label %23
23: ; preds = %26, %22
%24 = call i32 @sleep(i32 2)
%25 = call i32 @stat(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), %struct.stat* %10)
br label %26
26: ; preds = %23
%27 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 0
%28 = load i64, i64* %27
%29 = icmp eq i64 %28, 0
br i1 %29, label %23, label %30
30: ; preds = %26
%31 = call i32 @execlp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32* null)
br label %103
32: ; preds = %19
br label %33
33: ; preds = %98, %32
%34 = call i32 @puts(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
%35 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%36 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* %35)
%37 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%38 = load i32, i32* @O_RDONLY
%39 = call i32 @open(i8* %37, i32 %38)
store i32 %39, i32* %2
%40 = load i32, i32* %2
%41 = icmp ne i32 %40, -1
br i1 %41, label %42, label %90
42: ; preds = %33
%43 = load i32, i32* %2
%44 = call i32 @fstat(i32 %43, %struct.stat* %10)
%45 = load i32, i32* @O_RDWR
%46 = call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %45)
store i32 %46, i32* %1
%47 = load i32, i32* %1
%48 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 0
%49 = load i64, i64* %48
%50 = call i32 @ftruncate(i32 %47, i64 %49)
%51 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 0
%52 = load i64, i64* %51
%53 = load i32, i32* @PROT_READ
%54 = load i32, i32* @PROT_WRITE
%55 = or i32 %53, %54
%56 = load i32, i32* @MAP_SHARED
%57 = load i32, i32* %1
%58 = call i64 @mmap(i32* null, i64 %52, i32 %55, i32 %56, i32 %57, i32 0)
%59 = inttoptr i64 %58 to i8*
store i8* %59, i8** %9
store i32 0, i32* %4
br label %60
60: ; preds = %84, %42
%61 = load i32, i32* %2
%62 = getelementptr inbounds [8192 x i8], [8192 x i8]* %8, i64 0, i64 0
%63 = call i32 @read(i32 %61, i8* %62, i32 8192)
store i32 %63, i32* %6
%64 = icmp sgt i32 %63, 0
br i1 %64, label %65, label %85
65: ; preds = %60
store i32 0, i32* %3
br label %66
66: ; preds = %81, %65
%67 = load i32, i32* %3
%68 = load i32, i32* %6
%69 = icmp slt i32 %67, %68
br i1 %69, label %70, label %84
70: ; preds = %66
%71 = load i32, i32* %3
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [8192 x i8], [8192 x i8]* %8, i64 0, i64 %72
%74 = load i8, i8* %73
%75 = load i8*, i8** %9
%76 = load i32, i32* %4
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds i8, i8* %75, i64 %77
store i8 %74, i8* %78
%79 = load i32, i32* %4
%80 = add nsw i32 %79, 1
store i32 %80, i32* %4
br label %81
81: ; preds = %70
%82 = load i32, i32* %3
%83 = add nsw i32 %82, 1
store i32 %83, i32* %3
br label %66
84: ; preds = %66
br label %60
85: ; preds = %60
%86 = load i32, i32* %2
%87 = call i32 @close(i32 %86)
%88 = load i32, i32* %1
%89 = call i32 @close(i32 %88)
br label %97
90: ; preds = %33
%91 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%92 = call i64 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* %91)
%93 = icmp ne i64 %92, 0
br i1 %93, label %94, label %96
94: ; preds = %90
%95 = call i32 @puts(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0))
br label %96
96: ; preds = %94, %90
br label %97
97: ; preds = %96, %85
br label %98
98: ; preds = %97
%99 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%100 = call i64 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* %99)
%101 = icmp ne i64 %100, 0
br i1 %101, label %33, label %102
102: ; preds = %98
br label %103
103: ; preds = %102, %30
br label %104
104: ; preds = %103, %17
ret void
}

LLVM IR (-O2):
%struct.stat = type { i64 }
@.str = [15 x i8] c"rm -f mapa.png\00"
@.str.1 = [15 x i8] c"touch mapa.png\00"
@.str.2 = [47 x i8] c"Stworzenie procesu potomnego nie powiodlo sie.\00"
@.str.3 = [9 x i8] c"mapa.png\00"
@.str.4 = [8 x i8] c"display\00"
@.str.5 = [8 x i8] c"-update\00"
@.str.6 = [2 x i8] c"2\00"
@.str.7 = [29 x i8] c"Podaj nazwe pliku z obrazem:\00"
@.str.8 = [3 x i8] c"%s\00"
@O_RDONLY = global i32 0
@O_RDWR = global i32 0
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@.str.9 = [7 x i8] c"koniec\00"
@.str.10 = [30 x i8] c"Nie udalo sie otworzyc pliku.\00"
define void @main() {
%1 = alloca [30 x i8]
%2 = alloca [8192 x i8]
%3 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%4 = alloca %struct.stat
%5 = tail call i32 @system(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @system(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%7 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%8 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%9 = bitcast %struct.stat* %4 to i8*
%10 = tail call i32 (...) @fork()
switch i32 %10, label %13 [
i32 -1, label %15
i32 0, label %11
]
11: ; preds = %0
%12 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 0
br label %17
13: ; preds = %0
%14 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 0
br label %24
15: ; preds = %0
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
br label %64
17: ; preds = %11, %17
%18 = tail call i32 @sleep(i32 2)
%19 = call i32 @stat(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), %struct.stat* %4)
%20 = load i64, i64* %12
%21 = icmp eq i64 %20, 0
br i1 %21, label %17, label %22
22: ; preds = %17
%23 = tail call i32 @execlp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32* null)
br label %64
24: ; preds = %13, %61
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* %7)
%27 = load i32, i32* @O_RDONLY
%28 = call i32 @open(i8* %7, i32 %27)
%29 = icmp eq i32 %28, -1
br i1 %29, label %56, label %30
30: ; preds = %24
%31 = call i32 @fstat(i32 %28, %struct.stat* %4)
%32 = load i32, i32* @O_RDWR
%33 = call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %32)
%34 = load i64, i64* %14
%35 = call i32 @ftruncate(i32 %33, i64 %34)
%36 = load i32, i32* @PROT_READ
%37 = load i32, i32* @PROT_WRITE
%38 = or i32 %37, %36
%39 = load i32, i32* @MAP_SHARED
%40 = call i64 @mmap(i32* null, i64 %34, i32 %38, i32 %39, i32 %33, i32 0)
%41 = inttoptr i64 %40 to i8*
%42 = call i32 @read(i32 %28, i8* %8, i32 8192)
%43 = icmp sgt i32 %42, 0
br i1 %43, label %44, label %53
44: ; preds = %30, %44
%45 = phi i32 [ %51, %44 ], [ %42, %30 ]
%46 = phi i32 [ %50, %44 ], [ 0, %30 ]
%47 = sext i32 %46 to i64
%48 = getelementptr i8, i8* %41, i64 %47
%49 = zext i32 %45 to i64
%50 = add i32 %46, %45
%51 = call i32 @read(i32 %28, i8* %8, i32 8192)
%52 = icmp sgt i32 %51, 0
br i1 %52, label %44, label %53
53: ; preds = %44, %30
%54 = call i32 @close(i32 %28)
%55 = call i32 @close(i32 %33)
br label %61
56: ; preds = %24
%57 = call i64 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* %7)
%58 = icmp eq i64 %57, 0
br i1 %58, label %61, label %59
59: ; preds = %56
%60 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0))
br label %61
61: ; preds = %53, %59, %56
%62 = call i64 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* %7)
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %24
64: ; preds = %61, %22, %15
ret void
}