#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 atoi(char *);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
char getchar();
int /*<<< orphan*/ pipe(int *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ read(int, char *, int);
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char *argv[]) {
  int fd_in[2], fd_out[2], fd_between[2], i;
  char c;
  int ile = atoi(argv[1]);
  pipe(fd_in);
  pipe(fd_out);
  pipe(fd_between);
  if (fork() > 0) {
    close(fd_out[1]);
    close(fd_between[0]);
    for (i = 0; i < ile; i++) {
      read(fd_out[0], &c, 1);
      printf("[sub1] = %c \n", c);
      c += 1;
      write(fd_between[1], &c, 1);
    }
    close(fd_out[0]);
    close(fd_between[1]);
    exit(0);
  }
  if (fork() > 0) {
    close(fd_in[0]);
    close(fd_between[1]);
    for (i = 0; i < ile; i++) {
      read(fd_between[0], &c, 1);
      printf("[sub2] = %c \n", c);
      c += 1;
      write(fd_in[1], &c, 1);
    }
    close(fd_in[1]);
    close(fd_between[0]);
    exit(0);
  }
  close(fd_out[0]);
  close(fd_in[1]);
  close(fd_between[0]);
  close(fd_between[1]);
  printf("Podaj znak: ");
  c = getchar();
  for (i = 0; i < ile; i++) {
    write(fd_out[1], &c, 1);
    c += 1;
    read(fd_in[0], &c, 1);
  }
  printf("[main] = %c \n", c);
  close(fd_out[0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x34(%rbp)
lea    -0x18(%rbp),%rdi
call   1060 <pipe@plt>
lea    -0x20(%rbp),%rdi
call   1060 <pipe@plt>
lea    -0x28(%rbp),%rdi
call   1060 <pipe@plt>
mov    $0x0,%al
call   10b0 <fork@plt>
cmp    $0x0,%rax
jle    1268 <main+0xd8>
mov    -0x1c(%rbp),%edi
call   1050 <close@plt>
mov    -0x28(%rbp),%edi
call   1050 <close@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1251 <main+0xc1>
mov    -0x20(%rbp),%edi
lea    -0x2d(%rbp),%rsi
mov    $0x1,%edx
call   1070 <read@plt>
movsbl -0x2d(%rbp),%esi
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsbl -0x2d(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x2d(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x2d(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11f9 <main+0x69>
mov    -0x20(%rbp),%edi
call   1050 <close@plt>
mov    -0x24(%rbp),%edi
call   1050 <close@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
mov    $0x0,%al
call   10b0 <fork@plt>
cmp    $0x0,%rax
jle    12ff <main+0x16f>
mov    -0x18(%rbp),%edi
call   1050 <close@plt>
mov    -0x24(%rbp),%edi
call   1050 <close@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    12e8 <main+0x158>
mov    -0x28(%rbp),%edi
lea    -0x2d(%rbp),%rsi
mov    $0x1,%edx
call   1070 <read@plt>
movsbl -0x2d(%rbp),%esi
lea    0xd56(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsbl -0x2d(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x2d(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x2d(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1290 <main+0x100>
mov    -0x14(%rbp),%edi
call   1050 <close@plt>
mov    -0x28(%rbp),%edi
call   1050 <close@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
mov    -0x20(%rbp),%edi
call   1050 <close@plt>
mov    -0x14(%rbp),%edi
call   1050 <close@plt>
mov    -0x28(%rbp),%edi
call   1050 <close@plt>
mov    -0x24(%rbp),%edi
call   1050 <close@plt>
lea    0xcf6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1080 <getchar@plt>
mov    %al,-0x2d(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1384 <main+0x1f4>
mov    -0x1c(%rbp),%edi
lea    -0x2d(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
movsbl -0x2d(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x2d(%rbp)
mov    -0x18(%rbp),%edi
lea    -0x2d(%rbp),%rsi
mov    $0x1,%edx
call   1070 <read@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    133e <main+0x1ae>
movsbl -0x2d(%rbp),%esi
lea    0xc9a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%edi
call   1050 <close@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    0x8(%rsi),%rdi
call   1090 <atoi@plt>
mov    %eax,%ebp
lea    0x20(%rsp),%rdi
call   1060 <pipe@plt>
lea    0x18(%rsp),%rdi
call   1060 <pipe@plt>
lea    0x10(%rsp),%rdi
call   1060 <pipe@plt>
xor    %eax,%eax
call   10b0 <fork@plt>
test   %rax,%rax
jg     128a <main+0xfa>
xor    %eax,%eax
call   10b0 <fork@plt>
test   %rax,%rax
jg     12fe <main+0x16e>
mov    0x18(%rsp),%edi
call   1050 <close@plt>
mov    0x24(%rsp),%edi
call   1050 <close@plt>
mov    0x10(%rsp),%edi
call   1050 <close@plt>
mov    0x14(%rsp),%edi
call   1050 <close@plt>
lea    0xe0e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1080 <getchar@plt>
mov    %eax,%ebx
mov    %al,0xf(%rsp)
test   %ebp,%ebp
jle    1263 <main+0xd3>
lea    0xf(%rsp),%r14
nopl   0x0(%rax,%rax,1)
mov    0x1c(%rsp),%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x1,%bl
mov    %bl,0xf(%rsp)
mov    0x20(%rsp),%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1070 <read@plt>
movzbl 0xf(%rsp),%ebx
add    $0xffffffff,%ebp
jne    1230 <main+0xa0>
movsbl %bl,%esi
lea    0xdbc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rsp),%edi
call   1050 <close@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x1c(%rsp),%edi
call   1050 <close@plt>
mov    0x10(%rsp),%edi
call   1050 <close@plt>
test   %ebp,%ebp
jle    12ef <main+0x15f>
lea    0xf(%rsp),%r14
lea    0xd54(%rip),%r15
nopl   0x0(%rax)
mov    0x18(%rsp),%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1070 <read@plt>
movsbl 0xf(%rsp),%ebx
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1(%rbx),%eax
mov    %al,0xf(%rsp)
mov    0x14(%rsp),%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0xffffffff,%ebp
jne    12b0 <main+0x120>
mov    0x18(%rsp),%edi
call   1050 <close@plt>
mov    0x14(%rsp),%edi
jmp    136c <main+0x1dc>
mov    0x20(%rsp),%edi
call   1050 <close@plt>
mov    0x14(%rsp),%edi
call   1050 <close@plt>
test   %ebp,%ebp
jle    135f <main+0x1cf>
lea    0xf(%rsp),%r14
lea    0xcee(%rip),%r15
mov    0x10(%rsp),%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1070 <read@plt>
movsbl 0xf(%rsp),%ebx
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1(%rbx),%eax
mov    %al,0xf(%rsp)
mov    0x24(%rsp),%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0xffffffff,%ebp
jne    1320 <main+0x190>
mov    0x24(%rsp),%edi
call   1050 <close@plt>
mov    0x10(%rsp),%edi
call   1050 <close@plt>
xor    %edi,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"[sub1] = %c \0A\00"
@.str.1 = [14 x i8] c"[sub2] = %c \0A\00"
@.str.2 = [13 x i8] c"Podaj znak: \00"
@.str.3 = [14 x i8] c"[main] = %c \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x i32]
%7 = alloca [2 x i32]
%8 = alloca [2 x i32]
%9 = alloca i32
%10 = alloca i8
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @atoi(i8* %14)
store i32 %15, i32* %11
%16 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%17 = call i32 @pipe(i32* %16)
%18 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%19 = call i32 @pipe(i32* %18)
%20 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%21 = call i32 @pipe(i32* %20)
%22 = call i64 (...) @fork()
%23 = icmp sgt i64 %22, 0
br i1 %23, label %24, label %60
24: ; preds = %2
%25 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%26 = load i32, i32* %25
%27 = call i32 @close(i32 %26)
%28 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%29 = load i32, i32* %28
%30 = call i32 @close(i32 %29)
store i32 0, i32* %9
br label %31
31: ; preds = %49, %24
%32 = load i32, i32* %9
%33 = load i32, i32* %11
%34 = icmp slt i32 %32, %33
br i1 %34, label %35, label %52
35: ; preds = %31
%36 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%37 = load i32, i32* %36
%38 = call i32 @read(i32 %37, i8* %10, i32 1)
%39 = load i8, i8* %10
%40 = sext i8 %39 to i32
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %40)
%42 = load i8, i8* %10
%43 = sext i8 %42 to i32
%44 = add nsw i32 %43, 1
%45 = trunc i32 %44 to i8
store i8 %45, i8* %10
%46 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
%47 = load i32, i32* %46
%48 = call i32 @write(i32 %47, i8* %10, i32 1)
br label %49
49: ; preds = %35
%50 = load i32, i32* %9
%51 = add nsw i32 %50, 1
store i32 %51, i32* %9
br label %31
52: ; preds = %31
%53 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%54 = load i32, i32* %53
%55 = call i32 @close(i32 %54)
%56 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
%57 = load i32, i32* %56
%58 = call i32 @close(i32 %57)
%59 = call i32 @exit(i32 0)
unreachable
60: ; preds = %2
%61 = call i64 (...) @fork()
%62 = icmp sgt i64 %61, 0
br i1 %62, label %63, label %99
63: ; preds = %60
%64 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%65 = load i32, i32* %64
%66 = call i32 @close(i32 %65)
%67 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
%68 = load i32, i32* %67
%69 = call i32 @close(i32 %68)
store i32 0, i32* %9
br label %70
70: ; preds = %88, %63
%71 = load i32, i32* %9
%72 = load i32, i32* %11
%73 = icmp slt i32 %71, %72
br i1 %73, label %74, label %91
74: ; preds = %70
%75 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%76 = load i32, i32* %75
%77 = call i32 @read(i32 %76, i8* %10, i32 1)
%78 = load i8, i8* %10
%79 = sext i8 %78 to i32
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %79)
%81 = load i8, i8* %10
%82 = sext i8 %81 to i32
%83 = add nsw i32 %82, 1
%84 = trunc i32 %83 to i8
store i8 %84, i8* %10
%85 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%86 = load i32, i32* %85
%87 = call i32 @write(i32 %86, i8* %10, i32 1)
br label %88
88: ; preds = %74
%89 = load i32, i32* %9
%90 = add nsw i32 %89, 1
store i32 %90, i32* %9
br label %70
91: ; preds = %70
%92 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%93 = load i32, i32* %92
%94 = call i32 @close(i32 %93)
%95 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%96 = load i32, i32* %95
%97 = call i32 @close(i32 %96)
%98 = call i32 @exit(i32 0)
unreachable
99: ; preds = %60
%100 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%101 = load i32, i32* %100
%102 = call i32 @close(i32 %101)
%103 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%104 = load i32, i32* %103
%105 = call i32 @close(i32 %104)
%106 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%107 = load i32, i32* %106
%108 = call i32 @close(i32 %107)
%109 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
%110 = load i32, i32* %109
%111 = call i32 @close(i32 %110)
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%113 = call signext i8 (...) @getchar()
store i8 %113, i8* %10
store i32 0, i32* %9
br label %114
114: ; preds = %129, %99
%115 = load i32, i32* %9
%116 = load i32, i32* %11
%117 = icmp slt i32 %115, %116
br i1 %117, label %118, label %132
118: ; preds = %114
%119 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%120 = load i32, i32* %119
%121 = call i32 @write(i32 %120, i8* %10, i32 1)
%122 = load i8, i8* %10
%123 = sext i8 %122 to i32
%124 = add nsw i32 %123, 1
%125 = trunc i32 %124 to i8
store i8 %125, i8* %10
%126 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%127 = load i32, i32* %126
%128 = call i32 @read(i32 %127, i8* %10, i32 1)
br label %129
129: ; preds = %118
%130 = load i32, i32* %9
%131 = add nsw i32 %130, 1
store i32 %131, i32* %9
br label %114
132: ; preds = %114
%133 = load i8, i8* %10
%134 = sext i8 %133 to i32
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %134)
%136 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%137 = load i32, i32* %136
%138 = call i32 @close(i32 %137)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"[sub1] = %c \0A\00"
@.str.1 = [14 x i8] c"[sub2] = %c \0A\00"
@.str.2 = [13 x i8] c"Podaj znak: \00"
@.str.3 = [14 x i8] c"[main] = %c \0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [2 x i32]
%4 = alloca [2 x i32]
%5 = alloca [2 x i32]
%6 = alloca i8
%7 = bitcast [2 x i32]* %3 to i8*
%8 = bitcast [2 x i32]* %4 to i8*
%9 = bitcast [2 x i32]* %5 to i8*
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @atoi(i8* %11)
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%14 = call i32 @pipe(i32* %13)
%15 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%16 = call i32 @pipe(i32* %15)
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%18 = call i32 @pipe(i32* %17)
%19 = call i64 (...) @fork()
%20 = icmp sgt i64 %19, 0
br i1 %20, label %21, label %49
21: ; preds = %2
%22 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
%23 = load i32, i32* %22
%24 = call i32 @close(i32 %23)
%25 = load i32, i32* %17
%26 = call i32 @close(i32 %25)
%27 = icmp sgt i32 %12, 0
br i1 %27, label %28, label %42
28: ; preds = %21
%29 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
br label %30
30: ; preds = %28, %30
%31 = phi i32 [ 0, %28 ], [ %40, %30 ]
%32 = load i32, i32* %15
%33 = call i32 @read(i32 %32, i8* %6, i32 1)
%34 = load i8, i8* %6
%35 = sext i8 %34 to i32
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %35)
%37 = add i8 %34, 1
store i8 %37, i8* %6
%38 = load i32, i32* %29
%39 = call i32 @write(i32 %38, i8* %6, i32 1)
%40 = add nuw nsw i32 %31, 1
%41 = icmp eq i32 %40, %12
br i1 %41, label %42, label %30
42: ; preds = %30, %21
%43 = load i32, i32* %15
%44 = call i32 @close(i32 %43)
%45 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
%46 = load i32, i32* %45
%47 = call i32 @close(i32 %46)
%48 = call i32 @exit(i32 0)
unreachable
49: ; preds = %2
%50 = call i64 (...) @fork()
%51 = icmp sgt i64 %50, 0
br i1 %51, label %52, label %80
52: ; preds = %49
%53 = load i32, i32* %13
%54 = call i32 @close(i32 %53)
%55 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
%56 = load i32, i32* %55
%57 = call i32 @close(i32 %56)
%58 = icmp sgt i32 %12, 0
br i1 %58, label %59, label %73
59: ; preds = %52
%60 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
br label %61
61: ; preds = %59, %61
%62 = phi i32 [ 0, %59 ], [ %71, %61 ]
%63 = load i32, i32* %17
%64 = call i32 @read(i32 %63, i8* %6, i32 1)
%65 = load i8, i8* %6
%66 = sext i8 %65 to i32
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %66)
%68 = add i8 %65, 1
store i8 %68, i8* %6
%69 = load i32, i32* %60
%70 = call i32 @write(i32 %69, i8* %6, i32 1)
%71 = add nuw nsw i32 %62, 1
%72 = icmp eq i32 %71, %12
br i1 %72, label %73, label %61
73: ; preds = %61, %52
%74 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%75 = load i32, i32* %74
%76 = call i32 @close(i32 %75)
%77 = load i32, i32* %17
%78 = call i32 @close(i32 %77)
%79 = call i32 @exit(i32 0)
unreachable
80: ; preds = %49
%81 = load i32, i32* %15
%82 = call i32 @close(i32 %81)
%83 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%84 = load i32, i32* %83
%85 = call i32 @close(i32 %84)
%86 = load i32, i32* %17
%87 = call i32 @close(i32 %86)
%88 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
%89 = load i32, i32* %88
%90 = call i32 @close(i32 %89)
%91 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%92 = call signext i8 (...) @getchar()
store i8 %92, i8* %6
%93 = icmp sgt i32 %12, 0
br i1 %93, label %94, label %107
94: ; preds = %80
%95 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
br label %96
96: ; preds = %96, %94
%97 = phi i8 [ %92, %94 ], [ %106, %96 ]
%98 = phi i32 [ 0, %94 ], [ %104, %96 ]
%99 = load i32, i32* %95
%100 = call i32 @write(i32 %99, i8* %6, i32 1)
%101 = add i8 %97, 1
store i8 %101, i8* %6
%102 = load i32, i32* %13
%103 = call i32 @read(i32 %102, i8* %6, i32 1)
%104 = add nuw nsw i32 %98, 1
%105 = icmp eq i32 %104, %12
%106 = load i8, i8* %6
br i1 %105, label %107, label %96
107: ; preds = %96, %80
%108 = phi i8 [ %92, %80 ], [ %106, %96 ]
%109 = sext i8 %108 to i32
%110 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %109)
%111 = load i32, i32* %15
%112 = call i32 @close(i32 %111)
ret i32 0
}