#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ FLine(int /*<<< orphan*/ *);
int /*<<< orphan*/ FLineSpace(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
scalar_t__ intExists(int, int *, int);
int intLoc(int, int *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ printfArr(int *, int);
int strtoi(int /*<<< orphan*/);
int /*<<< orphan*/ zero(int *, int);
int main(void) {
  FILE *fl = fopen("crossroad.in", "r");
  FILE *fout = fopen("crossroad.out", "w");
  int logs = strtoi(FLine(fl));
  int id[logs];
  int side[logs];
  int numCross[logs];
  int i;
  int cow;
  int pos;
  int cowSide;
  int cowLoc;
  int crossings = 0;
  zero(id, logs);
  pos = 0;
  while (pos < logs) {
    *(side + pos) = 2;
    pos++;
  }
  zero(numCross, logs);
  printfArr(id, logs);
  printf("\n");
  printfArr(side, logs);
  printf("\n");
  printfArr(numCross, logs);
  printf("\n");
  for (i = 0; i < logs; i++) {
    cow = strtoi(FLineSpace(fl));
    cowSide = strtoi(FLine(fl));
    printf("Cow: %d; side: %d\n", cow, cowSide);
    if (intExists(cow, id, logs) == 0) {
      pos = 0;
      while (*(id + pos) != 0) {
        pos++;
      }
      *(id + pos) = cow;
      if (*(side + pos) == 2) {
        *(side + pos) = cowSide;
      } else {
        if (*(side + pos) != cowSide) {
          *(numCross + pos) += 1;
          *(side + pos) = cowSide;
        }
      }
    } else {
      cowLoc = intLoc(cow, id);
      if (*(side + cowLoc) != cowSide) {
        *(numCross + cowLoc) += 1;
        *(side + cowLoc) = cowSide;
      }
    }
  }
  printfArr(id, logs);
  printf("\n");
  printfArr(side, logs);
  printf("\n");
  printfArr(numCross, logs);
  printf("\n");
  pos = 0;
  while (pos < logs) {
    crossings += *(numCross + pos);
    pos++;
  }
  printf("Crossings confirmed: %d\n", crossings);
  fprintf(fout, "%d\n", crossings);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe4a(%rip),%rdi
lea    0xe50(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
lea    0xe42(%rip),%rdi
lea    0xe49(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <FLine@plt>
mov    %eax,%edi
call   1040 <strtoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x70(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x1c(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x68(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
mov    -0x1c(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x60(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x58(%rbp)
mov    -0x1c(%rbp),%esi
call   1070 <zero@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1296 <main+0xf6>
mov    -0x68(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movl   $0x2,(%rax,%rcx,4)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    126d <main+0xcd>
mov    -0x60(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1070 <zero@plt>
mov    -0x70(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   10b0 <printfArr@plt>
lea    0xd94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x68(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   10b0 <printfArr@plt>
lea    0xd7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x60(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   10b0 <printfArr@plt>
lea    0xd60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1449 <main+0x2a9>
mov    -0x10(%rbp),%rdi
call   1090 <FLineSpace@plt>
mov    %eax,%edi
call   1040 <strtoi@plt>
mov    %eax,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <FLine@plt>
mov    %eax,%edi
call   1040 <strtoi@plt>
mov    %eax,-0x50(%rbp)
mov    -0x48(%rbp),%esi
mov    -0x50(%rbp),%edx
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x70(%rbp),%rsi
mov    -0x48(%rbp),%edi
mov    -0x1c(%rbp),%edx
call   10a0 <intExists@plt>
cmp    $0x0,%rax
jne    13ed <main+0x24d>
movl   $0x0,-0x4c(%rbp)
mov    -0x70(%rbp),%rax
movslq -0x4c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     137d <main+0x1dd>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    135d <main+0x1bd>
mov    -0x68(%rbp),%rax
mov    -0x70(%rbp),%rcx
mov    -0x48(%rbp),%esi
movslq -0x4c(%rbp),%rdx
mov    %esi,(%rcx,%rdx,4)
movslq -0x4c(%rbp),%rcx
cmpl   $0x2,(%rax,%rcx,4)
jne    13b0 <main+0x210>
mov    -0x68(%rbp),%rax
mov    -0x50(%rbp),%edx
movslq -0x4c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    13e8 <main+0x248>
mov    -0x68(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x50(%rbp),%eax
je     13e3 <main+0x243>
mov    -0x68(%rbp),%rax
mov    -0x60(%rbp),%rcx
movslq -0x4c(%rbp),%rdx
mov    (%rcx,%rdx,4),%esi
add    $0x1,%esi
mov    %esi,(%rcx,%rdx,4)
mov    -0x50(%rbp),%edx
movslq -0x4c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    13e8 <main+0x248>
jmp    1436 <main+0x296>
mov    -0x70(%rbp),%rsi
mov    -0x48(%rbp),%edi
call   10c0 <intLoc@plt>
mov    %eax,%ecx
mov    -0x68(%rbp),%rax
mov    %ecx,-0x54(%rbp)
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x50(%rbp),%eax
je     1431 <main+0x291>
mov    -0x68(%rbp),%rax
mov    -0x60(%rbp),%rcx
movslq -0x54(%rbp),%rdx
mov    (%rcx,%rdx,4),%esi
add    $0x1,%esi
mov    %esi,(%rcx,%rdx,4)
mov    -0x50(%rbp),%edx
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    1436 <main+0x296>
jmp    143b <main+0x29b>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12f7 <main+0x157>
mov    -0x70(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   10b0 <printfArr@plt>
lea    0xbed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x68(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   10b0 <printfArr@plt>
lea    0xbd3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x60(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   10b0 <printfArr@plt>
lea    0xbb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    14c9 <main+0x329>
mov    -0x60(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x58(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    149e <main+0x2fe>
mov    -0x58(%rbp),%esi
lea    0xb5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x58(%rbp),%edx
lea    0xb5f(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xe48(%rip),%rdi
lea    0xe4e(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
lea    0xe41(%rip),%rdi
lea    0xe48(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x38(%rbp)
mov    %rbx,-0x50(%rbp)
mov    %rbx,%rdi
call   1070 <FLine@plt>
mov    %eax,%edi
call   1050 <strtoi@plt>
mov    %eax,%r14d
mov    %eax,%r12d
lea    0xf(,%r12,4),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rsp,%r15
sub    %rax,%r15
mov    %r15,%rsp
mov    %rsp,%r13
sub    %rax,%r13
mov    %r13,%rsp
mov    %rbx,%rdi
mov    %r14d,%esi
call   1080 <zero@plt>
test   %r14d,%r14d
mov    %r15,-0x30(%rbp)
jle    1257 <main+0xa7>
cmp    $0x8,%r12d
jae    1305 <main+0x155>
xor    %eax,%eax
mov    -0x30(%rbp),%r14
jmp    1450 <main+0x2a0>
mov    %r13,%rdi
mov    %r12d,%esi
call   1080 <zero@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
call   10c0 <printfArr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
mov    %r12d,%esi
call   10c0 <printfArr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r13,-0x40(%rbp)
mov    %r13,%rdi
mov    %r12d,%esi
call   10c0 <printfArr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
call   10c0 <printfArr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x30(%rbp),%rdi
mov    %r12d,%esi
call   10c0 <printfArr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x40(%rbp),%r15
mov    %r15,%rdi
mov    %r12d,%esi
call   10c0 <printfArr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %r12d,%r12d
jle    15f2 <main+0x442>
cmp    $0x8,%r12d
jae    1330 <main+0x180>
xor    %eax,%eax
xor    %ebx,%ebx
mov    -0x38(%rbp),%r14
jmp    16c0 <main+0x510>
mov    %r12d,%eax
and    $0xfffffff8,%eax
lea    -0x8(%rax),%rsi
mov    %rsi,%rdx
shr    $0x3,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x7,%ecx
cmp    $0x38,%rsi
jae    1367 <main+0x1b7>
xor    %esi,%esi
mov    -0x30(%rbp),%r14
jmp    1415 <main+0x265>
mov    %r12d,%eax
and    $0xfffffff8,%eax
lea    -0x8(%rax),%rdx
mov    %rdx,%rsi
shr    $0x3,%rsi
add    $0x1,%rsi
mov    %esi,%ecx
and    $0x3,%ecx
cmp    $0x18,%rdx
jae    15fd <main+0x44d>
pxor   %xmm0,%xmm0
xor    %edx,%edx
pxor   %xmm1,%xmm1
mov    -0x38(%rbp),%r14
jmp    1661 <main+0x4b1>
and    $0xfffffffffffffff8,%rdx
xor    %esi,%esi
movdqa 0xc8b(%rip),%xmm0
mov    -0x30(%rbp),%r14
nopl   0x0(%rax)
movdqa %xmm0,(%r14,%rsi,4)
movdqa %xmm0,0x10(%r14,%rsi,4)
movdqa %xmm0,0x20(%r14,%rsi,4)
movdqa %xmm0,0x30(%r14,%rsi,4)
movdqa %xmm0,0x40(%r14,%rsi,4)
movdqa %xmm0,0x50(%r14,%rsi,4)
movdqa %xmm0,0x60(%r14,%rsi,4)
movdqa %xmm0,0x70(%r14,%rsi,4)
movdqa %xmm0,0x80(%r14,%rsi,4)
movdqa %xmm0,0x90(%r14,%rsi,4)
movdqa %xmm0,0xa0(%r14,%rsi,4)
movdqa %xmm0,0xb0(%r14,%rsi,4)
movdqa %xmm0,0xc0(%r14,%rsi,4)
movdqa %xmm0,0xd0(%r14,%rsi,4)
movdqa %xmm0,0xe0(%r14,%rsi,4)
movdqa %xmm0,0xf0(%r14,%rsi,4)
add    $0x40,%rsi
add    $0xfffffffffffffff8,%rdx
jne    1380 <main+0x1d0>
test   %rcx,%rcx
je     1444 <main+0x294>
lea    (%r14,%rsi,4),%rdx
add    $0x10,%rdx
shl    $0x5,%rcx
xor    %esi,%esi
movdqa 0xbd0(%rip),%xmm0
movdqa %xmm0,-0x10(%rdx,%rsi,1)
movdqa %xmm0,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rcx
jne    1430 <main+0x280>
cmp    %r12,%rax
je     1461 <main+0x2b1>
nopl   0x0(%rax)
movl   $0x2,(%r14,%rax,4)
add    $0x1,%rax
cmp    %rax,%r12
jne    1450 <main+0x2a0>
mov    %r13,%rdi
mov    %r12d,%esi
call   1080 <zero@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
call   10c0 <printfArr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %r12d,%esi
call   10c0 <printfArr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r13,%rdi
mov    %r12d,%esi
call   10c0 <printfArr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %r12d,%r12d
jle    15b3 <main+0x403>
mov    %r13,-0x40(%rbp)
xor    %r13d,%r13d
mov    %r12,-0x48(%rbp)
jmp    14ec <main+0x33c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    -0x40(%rbp),%rdx
addl   $0x1,(%rdx,%rcx,4)
mov    %r14d,(%rax)
add    $0x1,%r13d
mov    -0x48(%rbp),%r12
cmp    %r12d,%r13d
je     12a5 <main+0xf5>
mov    %rbx,%r14
mov    -0x50(%rbp),%rbx
mov    %rbx,%rdi
call   10a0 <FLineSpace@plt>
mov    %eax,%edi
call   1050 <strtoi@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
mov    %r14,%rbx
call   1070 <FLine@plt>
mov    %eax,%edi
call   1050 <strtoi@plt>
mov    %eax,%r14d
lea    0xb0e(%rip),%rdi
mov    %r15d,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15d,%edi
mov    %rbx,%rsi
mov    %r12d,%edx
call   10b0 <intExists@plt>
test   %rax,%rax
je     1570 <main+0x3c0>
mov    %r15d,%edi
mov    %rbx,%rsi
call   10d0 <intLoc@plt>
movslq %eax,%rcx
mov    -0x30(%rbp),%rax
cmp    %r14d,(%rax,%rcx,4)
je     14db <main+0x32b>
lea    (%rax,%rcx,4),%rax
jmp    14d0 <main+0x320>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpl   $0x0,0x4(%rbx,%rax,4)
lea    0x1(%rax),%rax
jne    1580 <main+0x3d0>
mov    %eax,%ecx
mov    %r15d,(%rbx,%rcx,4)
mov    -0x30(%rbp),%rdx
lea    (%rdx,%rcx,4),%rax
mov    (%rdx,%rcx,4),%edx
cmp    $0x2,%edx
je     14d8 <main+0x328>
cmp    %r14d,%edx
jne    14d0 <main+0x320>
jmp    14db <main+0x32b>
mov    %rbx,%rdi
mov    %r12d,%esi
call   10c0 <printfArr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %r12d,%esi
call   10c0 <printfArr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r13,%rdi
mov    %r12d,%esi
call   10c0 <printfArr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %ebx,%ebx
mov    -0x38(%rbp),%r14
jmp    16cd <main+0x51d>
movabs $0x3ffffffffffffff8,%rdx
ff ff 3f
or     $0x4,%rdx
and    %rdx,%rsi
pxor   %xmm0,%xmm0
xor    %edx,%edx
pxor   %xmm1,%xmm1
mov    -0x38(%rbp),%r14
nopl   0x0(%rax)
paddd  (%r15,%rdx,4),%xmm0
paddd  0x10(%r15,%rdx,4),%xmm1
paddd  0x20(%r15,%rdx,4),%xmm0
paddd  0x30(%r15,%rdx,4),%xmm1
paddd  0x40(%r15,%rdx,4),%xmm0
paddd  0x50(%r15,%rdx,4),%xmm1
paddd  0x60(%r15,%rdx,4),%xmm0
paddd  0x70(%r15,%rdx,4),%xmm1
add    $0x20,%rdx
add    $0xfffffffffffffffc,%rsi
jne    1620 <main+0x470>
test   %rcx,%rcx
je     1694 <main+0x4e4>
lea    (%r15,%rdx,4),%rdx
add    $0x10,%rdx
shl    $0x5,%rcx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
paddd  -0x10(%rdx,%rsi,1),%xmm0
paddd  (%rdx,%rsi,1),%xmm1
add    $0x20,%rsi
cmp    %rsi,%rcx
jne    1680 <main+0x4d0>
paddd  %xmm1,%xmm0
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%ebx
cmp    %r12,%rax
je     16cd <main+0x51d>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    (%r15,%rax,4),%ebx
add    $0x1,%rax
cmp    %rax,%r12
jne    16c0 <main+0x510>
lea    0x96e(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x973(%rip),%rsi
mov    %r14,%rdi
mov    %ebx,%edx
call   1060 <fprintf@plt>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"crossroad.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [14 x i8] c"crossroad.out\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [19 x i8] c"Cow: %d; side: %d\0A\00"
@.str.6 = [25 x i8] c"Crossings confirmed: %d\0A\00"
@.str.7 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %1
%15 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %15, i32** %2
%16 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %16, i32** %3
%17 = load i32*, i32** %2
%18 = call i32 @FLine(i32* %17)
%19 = call i32 @strtoi(i32 %18)
store i32 %19, i32* %4
%20 = load i32, i32* %4
%21 = zext i32 %20 to i64
%22 = call i8* @llvm.stacksave()
store i8* %22, i8** %5
%23 = alloca i32, i64 %21
store i64 %21, i64* %6
%24 = load i32, i32* %4
%25 = zext i32 %24 to i64
%26 = alloca i32, i64 %25
store i64 %25, i64* %7
%27 = load i32, i32* %4
%28 = zext i32 %27 to i64
%29 = alloca i32, i64 %28
store i64 %28, i64* %8
store i32 0, i32* %14
%30 = load i32, i32* %4
%31 = call i32 @zero(i32* %23, i32 %30)
store i32 0, i32* %11
br label %32
32: ; preds = %36, %0
%33 = load i32, i32* %11
%34 = load i32, i32* %4
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %42
36: ; preds = %32
%37 = load i32, i32* %11
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i32, i32* %26, i64 %38
store i32 2, i32* %39
%40 = load i32, i32* %11
%41 = add nsw i32 %40, 1
store i32 %41, i32* %11
br label %32
42: ; preds = %32
%43 = load i32, i32* %4
%44 = call i32 @zero(i32* %29, i32 %43)
%45 = load i32, i32* %4
%46 = call i32 @printfArr(i32* %23, i32 %45)
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%48 = load i32, i32* %4
%49 = call i32 @printfArr(i32* %26, i32 %48)
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%51 = load i32, i32* %4
%52 = call i32 @printfArr(i32* %29, i32 %51)
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %9
br label %54
54: ; preds = %137, %42
%55 = load i32, i32* %9
%56 = load i32, i32* %4
%57 = icmp slt i32 %55, %56
br i1 %57, label %58, label %140
58: ; preds = %54
%59 = load i32*, i32** %2
%60 = call i32 @FLineSpace(i32* %59)
%61 = call i32 @strtoi(i32 %60)
store i32 %61, i32* %10
%62 = load i32*, i32** %2
%63 = call i32 @FLine(i32* %62)
%64 = call i32 @strtoi(i32 %63)
store i32 %64, i32* %12
%65 = load i32, i32* %10
%66 = load i32, i32* %12
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %65, i32 %66)
%68 = load i32, i32* %10
%69 = load i32, i32* %4
%70 = call i64 @intExists(i32 %68, i32* %23, i32 %69)
%71 = icmp eq i64 %70, 0
br i1 %71, label %72, label %116
72: ; preds = %58
store i32 0, i32* %11
br label %73
73: ; preds = %79, %72
%74 = load i32, i32* %11
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i32, i32* %23, i64 %75
%77 = load i32, i32* %76
%78 = icmp ne i32 %77, 0
br i1 %78, label %79, label %82
79: ; preds = %73
%80 = load i32, i32* %11
%81 = add nsw i32 %80, 1
store i32 %81, i32* %11
br label %73
82: ; preds = %73
%83 = load i32, i32* %10
%84 = load i32, i32* %11
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i32, i32* %23, i64 %85
store i32 %83, i32* %86
%87 = load i32, i32* %11
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i32, i32* %26, i64 %88
%90 = load i32, i32* %89
%91 = icmp eq i32 %90, 2
br i1 %91, label %92, label %97
92: ; preds = %82
%93 = load i32, i32* %12
%94 = load i32, i32* %11
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i32, i32* %26, i64 %95
store i32 %93, i32* %96
br label %115
97: ; preds = %82
%98 = load i32, i32* %11
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds i32, i32* %26, i64 %99
%101 = load i32, i32* %100
%102 = load i32, i32* %12
%103 = icmp ne i32 %101, %102
br i1 %103, label %104, label %114
104: ; preds = %97
%105 = load i32, i32* %11
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds i32, i32* %29, i64 %106
%108 = load i32, i32* %107
%109 = add nsw i32 %108, 1
store i32 %109, i32* %107
%110 = load i32, i32* %12
%111 = load i32, i32* %11
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds i32, i32* %26, i64 %112
store i32 %110, i32* %113
br label %114
114: ; preds = %104, %97
br label %115
115: ; preds = %114, %92
br label %136
116: ; preds = %58
%117 = load i32, i32* %10
%118 = call i32 @intLoc(i32 %117, i32* %23)
store i32 %118, i32* %13
%119 = load i32, i32* %13
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds i32, i32* %26, i64 %120
%122 = load i32, i32* %121
%123 = load i32, i32* %12
%124 = icmp ne i32 %122, %123
br i1 %124, label %125, label %135
125: ; preds = %116
%126 = load i32, i32* %13
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds i32, i32* %29, i64 %127
%129 = load i32, i32* %128
%130 = add nsw i32 %129, 1
store i32 %130, i32* %128
%131 = load i32, i32* %12
%132 = load i32, i32* %13
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds i32, i32* %26, i64 %133
store i32 %131, i32* %134
br label %135
135: ; preds = %125, %116
br label %136
136: ; preds = %135, %115
br label %137
137: ; preds = %136
%138 = load i32, i32* %9
%139 = add nsw i32 %138, 1
store i32 %139, i32* %9
br label %54
140: ; preds = %54
%141 = load i32, i32* %4
%142 = call i32 @printfArr(i32* %23, i32 %141)
%143 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%144 = load i32, i32* %4
%145 = call i32 @printfArr(i32* %26, i32 %144)
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%147 = load i32, i32* %4
%148 = call i32 @printfArr(i32* %29, i32 %147)
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %11
br label %150
150: ; preds = %154, %140
%151 = load i32, i32* %11
%152 = load i32, i32* %4
%153 = icmp slt i32 %151, %152
br i1 %153, label %154, label %163
154: ; preds = %150
%155 = load i32, i32* %11
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds i32, i32* %29, i64 %156
%158 = load i32, i32* %157
%159 = load i32, i32* %14
%160 = add nsw i32 %159, %158
store i32 %160, i32* %14
%161 = load i32, i32* %11
%162 = add nsw i32 %161, 1
store i32 %162, i32* %11
br label %150
163: ; preds = %150
%164 = load i32, i32* %14
%165 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 %164)
%166 = load i32*, i32** %3
%167 = load i32, i32* %14
%168 = call i32 @fprintf(i32* %166, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 %167)
%169 = load i8*, i8** %5
%170 = load i32, i32* %1
ret i32 %170
}

LLVM IR (-O2):
@.str = [13 x i8] c"crossroad.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [14 x i8] c"crossroad.out\00"
@.str.3 = [2 x i8] c"w\00"
@.str.5 = [19 x i8] c"Cow: %d; side: %d\0A\00"
@.str.6 = [25 x i8] c"Crossings confirmed: %d\0A\00"
@.str.7 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @FLine(i32* %1)
%4 = tail call i32 @strtoi(i32 %3)
%5 = zext i32 %4 to i64
%6 = alloca i32, i64 %5
%7 = alloca i32, i64 %5
%8 = alloca i32, i64 %5
%9 = call i32 @zero(i32* %6, i32 %4)
%10 = icmp sgt i32 %4, 0
br i1 %10, label %11, label %137
11: ; preds = %0
%12 = icmp ult i32 %4, 8
br i1 %12, label %82, label %13
13: ; preds = %11
%14 = and i64 %5, 4294967288
%15 = add nsw i64 %14, -8
%16 = lshr exact i64 %15, 3
%17 = add nuw nsw i64 %16, 1
%18 = and i64 %17, 7
%19 = icmp ult i64 %15, 56
br i1 %19, label %67, label %20
20: ; preds = %13
%21 = and i64 %17, 4611686018427387896
br label %22
22: ; preds = %22, %20
%23 = phi i64 [ 0, %20 ], [ %64, %22 ]
%24 = phi i64 [ 0, %20 ], [ %65, %22 ]
%25 = getelementptr inbounds i32, i32* %7, i64 %23
%26 = bitcast i32* %25 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %26
%27 = getelementptr inbounds i32, i32* %25, i64 4
%28 = bitcast i32* %27 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %28
%29 = or i64 %23, 8
%30 = getelementptr inbounds i32, i32* %7, i64 %29
%31 = bitcast i32* %30 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %31
%32 = getelementptr inbounds i32, i32* %30, i64 4
%33 = bitcast i32* %32 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %33
%34 = or i64 %23, 16
%35 = getelementptr inbounds i32, i32* %7, i64 %34
%36 = bitcast i32* %35 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %36
%37 = getelementptr inbounds i32, i32* %35, i64 4
%38 = bitcast i32* %37 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %38
%39 = or i64 %23, 24
%40 = getelementptr inbounds i32, i32* %7, i64 %39
%41 = bitcast i32* %40 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %41
%42 = getelementptr inbounds i32, i32* %40, i64 4
%43 = bitcast i32* %42 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %43
%44 = or i64 %23, 32
%45 = getelementptr inbounds i32, i32* %7, i64 %44
%46 = bitcast i32* %45 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %46
%47 = getelementptr inbounds i32, i32* %45, i64 4
%48 = bitcast i32* %47 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %48
%49 = or i64 %23, 40
%50 = getelementptr inbounds i32, i32* %7, i64 %49
%51 = bitcast i32* %50 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %51
%52 = getelementptr inbounds i32, i32* %50, i64 4
%53 = bitcast i32* %52 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %53
%54 = or i64 %23, 48
%55 = getelementptr inbounds i32, i32* %7, i64 %54
%56 = bitcast i32* %55 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %56
%57 = getelementptr inbounds i32, i32* %55, i64 4
%58 = bitcast i32* %57 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %58
%59 = or i64 %23, 56
%60 = getelementptr inbounds i32, i32* %7, i64 %59
%61 = bitcast i32* %60 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %61
%62 = getelementptr inbounds i32, i32* %60, i64 4
%63 = bitcast i32* %62 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %63
%64 = add nuw i64 %23, 64
%65 = add nuw i64 %24, 8
%66 = icmp eq i64 %65, %21
br i1 %66, label %67, label %22
67: ; preds = %22, %13
%68 = phi i64 [ 0, %13 ], [ %64, %22 ]
%69 = icmp eq i64 %18, 0
br i1 %69, label %80, label %70
70: ; preds = %67, %70
%71 = phi i64 [ %77, %70 ], [ %68, %67 ]
%72 = phi i64 [ %78, %70 ], [ 0, %67 ]
%73 = getelementptr inbounds i32, i32* %7, i64 %71
%74 = bitcast i32* %73 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %74
%75 = getelementptr inbounds i32, i32* %73, i64 4
%76 = bitcast i32* %75 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %76
%77 = add nuw i64 %71, 8
%78 = add i64 %72, 1
%79 = icmp eq i64 %78, %18
br i1 %79, label %80, label %70
80: ; preds = %70, %67
%81 = icmp eq i64 %14, %5
br i1 %81, label %89, label %82
82: ; preds = %11, %80
%83 = phi i64 [ 0, %11 ], [ %14, %80 ]
br label %84
84: ; preds = %82, %84
%85 = phi i64 [ %87, %84 ], [ %83, %82 ]
%86 = getelementptr inbounds i32, i32* %7, i64 %85
store i32 2, i32* %86
%87 = add nuw nsw i64 %85, 1
%88 = icmp eq i64 %87, %5
br i1 %88, label %89, label %84
89: ; preds = %84, %80
%90 = call i32 @zero(i32* %8, i32 %4)
%91 = call i32 @printfArr(i32* %6, i32 %4)
%92 = call i32 @putchar(i32 10)
%93 = call i32 @printfArr(i32* %7, i32 %4)
%94 = call i32 @putchar(i32 10)
%95 = call i32 @printfArr(i32* %8, i32 %4)
%96 = call i32 @putchar(i32 10)
br i1 %10, label %97, label %246
97: ; preds = %89, %134
%98 = phi i32 [ %135, %134 ], [ 0, %89 ]
%99 = call i32 @FLineSpace(i32* %1)
%100 = call i32 @strtoi(i32 %99)
%101 = call i32 @FLine(i32* %1)
%102 = call i32 @strtoi(i32 %101)
%103 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %100, i32 %102)
%104 = call i64 @intExists(i32 %100, i32* %6, i32 %4)
%105 = icmp eq i64 %104, 0
br i1 %105, label %106, label %120
106: ; preds = %97, %106
%107 = phi i64 [ %111, %106 ], [ 0, %97 ]
%108 = getelementptr inbounds i32, i32* %6, i64 %107
%109 = load i32, i32* %108
%110 = icmp eq i32 %109, 0
%111 = add nuw i64 %107, 1
br i1 %110, label %112, label %106
112: ; preds = %106
%113 = and i64 %107, 4294967295
%114 = getelementptr inbounds i32, i32* %6, i64 %113
store i32 %100, i32* %114
%115 = getelementptr inbounds i32, i32* %7, i64 %113
%116 = load i32, i32* %115
%117 = icmp eq i32 %116, 2
br i1 %117, label %132, label %118
118: ; preds = %112
%119 = icmp eq i32 %116, %102
br i1 %119, label %134, label %126
120: ; preds = %97
%121 = call i32 @intLoc(i32 %100, i32* %6)
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds i32, i32* %7, i64 %122
%124 = load i32, i32* %123
%125 = icmp eq i32 %124, %102
br i1 %125, label %134, label %126
126: ; preds = %120, %118
%127 = phi i64 [ %113, %118 ], [ %122, %120 ]
%128 = phi i32* [ %115, %118 ], [ %123, %120 ]
%129 = getelementptr inbounds i32, i32* %8, i64 %127
%130 = load i32, i32* %129
%131 = add nsw i32 %130, 1
store i32 %131, i32* %129
br label %132
132: ; preds = %126, %112
%133 = phi i32* [ %115, %112 ], [ %128, %126 ]
store i32 %102, i32* %133
br label %134
134: ; preds = %132, %118, %120
%135 = add nuw nsw i32 %98, 1
%136 = icmp eq i32 %135, %4
br i1 %136, label %145, label %97
137: ; preds = %0
%138 = call i32 @zero(i32* %8, i32 %4)
%139 = call i32 @printfArr(i32* %6, i32 %4)
%140 = call i32 @putchar(i32 10)
%141 = call i32 @printfArr(i32* %7, i32 %4)
%142 = call i32 @putchar(i32 10)
%143 = call i32 @printfArr(i32* %8, i32 %4)
%144 = call i32 @putchar(i32 10)
br label %145
145: ; preds = %134, %137
%146 = call i32 @printfArr(i32* %6, i32 %4)
%147 = call i32 @putchar(i32 10)
%148 = call i32 @printfArr(i32* %7, i32 %4)
%149 = call i32 @putchar(i32 10)
%150 = call i32 @printfArr(i32* %8, i32 %4)
%151 = call i32 @putchar(i32 10)
br i1 %10, label %152, label %253
152: ; preds = %145
%153 = icmp ult i32 %4, 8
br i1 %153, label %235, label %154
154: ; preds = %152
%155 = and i64 %5, 4294967288
%156 = add nsw i64 %155, -8
%157 = lshr exact i64 %156, 3
%158 = add nuw nsw i64 %157, 1
%159 = and i64 %158, 3
%160 = icmp ult i64 %156, 24
br i1 %160, label %206, label %161
161: ; preds = %154
%162 = and i64 %158, 4611686018427387900
br label %163
163: ; preds = %163, %161
%164 = phi i64 [ 0, %161 ], [ %203, %163 ]
%165 = phi <4 x i32> [ zeroinitializer, %161 ], [ %201, %163 ]
%166 = phi <4 x i32> [ zeroinitializer, %161 ], [ %202, %163 ]
%167 = phi i64 [ 0, %161 ], [ %204, %163 ]
%168 = getelementptr inbounds i32, i32* %8, i64 %164
%169 = bitcast i32* %168 to <4 x i32>*
%170 = load <4 x i32>, <4 x i32>* %169
%171 = getelementptr inbounds i32, i32* %168, i64 4
%172 = bitcast i32* %171 to <4 x i32>*
%173 = load <4 x i32>, <4 x i32>* %172
%174 = add <4 x i32> %170, %165
%175 = add <4 x i32> %173, %166
%176 = or i64 %164, 8
%177 = getelementptr inbounds i32, i32* %8, i64 %176
%178 = bitcast i32* %177 to <4 x i32>*
%179 = load <4 x i32>, <4 x i32>* %178
%180 = getelementptr inbounds i32, i32* %177, i64 4
%181 = bitcast i32* %180 to <4 x i32>*
%182 = load <4 x i32>, <4 x i32>* %181
%183 = add <4 x i32> %179, %174
%184 = add <4 x i32> %182, %175
%185 = or i64 %164, 16
%186 = getelementptr inbounds i32, i32* %8, i64 %185
%187 = bitcast i32* %186 to <4 x i32>*
%188 = load <4 x i32>, <4 x i32>* %187
%189 = getelementptr inbounds i32, i32* %186, i64 4
%190 = bitcast i32* %189 to <4 x i32>*
%191 = load <4 x i32>, <4 x i32>* %190
%192 = add <4 x i32> %188, %183
%193 = add <4 x i32> %191, %184
%194 = or i64 %164, 24
%195 = getelementptr inbounds i32, i32* %8, i64 %194
%196 = bitcast i32* %195 to <4 x i32>*
%197 = load <4 x i32>, <4 x i32>* %196
%198 = getelementptr inbounds i32, i32* %195, i64 4
%199 = bitcast i32* %198 to <4 x i32>*
%200 = load <4 x i32>, <4 x i32>* %199
%201 = add <4 x i32> %197, %192
%202 = add <4 x i32> %200, %193
%203 = add nuw i64 %164, 32
%204 = add i64 %167, 4
%205 = icmp eq i64 %204, %162
br i1 %205, label %206, label %163
206: ; preds = %163, %154
%207 = phi <4 x i32> [ undef, %154 ], [ %201, %163 ]
%208 = phi <4 x i32> [ undef, %154 ], [ %202, %163 ]
%209 = phi i64 [ 0, %154 ], [ %203, %163 ]
%210 = phi <4 x i32> [ zeroinitializer, %154 ], [ %201, %163 ]
%211 = phi <4 x i32> [ zeroinitializer, %154 ], [ %202, %163 ]
%212 = icmp eq i64 %159, 0
br i1 %212, label %229, label %213
213: ; preds = %206, %213
%214 = phi i64 [ %226, %213 ], [ %209, %206 ]
%215 = phi <4 x i32> [ %224, %213 ], [ %210, %206 ]
%216 = phi <4 x i32> [ %225, %213 ], [ %211, %206 ]
%217 = phi i64 [ %227, %213 ], [ 0, %206 ]
%218 = getelementptr inbounds i32, i32* %8, i64 %214
%219 = bitcast i32* %218 to <4 x i32>*
%220 = load <4 x i32>, <4 x i32>* %219
%221 = getelementptr inbounds i32, i32* %218, i64 4
%222 = bitcast i32* %221 to <4 x i32>*
%223 = load <4 x i32>, <4 x i32>* %222
%224 = add <4 x i32> %220, %215
%225 = add <4 x i32> %223, %216
%226 = add nuw i64 %214, 8
%227 = add i64 %217, 1
%228 = icmp eq i64 %227, %159
br i1 %228, label %229, label %213
229: ; preds = %213, %206
%230 = phi <4 x i32> [ %207, %206 ], [ %224, %213 ]
%231 = phi <4 x i32> [ %208, %206 ], [ %225, %213 ]
%232 = add <4 x i32> %231, %230
%233 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %232)
%234 = icmp eq i64 %155, %5
br i1 %234, label %253, label %235
235: ; preds = %152, %229
%236 = phi i64 [ 0, %152 ], [ %155, %229 ]
%237 = phi i32 [ 0, %152 ], [ %233, %229 ]
br label %238
238: ; preds = %235, %238
%239 = phi i64 [ %244, %238 ], [ %236, %235 ]
%240 = phi i32 [ %243, %238 ], [ %237, %235 ]
%241 = getelementptr inbounds i32, i32* %8, i64 %239
%242 = load i32, i32* %241
%243 = add nsw i32 %242, %240
%244 = add nuw nsw i64 %239, 1
%245 = icmp eq i64 %244, %5
br i1 %245, label %253, label %238
246: ; preds = %89
%247 = call i32 @printfArr(i32* %6, i32 %4)
%248 = call i32 @putchar(i32 10)
%249 = call i32 @printfArr(i32* %7, i32 %4)
%250 = call i32 @putchar(i32 10)
%251 = call i32 @printfArr(i32* %8, i32 %4)
%252 = call i32 @putchar(i32 10)
br label %253
253: ; preds = %238, %229, %246, %145
%254 = phi i32 [ 0, %145 ], [ 0, %246 ], [ %233, %229 ], [ %243, %238 ]
%255 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 %254)
%256 = call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 %254)
ret i32 0
}