#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 */
scalar_t__ EOF;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
scalar_t__ fscanf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  FILE *fp = fopen("input", "r");
  char xy, data[64];
  int m[50][6] = {0};
  int i, j, pix = 0, arg1, arg2, index, amt;
  if (fp == NULL) {
    printf("could not open input file\n");
    return -1;
  }
  while (fscanf(fp, "%s", data) != EOF) {
    if (data[1] == 'e') {
      fscanf(fp, "%ix%i", &arg1, &arg2);
      for (i = 0; i < arg2; i++) {
        for (j = 0; j < arg1; j++) {
          m[j][i] = 1;
        }
      }
    } else {
      fscanf(fp, "%s %c=%i by %i", data, &xy, &index, &amt);
      if (xy == 'x') {
        int t[6] = {0};
        for (int i = 0; i < 6; i++) {
          t[i] = m[index][i];
        }
        for (int i = 0; i < 6; i++) {
          int src = i - amt;
          if (src > 6) {
            src = src - 6;
          } else if (src < 0) {
            src = src + 6;
          }
          m[index][i] = t[src];
        }
      }
      if (xy == 'y') {
        int t[50] = {0};
        for (int i = 0; i < 50; i++) {
          t[i] = m[i][index];
        }
        for (int i = 0; i < 50; i++) {
          int src = i - amt;
          if (src > 50) {
            src = src - 50;
          } else if (src < 0) {
            src = src + 50;
          }
          m[i][index] = t[src];
        }
      }
    }
  }
  for (i = 0; i < 6; i++) {
    for (j = 0; j < 50; j++) {
      printf("%c", m[j][i] ? '#' : '.');
      pix = pix + m[j][i];
    }
    printf("\n");
  }
  printf("There are %i Pixels on!\n", pix);
  fclose(fp);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x640,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe97(%rip),%rdi
lea    0xe96(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x10(%rbp)
lea    -0x510(%rbp),%rdi
xor    %esi,%esi
mov    $0x4b0,%edx
call   1050 <memset@plt>
movl   $0x0,-0x51c(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11bb <main+0x6b>
lea    0xe60(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1614 <main+0x4c4>
jmp    11c0 <main+0x70>
mov    -0x10(%rbp),%rdi
lea    -0x60(%rbp),%rdx
lea    0xe54(%rip),%rsi
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    0x2e0b(%rip),%rcx
cmp    (%rcx),%rax
je     1524 <main+0x3d4>
movsbl -0x5f(%rbp),%eax
cmp    $0x65,%eax
jne    12a0 <main+0x150>
mov    -0x10(%rbp),%rdi
lea    0xe28(%rip),%rsi
lea    -0x520(%rbp),%rdx
lea    -0x524(%rbp),%rcx
mov    $0x0,%al
call   1060 <fscanf@plt>
movl   $0x0,-0x514(%rbp)
mov    -0x514(%rbp),%eax
cmp    -0x524(%rbp),%eax
jge    129b <main+0x14b>
movl   $0x0,-0x518(%rbp)
mov    -0x518(%rbp),%eax
cmp    -0x520(%rbp),%eax
jge    1282 <main+0x132>
movslq -0x518(%rbp),%rcx
lea    -0x510(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x514(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x518(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x518(%rbp)
jmp    1239 <main+0xe9>
jmp    1287 <main+0x137>
mov    -0x514(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x514(%rbp)
jmp    121d <main+0xcd>
jmp    151f <main+0x3cf>
mov    -0x10(%rbp),%rdi
lea    -0x60(%rbp),%rdx
lea    0xd7d(%rip),%rsi
lea    -0x11(%rbp),%rcx
lea    -0x528(%rbp),%r8
lea    -0x52c(%rbp),%r9
mov    $0x0,%al
call   1060 <fscanf@plt>
movsbl -0x11(%rbp),%eax
cmp    $0x78,%eax
jne    13f1 <main+0x2a1>
lea    -0x550(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1050 <memset@plt>
movl   $0x0,-0x554(%rbp)
cmpl   $0x6,-0x554(%rbp)
jge    1340 <main+0x1f0>
movslq -0x528(%rbp),%rcx
lea    -0x510(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x554(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
movslq -0x554(%rbp),%rax
mov    %ecx,-0x550(%rbp,%rax,4)
mov    -0x554(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x554(%rbp)
jmp    12f2 <main+0x1a2>
movl   $0x0,-0x558(%rbp)
cmpl   $0x6,-0x558(%rbp)
jge    13ec <main+0x29c>
mov    -0x558(%rbp),%eax
sub    -0x52c(%rbp),%eax
mov    %eax,-0x55c(%rbp)
cmpl   $0x6,-0x55c(%rbp)
jle    138a <main+0x23a>
mov    -0x55c(%rbp),%eax
sub    $0x6,%eax
mov    %eax,-0x55c(%rbp)
jmp    13ab <main+0x25b>
cmpl   $0x0,-0x55c(%rbp)
jge    13a6 <main+0x256>
mov    -0x55c(%rbp),%eax
add    $0x6,%eax
mov    %eax,-0x55c(%rbp)
jmp    13ab <main+0x25b>
movslq -0x55c(%rbp),%rax
mov    -0x550(%rbp,%rax,4),%edx
movslq -0x528(%rbp),%rcx
lea    -0x510(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x558(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x558(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x558(%rbp)
jmp    134a <main+0x1fa>
jmp    13f1 <main+0x2a1>
movsbl -0x11(%rbp),%eax
cmp    $0x79,%eax
jne    151a <main+0x3ca>
lea    -0x630(%rbp),%rdi
xor    %esi,%esi
mov    $0xc8,%edx
call   1050 <memset@plt>
movl   $0x0,-0x634(%rbp)
cmpl   $0x32,-0x634(%rbp)
jge    1469 <main+0x319>
movslq -0x634(%rbp),%rcx
lea    -0x510(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x528(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
movslq -0x634(%rbp),%rax
mov    %ecx,-0x630(%rbp,%rax,4)
mov    -0x634(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x634(%rbp)
jmp    141b <main+0x2cb>
movl   $0x0,-0x638(%rbp)
cmpl   $0x32,-0x638(%rbp)
jge    1515 <main+0x3c5>
mov    -0x638(%rbp),%eax
sub    -0x52c(%rbp),%eax
mov    %eax,-0x63c(%rbp)
cmpl   $0x32,-0x63c(%rbp)
jle    14b3 <main+0x363>
mov    -0x63c(%rbp),%eax
sub    $0x32,%eax
mov    %eax,-0x63c(%rbp)
jmp    14d4 <main+0x384>
cmpl   $0x0,-0x63c(%rbp)
jge    14cf <main+0x37f>
mov    -0x63c(%rbp),%eax
add    $0x32,%eax
mov    %eax,-0x63c(%rbp)
jmp    14d4 <main+0x384>
movslq -0x63c(%rbp),%rax
mov    -0x630(%rbp,%rax,4),%edx
movslq -0x638(%rbp),%rcx
lea    -0x510(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x528(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x638(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x638(%rbp)
jmp    1473 <main+0x323>
jmp    151a <main+0x3ca>
jmp    151f <main+0x3cf>
jmp    11c0 <main+0x70>
movl   $0x0,-0x514(%rbp)
cmpl   $0x6,-0x514(%rbp)
jge    15f0 <main+0x4a0>
movl   $0x0,-0x518(%rbp)
cmpl   $0x32,-0x518(%rbp)
jge    15ce <main+0x47e>
movslq -0x518(%rbp),%rcx
lea    -0x510(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x514(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
mov    $0x2e,%esi
mov    $0x23,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
lea    0xab3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x51c(%rbp),%eax
movslq -0x518(%rbp),%rdx
lea    -0x510(%rbp),%rcx
imul   $0x18,%rdx,%rdx
add    %rdx,%rcx
movslq -0x514(%rbp),%rdx
add    (%rcx,%rdx,4),%eax
mov    %eax,-0x51c(%rbp)
mov    -0x518(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x518(%rbp)
jmp    1545 <main+0x3f5>
lea    0xa80(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x514(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x514(%rbp)
jmp    152e <main+0x3de>
mov    -0x51c(%rbp),%esi
lea    0xa41(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x640,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x5e8,%rsp
lea    0xe78(%rip),%rdi
lea    0xe77(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%r14
lea    0x130(%rsp),%rbx
mov    $0x4b0,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1070 <memset@plt>
test   %r14,%r14
je     1383 <main+0x213>
lea    0xe4a(%rip),%rsi
xor    %r15d,%r15d
lea    0xf0(%rsp),%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   1080 <fscanf@plt>
mov    0x2e0e(%rip),%r13
cmp    0x0(%r13),%rax
jne    13a8 <main+0x238>
xor    %ebp,%ebp
jmp    1205 <main+0x95>
nopl   0x0(%rax,%rax,1)
call   1030 <putchar@plt>
add    %ebx,%r15d
add    $0x18,%rbp
cmp    $0x4b0,%rbp
je     121c <main+0xac>
mov    0x130(%rsp,%rbp,1),%ebx
mov    $0x2e,%edi
test   %ebx,%ebx
je     11f0 <main+0x80>
mov    $0x23,%edi
jmp    11f0 <main+0x80>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x4,%ebp
jmp    1245 <main+0xd5>
nopl   (%rax)
call   1030 <putchar@plt>
add    %ebx,%r15d
add    $0x18,%rbp
cmp    $0x4b4,%rbp
je     125c <main+0xec>
mov    0x130(%rsp,%rbp,1),%ebx
mov    $0x2e,%edi
test   %ebx,%ebx
je     1230 <main+0xc0>
mov    $0x23,%edi
jmp    1230 <main+0xc0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x8,%ebp
jmp    1285 <main+0x115>
nopl   (%rax)
call   1030 <putchar@plt>
add    %ebx,%r15d
add    $0x18,%rbp
cmp    $0x4b8,%rbp
je     129c <main+0x12c>
mov    0x130(%rsp,%rbp,1),%ebx
mov    $0x2e,%edi
test   %ebx,%ebx
je     1270 <main+0x100>
mov    $0x23,%edi
jmp    1270 <main+0x100>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xc,%ebp
jmp    12c5 <main+0x155>
nopl   (%rax)
call   1030 <putchar@plt>
add    %ebx,%r15d
add    $0x18,%rbp
cmp    $0x4bc,%rbp
je     12dc <main+0x16c>
mov    0x130(%rsp,%rbp,1),%ebx
mov    $0x2e,%edi
test   %ebx,%ebx
je     12b0 <main+0x140>
mov    $0x23,%edi
jmp    12b0 <main+0x140>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x10,%ebp
jmp    1305 <main+0x195>
nopl   (%rax)
call   1030 <putchar@plt>
add    %ebx,%r15d
add    $0x18,%rbp
cmp    $0x4c0,%rbp
je     131c <main+0x1ac>
mov    0x130(%rsp,%rbp,1),%ebx
mov    $0x2e,%edi
test   %ebx,%ebx
je     12f0 <main+0x180>
mov    $0x23,%edi
jmp    12f0 <main+0x180>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x14,%ebp
jmp    1345 <main+0x1d5>
nopl   (%rax)
call   1030 <putchar@plt>
add    %ebx,%r15d
add    $0x18,%rbp
cmp    $0x4c4,%rbp
je     135c <main+0x1ec>
mov    0x130(%rsp,%rbp,1),%ebx
mov    $0x2e,%edi
test   %ebx,%ebx
je     1330 <main+0x1c0>
mov    $0x23,%edi
jmp    1330 <main+0x1c0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xcb3(%rip),%rdi
xor    %ebp,%ebp
mov    %r15d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
call   1050 <fclose@plt>
jmp    1394 <main+0x224>
lea    0xcaf(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x5e8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xf0(%rsp),%r12
jmp    13de <main+0x26e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
lea    0xc3e(%rip),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1080 <fscanf@plt>
cmp    0x0(%r13),%rax
je     11e4 <main+0x74>
cmpb   $0x65,0xf1(%rsp)
65
jne    14d0 <main+0x360>
mov    %r14,%rdi
lea    0xc15(%rip),%rsi
lea    0x1c(%rsp),%rdx
lea    0x18(%rsp),%rcx
xor    %eax,%eax
call   1080 <fscanf@plt>
mov    0x18(%rsp),%r10d
test   %r10d,%r10d
jle    13c0 <main+0x250>
mov    0x1c(%rsp),%r11d
mov    %r11,%r8
add    $0xffffffffffffffff,%r8
mov    %r11d,%r9d
and    $0x3,%r9d
mov    %r11d,%edi
and    $0xfffffffc,%edi
lea    0x0(,%r9,8),%rax
lea    (%rax,%rax,2),%rbp
mov    %rbx,%rcx
xor    %esi,%esi
jmp    1451 <main+0x2e1>
nopl   (%rax)
add    $0x1,%rsi
add    $0x4,%rcx
cmp    %r10,%rsi
je     13c0 <main+0x250>
test   %r11d,%r11d
jle    1440 <main+0x2d0>
cmp    $0x3,%r8
jae    1460 <main+0x2f0>
xor    %eax,%eax
jmp    1498 <main+0x328>
mov    %rcx,%rdx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movl   $0x1,(%rdx)
movl   $0x1,0x18(%rdx)
movl   $0x1,0x30(%rdx)
movl   $0x1,0x48(%rdx)
add    $0x4,%rax
add    $0x60,%rdx
cmp    %rax,%rdi
jne    1470 <main+0x300>
test   %r9,%r9
je     1440 <main+0x2d0>
lea    (%rax,%rax,2),%rax
lea    (%rcx,%rax,8),%rax
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movl   $0x1,(%rax,%rdx,1)
add    $0x18,%rdx
cmp    %rdx,%rbp
jne    14b0 <main+0x340>
jmp    1440 <main+0x2d0>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
lea    0xb37(%rip),%rsi
mov    %r12,%rdx
lea    0xf(%rsp),%rcx
lea    0x14(%rsp),%r8
lea    0x10(%rsp),%r9
xor    %eax,%eax
call   1080 <fscanf@plt>
mov    0xf(%rsp),%al
cmp    $0x79,%al
je     1631 <main+0x4c1>
cmp    $0x78,%al
jne    13c0 <main+0x250>
movslq 0x14(%rsp),%rax
lea    (%rax,%rax,2),%rax
movups 0x130(%rsp,%rax,8),%xmm0
movaps %xmm0,0x20(%rsp)
mov    0x140(%rsp,%rax,8),%rdx
mov    0x10(%rsp),%ecx
test   %ecx,%ecx
mov    $0x0,%esi
mov    $0x6,%edi
cmovg  %edi,%esi
mov    %rdx,0x30(%rsp)
cmp    $0xfffffffa,%ecx
mov    $0xfffffffa,%edx
cmovl  %edx,%esi
sub    %ecx,%esi
movslq %esi,%rdx
mov    0x20(%rsp,%rdx,4),%edx
mov    %edx,0x130(%rsp,%rax,8)
cmp    $0x2,%ecx
mov    $0x1,%edx
mov    $0x7,%esi
cmovge %esi,%edx
cmp    $0xfffffffb,%ecx
mov    $0xfffffffb,%esi
cmovl  %esi,%edx
sub    %ecx,%edx
movslq %edx,%rdx
mov    0x20(%rsp,%rdx,4),%edx
mov    %edx,0x134(%rsp,%rax,8)
cmp    $0x3,%ecx
mov    $0x2,%edx
mov    $0x8,%esi
cmovge %esi,%edx
cmp    $0xfffffffc,%ecx
mov    $0xfffffffc,%esi
cmovl  %esi,%edx
sub    %ecx,%edx
movslq %edx,%rdx
cmp    $0x4,%ecx
mov    $0x3,%esi
mov    $0x9,%edi
cmovge %edi,%esi
mov    0x20(%rsp,%rdx,4),%edx
cmp    $0xfffffffd,%ecx
mov    $0xfffffffd,%edi
cmovl  %edi,%esi
mov    %edx,0x138(%rsp,%rax,8)
sub    %ecx,%esi
movslq %esi,%rdx
mov    0x20(%rsp,%rdx,4),%edx
cmp    $0x5,%ecx
mov    $0x4,%esi
mov    $0xa,%edi
cmovge %edi,%esi
cmp    $0xfffffffe,%ecx
mov    $0xfffffffe,%edi
cmovl  %edi,%esi
sub    %ecx,%esi
cmp    $0x6,%ecx
mov    $0x5,%edi
mov    $0xb,%ebp
cmovge %ebp,%edi
mov    %edx,0x13c(%rsp,%rax,8)
sub    %ecx,%edi
cmp    $0xffffffff,%ecx
not    %ecx
cmovge %edi,%ecx
movslq %esi,%rdx
mov    0x20(%rsp,%rdx,4),%edx
mov    %edx,0x140(%rsp,%rax,8)
movslq %ecx,%rcx
mov    0x20(%rsp,%rcx,4),%ecx
mov    %ecx,0x144(%rsp,%rax,8)
jmp    13c0 <main+0x250>
mov    %rbx,%r9
movslq 0x14(%rsp),%rcx
xorps  %xmm0,%xmm0
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movq   $0x0,0xe0(%rsp)
lea    (%rsp,%rcx,4),%rax
add    $0x130,%rax
mov    %rax,%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nop
movss  0x48(%rdx),%xmm0
movss  0x30(%rdx),%xmm1
unpcklps %xmm0,%xmm1
movss  0x18(%rdx),%xmm0
movss  (%rdx),%xmm2
unpcklps %xmm0,%xmm2
movlhps %xmm1,%xmm2
movaps %xmm2,0x20(%rsp,%rsi,4)
add    $0x4,%rsi
add    $0x60,%rdx
cmp    $0x30,%rsi
jne    16b0 <main+0x540>
mov    0x5b0(%rsp,%rcx,4),%edx
mov    0x5c8(%rsp,%rcx,4),%ecx
mov    %edx,0xe0(%rsp)
mov    %ecx,0xe4(%rsp)
mov    0x10(%rsp),%esi
mov    $0xffffffcf,%r8d
sub    %esi,%r8d
mov    $0xffffffce,%edx
sub    %esi,%edx
neg    %esi
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    (%rsi,%rdi,1),%ebp
lea    (%rdx,%rdi,1),%ebx
test   %ebp,%ebp
lea    0x32(%rsi,%rdi,1),%ecx
cmovns %ebp,%ecx
cmp    $0x33,%ebp
cmovge %ebx,%ecx
movslq %ecx,%rcx
mov    0x20(%rsp,%rcx,4),%ecx
mov    %ecx,(%rax)
lea    (%rsi,%rdi,1),%ecx
add    $0x1,%ecx
lea    (%r8,%rdi,1),%ebp
test   %ecx,%ecx
lea    0x33(%rsi,%rdi,1),%ebx
cmovns %ecx,%ebx
cmp    $0x33,%ecx
cmovge %ebp,%ebx
movslq %ebx,%rcx
mov    0x20(%rsp,%rcx,4),%ecx
mov    %ecx,0x18(%rax)
add    $0x2,%rdi
add    $0x30,%rax
cmp    $0x32,%rdi
jne    1720 <main+0x5b0>
mov    %r9,%rbx
jmp    13c0 <main+0x250>

LLVM IR (-O0):
@.str = [6 x i8] c"input\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [27 x i8] c"could not open input file\0A\00"
@.str.3 = [3 x i8] c"%s\00"
@EOF = global i64 0
@.str.4 = [6 x i8] c"%ix%i\00"
@.str.5 = [15 x i8] c"%s %c=%i by %i\00"
@.str.6 = [3 x i8] c"%c\00"
@.str.7 = [2 x i8] c"\0A\00"
@.str.8 = [25 x i8] c"There are %i Pixels on!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i8
%4 = alloca [64 x i8]
%5 = alloca [50 x [6 x i32]]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca [6 x i32]
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca [50 x i32]
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i32 0, i32* %1
%21 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %21, i32** %2
%22 = bitcast [50 x [6 x i32]]* %5 to i8*
store i32 0, i32* %8
%23 = load i32*, i32** %2
%24 = icmp eq i32* %23, null
br i1 %24, label %25, label %27
25: ; preds = %0
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %1
br label %229
27: ; preds = %0
br label %28
28: ; preds = %186, %27
%29 = load i32*, i32** %2
%30 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%31 = call i64 (i32*, i8*, ...) @fscanf(i32* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %30)
%32 = load i64, i64* @EOF
%33 = icmp ne i64 %31, %32
br i1 %33, label %34, label %187
34: ; preds = %28
%35 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 1
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = icmp eq i32 %37, 101
br i1 %38, label %39, label %66
39: ; preds = %34
%40 = load i32*, i32** %2
%41 = call i64 (i32*, i8*, ...) @fscanf(i32* %40, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32* %9, i32* %10)
store i32 0, i32* %6
br label %42
42: ; preds = %62, %39
%43 = load i32, i32* %6
%44 = load i32, i32* %10
%45 = icmp slt i32 %43, %44
br i1 %45, label %46, label %65
46: ; preds = %42
store i32 0, i32* %7
br label %47
47: ; preds = %58, %46
%48 = load i32, i32* %7
%49 = load i32, i32* %9
%50 = icmp slt i32 %48, %49
br i1 %50, label %51, label %61
51: ; preds = %47
%52 = load i32, i32* %7
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %5, i64 0, i64 %53
%55 = load i32, i32* %6
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [6 x i32], [6 x i32]* %54, i64 0, i64 %56
store i32 1, i32* %57
br label %58
58: ; preds = %51
%59 = load i32, i32* %7
%60 = add nsw i32 %59, 1
store i32 %60, i32* %7
br label %47
61: ; preds = %47
br label %62
62: ; preds = %61
%63 = load i32, i32* %6
%64 = add nsw i32 %63, 1
store i32 %64, i32* %6
br label %42
65: ; preds = %42
br label %186
66: ; preds = %34
%67 = load i32*, i32** %2
%68 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%69 = call i64 (i32*, i8*, ...) @fscanf(i32* %67, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i8* %68, i8* %3, i32* %11, i32* %12)
%70 = load i8, i8* %3
%71 = sext i8 %70 to i32
%72 = icmp eq i32 %71, 120
br i1 %72, label %73, label %127
73: ; preds = %66
%74 = bitcast [6 x i32]* %13 to i8*
store i32 0, i32* %14
br label %75
75: ; preds = %89, %73
%76 = load i32, i32* %14
%77 = icmp slt i32 %76, 6
br i1 %77, label %78, label %92
78: ; preds = %75
%79 = load i32, i32* %11
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %5, i64 0, i64 %80
%82 = load i32, i32* %14
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [6 x i32], [6 x i32]* %81, i64 0, i64 %83
%85 = load i32, i32* %84
%86 = load i32, i32* %14
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [6 x i32], [6 x i32]* %13, i64 0, i64 %87
store i32 %85, i32* %88
br label %89
89: ; preds = %78
%90 = load i32, i32* %14
%91 = add nsw i32 %90, 1
store i32 %91, i32* %14
br label %75
92: ; preds = %75
store i32 0, i32* %15
br label %93
93: ; preds = %123, %92
%94 = load i32, i32* %15
%95 = icmp slt i32 %94, 6
br i1 %95, label %96, label %126
96: ; preds = %93
%97 = load i32, i32* %15
%98 = load i32, i32* %12
%99 = sub nsw i32 %97, %98
store i32 %99, i32* %16
%100 = load i32, i32* %16
%101 = icmp sgt i32 %100, 6
br i1 %101, label %102, label %105
102: ; preds = %96
%103 = load i32, i32* %16
%104 = sub nsw i32 %103, 6
store i32 %104, i32* %16
br label %112
105: ; preds = %96
%106 = load i32, i32* %16
%107 = icmp slt i32 %106, 0
br i1 %107, label %108, label %111
108: ; preds = %105
%109 = load i32, i32* %16
%110 = add nsw i32 %109, 6
store i32 %110, i32* %16
br label %111
111: ; preds = %108, %105
br label %112
112: ; preds = %111, %102
%113 = load i32, i32* %16
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds [6 x i32], [6 x i32]* %13, i64 0, i64 %114
%116 = load i32, i32* %115
%117 = load i32, i32* %11
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %5, i64 0, i64 %118
%120 = load i32, i32* %15
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds [6 x i32], [6 x i32]* %119, i64 0, i64 %121
store i32 %116, i32* %122
br label %123
123: ; preds = %112
%124 = load i32, i32* %15
%125 = add nsw i32 %124, 1
store i32 %125, i32* %15
br label %93
126: ; preds = %93
br label %127
127: ; preds = %126, %66
%128 = load i8, i8* %3
%129 = sext i8 %128 to i32
%130 = icmp eq i32 %129, 121
br i1 %130, label %131, label %185
131: ; preds = %127
%132 = bitcast [50 x i32]* %17 to i8*
store i32 0, i32* %18
br label %133
133: ; preds = %147, %131
%134 = load i32, i32* %18
%135 = icmp slt i32 %134, 50
br i1 %135, label %136, label %150
136: ; preds = %133
%137 = load i32, i32* %18
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %5, i64 0, i64 %138
%140 = load i32, i32* %11
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds [6 x i32], [6 x i32]* %139, i64 0, i64 %141
%143 = load i32, i32* %142
%144 = load i32, i32* %18
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds [50 x i32], [50 x i32]* %17, i64 0, i64 %145
store i32 %143, i32* %146
br label %147
147: ; preds = %136
%148 = load i32, i32* %18
%149 = add nsw i32 %148, 1
store i32 %149, i32* %18
br label %133
150: ; preds = %133
store i32 0, i32* %19
br label %151
151: ; preds = %181, %150
%152 = load i32, i32* %19
%153 = icmp slt i32 %152, 50
br i1 %153, label %154, label %184
154: ; preds = %151
%155 = load i32, i32* %19
%156 = load i32, i32* %12
%157 = sub nsw i32 %155, %156
store i32 %157, i32* %20
%158 = load i32, i32* %20
%159 = icmp sgt i32 %158, 50
br i1 %159, label %160, label %163
160: ; preds = %154
%161 = load i32, i32* %20
%162 = sub nsw i32 %161, 50
store i32 %162, i32* %20
br label %170
163: ; preds = %154
%164 = load i32, i32* %20
%165 = icmp slt i32 %164, 0
br i1 %165, label %166, label %169
166: ; preds = %163
%167 = load i32, i32* %20
%168 = add nsw i32 %167, 50
store i32 %168, i32* %20
br label %169
169: ; preds = %166, %163
br label %170
170: ; preds = %169, %160
%171 = load i32, i32* %20
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds [50 x i32], [50 x i32]* %17, i64 0, i64 %172
%174 = load i32, i32* %173
%175 = load i32, i32* %19
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %5, i64 0, i64 %176
%178 = load i32, i32* %11
%179 = sext i32 %178 to i64
%180 = getelementptr inbounds [6 x i32], [6 x i32]* %177, i64 0, i64 %179
store i32 %174, i32* %180
br label %181
181: ; preds = %170
%182 = load i32, i32* %19
%183 = add nsw i32 %182, 1
store i32 %183, i32* %19
br label %151
184: ; preds = %151
br label %185
185: ; preds = %184, %127
br label %186
186: ; preds = %185, %65
br label %28
187: ; preds = %28
store i32 0, i32* %6
br label %188
188: ; preds = %221, %187
%189 = load i32, i32* %6
%190 = icmp slt i32 %189, 6
br i1 %190, label %191, label %224
191: ; preds = %188
store i32 0, i32* %7
br label %192
192: ; preds = %216, %191
%193 = load i32, i32* %7
%194 = icmp slt i32 %193, 50
br i1 %194, label %195, label %219
195: ; preds = %192
%196 = load i32, i32* %7
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %5, i64 0, i64 %197
%199 = load i32, i32* %6
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds [6 x i32], [6 x i32]* %198, i64 0, i64 %200
%202 = load i32, i32* %201
%203 = icmp ne i32 %202, 0
%204 = zext i1 %203 to i64
%205 = select i1 %203, i32 35, i32 46
%206 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %205)
%207 = load i32, i32* %8
%208 = load i32, i32* %7
%209 = sext i32 %208 to i64
%210 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %5, i64 0, i64 %209
%211 = load i32, i32* %6
%212 = sext i32 %211 to i64
%213 = getelementptr inbounds [6 x i32], [6 x i32]* %210, i64 0, i64 %212
%214 = load i32, i32* %213
%215 = add nsw i32 %207, %214
store i32 %215, i32* %8
br label %216
216: ; preds = %195
%217 = load i32, i32* %7
%218 = add nsw i32 %217, 1
store i32 %218, i32* %7
br label %192
219: ; preds = %192
%220 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %221
221: ; preds = %219
%222 = load i32, i32* %6
%223 = add nsw i32 %222, 1
store i32 %223, i32* %6
br label %188
224: ; preds = %188
%225 = load i32, i32* %8
%226 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i32 %225)
%227 = load i32*, i32** %2
%228 = call i32 @fclose(i32* %227)
store i32 0, i32* %1
br label %229
229: ; preds = %224, %25
%230 = load i32, i32* %1
ret i32 %230
}

LLVM IR (-O2):
@.str = [6 x i8] c"input\00"
@.str.1 = [2 x i8] c"r\00"
@.str.3 = [3 x i8] c"%s\00"
@EOF = global i64 0
@.str.4 = [6 x i8] c"%ix%i\00"
@.str.5 = [15 x i8] c"%s %c=%i by %i\00"
@.str.8 = [25 x i8] c"There are %i Pixels on!\0A\00"
@str = [26 x i8] c"could not open input file\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca [64 x i8]
%3 = alloca [50 x [6 x i32]]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [6 x i32]
%9 = bitcast [6 x i32]* %8 to i8*
%10 = alloca [50 x i32]
%11 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%13 = bitcast [50 x [6 x i32]]* %3 to i8*
%14 = bitcast i32* %4 to i8*
%15 = bitcast i32* %5 to i8*
%16 = bitcast i32* %6 to i8*
%17 = bitcast i32* %7 to i8*
%18 = icmp eq i32* %11, null
br i1 %18, label %28, label %19
19: ; preds = %0
%20 = call i64 (i32*, i8*, ...) @fscanf(i32* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %12)
%21 = load i64, i64* @EOF
%22 = icmp eq i64 %20, %21
br i1 %22, label %202, label %23
23: ; preds = %19
%24 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 1
%25 = bitcast [50 x i32]* %10 to i8*
%26 = getelementptr inbounds [50 x i32], [50 x i32]* %10, i64 0, i64 48
%27 = getelementptr inbounds [50 x i32], [50 x i32]* %10, i64 0, i64 49
br label %30
28: ; preds = %0
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
br label %283
30: ; preds = %23, %198
%31 = load i8, i8* %24
%32 = icmp eq i8 %31, 101
br i1 %32, label %33, label %75
33: ; preds = %30
%34 = call i64 (i32*, i8*, ...) @fscanf(i32* %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32* %4, i32* %5)
%35 = load i32, i32* %5
%36 = icmp sgt i32 %35, 0
br i1 %36, label %37, label %198
37: ; preds = %33
%38 = load i32, i32* %4
%39 = icmp sgt i32 %38, 0
%40 = zext i32 %35 to i64
%41 = zext i32 %38 to i64
%42 = add nsw i64 %41, -1
%43 = and i64 %41, 3
%44 = icmp ult i64 %42, 3
%45 = and i64 %41, 4294967292
%46 = icmp eq i64 %43, 0
br label %47
47: ; preds = %37, %72
%48 = phi i64 [ 0, %37 ], [ %73, %72 ]
br i1 %39, label %49, label %72
49: ; preds = %47
br i1 %44, label %63, label %50
50: ; preds = %49, %50
%51 = phi i64 [ %60, %50 ], [ 0, %49 ]
%52 = phi i64 [ %61, %50 ], [ 0, %49 ]
%53 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %51, i64 %48
store i32 1, i32* %53
%54 = or i64 %51, 1
%55 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %54, i64 %48
store i32 1, i32* %55
%56 = or i64 %51, 2
%57 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %56, i64 %48
store i32 1, i32* %57
%58 = or i64 %51, 3
%59 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %58, i64 %48
store i32 1, i32* %59
%60 = add nuw nsw i64 %51, 4
%61 = add i64 %52, 4
%62 = icmp eq i64 %61, %45
br i1 %62, label %63, label %50
63: ; preds = %50, %49
%64 = phi i64 [ 0, %49 ], [ %60, %50 ]
br i1 %46, label %72, label %65
65: ; preds = %63, %65
%66 = phi i64 [ %69, %65 ], [ %64, %63 ]
%67 = phi i64 [ %70, %65 ], [ 0, %63 ]
%68 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %66, i64 %48
store i32 1, i32* %68
%69 = add nuw nsw i64 %66, 1
%70 = add i64 %67, 1
%71 = icmp eq i64 %70, %43
br i1 %71, label %72, label %65
72: ; preds = %63, %65, %47
%73 = add nuw nsw i64 %48, 1
%74 = icmp eq i64 %73, %40
br i1 %74, label %198, label %47
75: ; preds = %30
%76 = call i64 (i32*, i8*, ...) @fscanf(i32* %11, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i8* %12, i8* %1, i32* %6, i32* %7)
%77 = load i8, i8* %1
switch i8 %77, label %198 [
i8 120, label %78
i8 121, label %138
]
78: ; preds = %75
%79 = load i32, i32* %6
%80 = sext i32 %79 to i64
%81 = getelementptr [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %80, i64 0
%82 = bitcast i32* %81 to i8*
%83 = load i32, i32* %7
%84 = icmp slt i32 %83, -6
%85 = icmp sgt i32 %83, 0
%86 = select i1 %85, i32 6, i32 0
%87 = select i1 %84, i32 -6, i32 %86
%88 = sub i32 %87, %83
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [6 x i32], [6 x i32]* %8, i64 0, i64 %89
%91 = load i32, i32* %90
store i32 %91, i32* %81
%92 = icmp slt i32 %83, -5
%93 = icmp sgt i32 %83, 1
%94 = select i1 %93, i32 7, i32 1
%95 = select i1 %92, i32 -5, i32 %94
%96 = sub i32 %95, %83
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [6 x i32], [6 x i32]* %8, i64 0, i64 %97
%99 = load i32, i32* %98
%100 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %80, i64 1
store i32 %99, i32* %100
%101 = icmp slt i32 %83, -4
%102 = icmp sgt i32 %83, 2
%103 = select i1 %102, i32 8, i32 2
%104 = select i1 %101, i32 -4, i32 %103
%105 = sub i32 %104, %83
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [6 x i32], [6 x i32]* %8, i64 0, i64 %106
%108 = load i32, i32* %107
%109 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %80, i64 2
store i32 %108, i32* %109
%110 = icmp slt i32 %83, -3
%111 = icmp sgt i32 %83, 3
%112 = select i1 %111, i32 9, i32 3
%113 = select i1 %110, i32 -3, i32 %112
%114 = sub i32 %113, %83
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [6 x i32], [6 x i32]* %8, i64 0, i64 %115
%117 = load i32, i32* %116
%118 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %80, i64 3
store i32 %117, i32* %118
%119 = icmp slt i32 %83, -2
%120 = icmp sgt i32 %83, 4
%121 = select i1 %120, i32 10, i32 4
%122 = select i1 %119, i32 -2, i32 %121
%123 = sub i32 %122, %83
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [6 x i32], [6 x i32]* %8, i64 0, i64 %124
%126 = load i32, i32* %125
%127 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %80, i64 4
store i32 %126, i32* %127
%128 = icmp slt i32 %83, -1
%129 = xor i32 %83, -1
%130 = icmp sgt i32 %83, 5
%131 = select i1 %130, i32 11, i32 5
%132 = sub i32 %131, %83
%133 = select i1 %128, i32 %129, i32 %132
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds [6 x i32], [6 x i32]* %8, i64 0, i64 %134
%136 = load i32, i32* %135
%137 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %80, i64 5
store i32 %136, i32* %137
br label %198
138: ; preds = %75
%139 = load i32, i32* %6
%140 = sext i32 %139 to i64
br label %141
141: ; preds = %141, %138
%142 = phi i64 [ 0, %138 ], [ %160, %141 ]
%143 = or i64 %142, 1
%144 = or i64 %142, 2
%145 = or i64 %142, 3
%146 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %142, i64 %140
%147 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %143, i64 %140
%148 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %144, i64 %140
%149 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %145, i64 %140
%150 = load i32, i32* %146
%151 = load i32, i32* %147
%152 = load i32, i32* %148
%153 = load i32, i32* %149
%154 = insertelement <4 x i32> poison, i32 %150, i64 0
%155 = insertelement <4 x i32> %154, i32 %151, i64 1
%156 = insertelement <4 x i32> %155, i32 %152, i64 2
%157 = insertelement <4 x i32> %156, i32 %153, i64 3
%158 = getelementptr inbounds [50 x i32], [50 x i32]* %10, i64 0, i64 %142
%159 = bitcast i32* %158 to <4 x i32>*
store <4 x i32> %157, <4 x i32>* %159
%160 = add nuw i64 %142, 4
%161 = icmp eq i64 %160, 48
br i1 %161, label %162, label %141
162: ; preds = %141
%163 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 48, i64 %140
%164 = load i32, i32* %163
store i32 %164, i32* %26
%165 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 49, i64 %140
%166 = load i32, i32* %165
store i32 %166, i32* %27
%167 = load i32, i32* %7
br label %169
168: ; preds = %169
br label %198
169: ; preds = %169, %162
%170 = phi i64 [ 0, %162 ], [ %196, %169 ]
%171 = trunc i64 %170 to i32
%172 = sub nsw i32 %171, %167
%173 = icmp sgt i32 %172, 50
%174 = add nsw i32 %172, -50
%175 = icmp slt i32 %172, 0
%176 = add nsw i32 %172, 50
%177 = select i1 %175, i32 %176, i32 %172
%178 = select i1 %173, i32 %174, i32 %177
%179 = sext i32 %178 to i64
%180 = getelementptr inbounds [50 x i32], [50 x i32]* %10, i64 0, i64 %179
%181 = load i32, i32* %180
%182 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %170, i64 %140
store i32 %181, i32* %182
%183 = or i64 %170, 1
%184 = trunc i64 %183 to i32
%185 = sub nsw i32 %184, %167
%186 = icmp sgt i32 %185, 50
%187 = add nsw i32 %185, -50
%188 = icmp slt i32 %185, 0
%189 = add nsw i32 %185, 50
%190 = select i1 %188, i32 %189, i32 %185
%191 = select i1 %186, i32 %187, i32 %190
%192 = sext i32 %191 to i64
%193 = getelementptr inbounds [50 x i32], [50 x i32]* %10, i64 0, i64 %192
%194 = load i32, i32* %193
%195 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %183, i64 %140
store i32 %194, i32* %195
%196 = add nuw nsw i64 %170, 2
%197 = icmp eq i64 %196, 50
br i1 %197, label %168, label %169
198: ; preds = %72, %78, %33, %75, %168
%199 = call i64 (i32*, i8*, ...) @fscanf(i32* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %12)
%200 = load i64, i64* @EOF
%201 = icmp eq i64 %199, %200
br i1 %201, label %202, label %30
202: ; preds = %198, %19
br label %203
203: ; preds = %202, %203
%204 = phi i64 [ %212, %203 ], [ 0, %202 ]
%205 = phi i32 [ %211, %203 ], [ 0, %202 ]
%206 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %204, i64 0
%207 = load i32, i32* %206
%208 = icmp eq i32 %207, 0
%209 = select i1 %208, i32 46, i32 35
%210 = call i32 @putchar(i32 %209)
%211 = add nsw i32 %207, %205
%212 = add nuw nsw i64 %204, 1
%213 = icmp eq i64 %212, 50
br i1 %213, label %214, label %203
214: ; preds = %203
%215 = call i32 @putchar(i32 10)
br label %216
216: ; preds = %216, %214
%217 = phi i64 [ 0, %214 ], [ %225, %216 ]
%218 = phi i32 [ %211, %214 ], [ %224, %216 ]
%219 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %217, i64 1
%220 = load i32, i32* %219
%221 = icmp eq i32 %220, 0
%222 = select i1 %221, i32 46, i32 35
%223 = call i32 @putchar(i32 %222)
%224 = add nsw i32 %220, %218
%225 = add nuw nsw i64 %217, 1
%226 = icmp eq i64 %225, 50
br i1 %226, label %227, label %216
227: ; preds = %216
%228 = call i32 @putchar(i32 10)
br label %229
229: ; preds = %229, %227
%230 = phi i64 [ 0, %227 ], [ %238, %229 ]
%231 = phi i32 [ %224, %227 ], [ %237, %229 ]
%232 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %230, i64 2
%233 = load i32, i32* %232
%234 = icmp eq i32 %233, 0
%235 = select i1 %234, i32 46, i32 35
%236 = call i32 @putchar(i32 %235)
%237 = add nsw i32 %233, %231
%238 = add nuw nsw i64 %230, 1
%239 = icmp eq i64 %238, 50
br i1 %239, label %240, label %229
240: ; preds = %229
%241 = call i32 @putchar(i32 10)
br label %242
242: ; preds = %242, %240
%243 = phi i64 [ 0, %240 ], [ %251, %242 ]
%244 = phi i32 [ %237, %240 ], [ %250, %242 ]
%245 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %243, i64 3
%246 = load i32, i32* %245
%247 = icmp eq i32 %246, 0
%248 = select i1 %247, i32 46, i32 35
%249 = call i32 @putchar(i32 %248)
%250 = add nsw i32 %246, %244
%251 = add nuw nsw i64 %243, 1
%252 = icmp eq i64 %251, 50
br i1 %252, label %253, label %242
253: ; preds = %242
%254 = call i32 @putchar(i32 10)
br label %255
255: ; preds = %255, %253
%256 = phi i64 [ 0, %253 ], [ %264, %255 ]
%257 = phi i32 [ %250, %253 ], [ %263, %255 ]
%258 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %256, i64 4
%259 = load i32, i32* %258
%260 = icmp eq i32 %259, 0
%261 = select i1 %260, i32 46, i32 35
%262 = call i32 @putchar(i32 %261)
%263 = add nsw i32 %259, %257
%264 = add nuw nsw i64 %256, 1
%265 = icmp eq i64 %264, 50
br i1 %265, label %266, label %255
266: ; preds = %255
%267 = call i32 @putchar(i32 10)
br label %268
268: ; preds = %268, %266
%269 = phi i64 [ 0, %266 ], [ %277, %268 ]
%270 = phi i32 [ %263, %266 ], [ %276, %268 ]
%271 = getelementptr inbounds [50 x [6 x i32]], [50 x [6 x i32]]* %3, i64 0, i64 %269, i64 5
%272 = load i32, i32* %271
%273 = icmp eq i32 %272, 0
%274 = select i1 %273, i32 46, i32 35
%275 = call i32 @putchar(i32 %274)
%276 = add nsw i32 %272, %270
%277 = add nuw nsw i64 %269, 1
%278 = icmp eq i64 %277, 50
br i1 %278, label %279, label %268
279: ; preds = %268
%280 = call i32 @putchar(i32 10)
%281 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i32 %276)
%282 = call i32 @fclose(i32* %11)
br label %283
283: ; preds = %279, %28
%284 = phi i32 [ -1, %28 ], [ 0, %279 ]
ret i32 %284
}