#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 /*<<< orphan*/ make_hor_output(int, int, char const *, char *, int *);
int /*<<< orphan*/ make_ver_output(int, int, char const **, char *, int *);
int /*<<< orphan*/ printf(char *, ...);
int scanf(char *, int *, char *);
int strlen(char *);
int main() {
  const char hor_1[10] = {'1', '0', '1', '1', '0', '1', '1', '1', '1', '1'};
  const char *ver_1[10] = {"11", "01", "01", "01", "11",
                           "10", "10", "01", "11", "11"};
  const char hor_2[10] = {'0', '0', '1', '1', '1', '1', '1', '0', '1', '1'};
  const char *ver_2[10] = {"11", "01", "10", "01", "01",
                           "01", "11", "01", "11", "01"};
  const char hor_3[10] = {'1', '0', '1', '1', '0', '1', '1', '0', '1', '1'};
  int size;
  char num_string[8 + 1];
  int number[8];
  int num_digit;
  int i, pos;
  char output_hor_1[200], output_hor_2[200], output_hor_3[200];
  char output_ver_1[200], output_ver_2[200];
  while (scanf("%d %s", &size, num_string) == 2) {
    if (size == 0 && num_string[0] == '0') {
      break;
    }
    num_digit = strlen(num_string);
    for (i = 0; i < num_digit; i++) {
      number[i] = num_string[i] - '0';
    }
    for (pos = 0, i = 0; i < num_digit; i++) {
      make_hor_output(number[i], size, hor_1, output_hor_1, &pos);
      output_hor_1[++pos] = ' ';
      ++pos;
    }
    output_hor_1[pos - 1] = '\0';
    for (pos = 0, i = 0; i < num_digit; i++) {
      make_ver_output(number[i], size, ver_1, output_ver_1, &pos);
      output_ver_1[++pos] = ' ';
      ++pos;
    }
    output_ver_1[pos - 1] = '\0';
    for (pos = 0, i = 0; i < num_digit; i++) {
      make_hor_output(number[i], size, hor_2, output_hor_2, &pos);
      output_hor_2[++pos] = ' ';
      ++pos;
    }
    output_hor_2[pos - 1] = '\0';
    for (pos = 0, i = 0; i < num_digit; i++) {
      make_ver_output(number[i], size, ver_2, output_ver_2, &pos);
      output_ver_2[++pos] = ' ';
      ++pos;
    }
    output_ver_2[pos - 1] = '\0';
    for (pos = 0, i = 0; i < num_digit; i++) {
      make_hor_output(number[i], size, hor_3, output_hor_3, &pos);
      output_hor_3[++pos] = ' ';
      ++pos;
    }
    output_hor_3[pos - 1] = '\0';
    printf("%s\n", output_hor_1);
    for (i = 0; i < size; i++) {
      printf("%s\n", output_ver_1);
    }
    printf("%s\n", output_hor_2);
    for (i = 0; i < size; i++) {
      printf("%s\n", output_ver_2);
    }
    printf("%s\n", output_hor_3);
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x520,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xe87(%rip),%rax
mov    %rax,-0xe(%rbp)
mov    0xe84(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0x60(%rbp),%rdi
lea    0x2bed(%rip),%rsi
mov    $0x50,%edx
call   1060 <memcpy@plt>
mov    0xe66(%rip),%rax
mov    %rax,-0x6a(%rbp)
mov    0xe63(%rip),%ax
mov    %ax,-0x62(%rbp)
lea    -0xc0(%rbp),%rdi
lea    0x2c0f(%rip),%rsi
mov    $0x50,%edx
call   1060 <memcpy@plt>
mov    0xe42(%rip),%rax
mov    %rax,-0xca(%rbp)
mov    0xe3c(%rip),%ax
mov    %ax,-0xc2(%rbp)
lea    -0xd9(%rbp),%rdx
lea    0xe32(%rip),%rdi
lea    -0xd0(%rbp),%rsi
call   1080 <scanf@plt>
cmp    $0x2,%eax
jne    1690 <main+0x530>
cmpl   $0x0,-0xd0(%rbp)
jne    122c <main+0xcc>
movsbl -0xd9(%rbp),%eax
cmp    $0x30,%eax
jne    122c <main+0xcc>
jmp    1690 <main+0x530>
lea    -0xd9(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x104(%rbp)
movl   $0x0,-0x108(%rbp)
mov    -0x108(%rbp),%eax
cmp    -0x104(%rbp),%eax
jge    128e <main+0x12e>
movslq -0x108(%rbp),%rax
movsbl -0xd9(%rbp,%rax,1),%ecx
ff
sub    $0x30,%ecx
movslq -0x108(%rbp),%rax
mov    %ecx,-0x100(%rbp,%rax,4)
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    1248 <main+0xe8>
movl   $0x0,-0x10c(%rbp)
movl   $0x0,-0x108(%rbp)
mov    -0x108(%rbp),%eax
cmp    -0x104(%rbp),%eax
jge    131b <main+0x1bb>
movslq -0x108(%rbp),%rax
mov    -0x100(%rbp,%rax,4),%edi
mov    -0xd0(%rbp),%esi
lea    -0xe(%rbp),%rdx
lea    -0x1e0(%rbp),%rcx
lea    -0x10c(%rbp),%r8
call   1070 <make_hor_output@plt>
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
cltq
movb   $0x20,-0x1e0(%rbp,%rax,1)
20
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    12a2 <main+0x142>
mov    -0x10c(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x1e0(%rbp,%rax,1)
movl   $0x0,-0x10c(%rbp)
movl   $0x0,-0x108(%rbp)
mov    -0x108(%rbp),%eax
cmp    -0x104(%rbp),%eax
jge    13bb <main+0x25b>
movslq -0x108(%rbp),%rax
mov    -0x100(%rbp,%rax,4),%edi
mov    -0xd0(%rbp),%esi
lea    -0x60(%rbp),%rdx
lea    -0x450(%rbp),%rcx
lea    -0x10c(%rbp),%r8
call   1050 <make_ver_output@plt>
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
cltq
movb   $0x20,-0x450(%rbp,%rax,1)
20
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    1342 <main+0x1e2>
mov    -0x10c(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x450(%rbp,%rax,1)
movl   $0x0,-0x10c(%rbp)
movl   $0x0,-0x108(%rbp)
mov    -0x108(%rbp),%eax
cmp    -0x104(%rbp),%eax
jge    145b <main+0x2fb>
movslq -0x108(%rbp),%rax
mov    -0x100(%rbp,%rax,4),%edi
mov    -0xd0(%rbp),%esi
lea    -0x6a(%rbp),%rdx
lea    -0x2b0(%rbp),%rcx
lea    -0x10c(%rbp),%r8
call   1070 <make_hor_output@plt>
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
cltq
movb   $0x20,-0x2b0(%rbp,%rax,1)
20
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    13e2 <main+0x282>
mov    -0x10c(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x2b0(%rbp,%rax,1)
movl   $0x0,-0x10c(%rbp)
movl   $0x0,-0x108(%rbp)
mov    -0x108(%rbp),%eax
cmp    -0x104(%rbp),%eax
jge    14fe <main+0x39e>
movslq -0x108(%rbp),%rax
mov    -0x100(%rbp,%rax,4),%edi
mov    -0xd0(%rbp),%esi
lea    -0xc0(%rbp),%rdx
lea    -0x520(%rbp),%rcx
lea    -0x10c(%rbp),%r8
call   1050 <make_ver_output@plt>
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
cltq
movb   $0x20,-0x520(%rbp,%rax,1)
20
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    1482 <main+0x322>
mov    -0x10c(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x520(%rbp,%rax,1)
movl   $0x0,-0x10c(%rbp)
movl   $0x0,-0x108(%rbp)
mov    -0x108(%rbp),%eax
cmp    -0x104(%rbp),%eax
jge    15a1 <main+0x441>
movslq -0x108(%rbp),%rax
mov    -0x100(%rbp,%rax,4),%edi
mov    -0xd0(%rbp),%esi
lea    -0xca(%rbp),%rdx
lea    -0x380(%rbp),%rcx
lea    -0x10c(%rbp),%r8
call   1070 <make_hor_output@plt>
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
cltq
movb   $0x20,-0x380(%rbp,%rax,1)
20
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    1525 <main+0x3c5>
mov    -0x10c(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x380(%rbp,%rax,1)
lea    -0x1e0(%rbp),%rsi
lea    0xa6b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x108(%rbp)
mov    -0x108(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jge    160e <main+0x4ae>
lea    -0x450(%rbp),%rsi
lea    0xa3a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    15d3 <main+0x473>
lea    -0x2b0(%rbp),%rsi
lea    0xa11(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x108(%rbp)
mov    -0x108(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jge    1668 <main+0x508>
lea    -0x520(%rbp),%rsi
lea    0x9e0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    162d <main+0x4cd>
lea    -0x380(%rbp),%rsi
lea    0x9b7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x9ab(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11e7 <main+0x87>
xor    %eax,%eax
add    $0x520,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x518,%rsp
movabs $0x3131313031313031,%rax
31 31 31
mov    %rax,0x60(%rsp)
movw   $0x3131,0x68(%rsp)
movaps 0x2c32(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0x2c13(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0x2bf4(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0x2bd5(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0x2bb6(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movabs $0x3031313131313030,%rax
31 31 30
mov    %rax,0x50(%rsp)
movw   $0x3131,0x58(%rsp)
movaps 0x2c21(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0x2c02(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0x2be3(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0x2bc4(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movdqa 0x2ba4(%rip),%xmm0
movdqa %xmm0,0x70(%rsp)
movabs $0x3031313031313031,%rax
31 31 30
mov    %rax,0x40(%rsp)
movw   $0x3131,0x48(%rsp)
lea    0xde8(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x13(%rsp),%rdx
call   1080 <scanf@plt>
cmp    $0x2,%eax
jne    16cd <main+0x56d>
lea    0x13(%rsp),%rbx
lea    0x8(%rsp),%r14
jmp    12b4 <main+0x154>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r13,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd9e(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x13(%rsp),%rbx
mov    %rbx,%rdx
call   1080 <scanf@plt>
cmp    $0x2,%eax
jne    16cd <main+0x56d>
cmpl   $0x0,0xc(%rsp)
jne    12c6 <main+0x166>
cmpb   $0x30,0x13(%rsp)
je     16cd <main+0x56d>
mov    %rbx,%rdi
call   1050 <strlen@plt>
test   %eax,%eax
jle    1600 <main+0x4a0>
mov    %eax,%r13d
mov    %eax,%r15d
cmp    $0x8,%eax
jae    12f0 <main+0x190>
xor    %eax,%eax
jmp    13f0 <main+0x290>
nopl   0x0(%rax,%rax,1)
mov    %r15d,%eax
and    $0xfffffff8,%eax
lea    -0x8(%rax),%rcx
mov    %rcx,%rdx
shr    $0x3,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
movdqa 0xcf0(%rip),%xmm2
je     16b6 <main+0x556>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
nop
movd   0x13(%rsp,%rcx,1),%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
movd   0x17(%rsp,%rcx,1),%xmm1
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
psrad  $0x18,%xmm0
psrad  $0x18,%xmm1
paddd  %xmm2,%xmm0
paddd  %xmm2,%xmm1
movdqa %xmm0,0x20(%rsp,%rcx,4)
movdqa %xmm1,0x30(%rsp,%rcx,4)
movd   0x1b(%rsp,%rcx,1),%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
movd   0x1f(%rsp,%rcx,1),%xmm1
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
psrad  $0x18,%xmm0
psrad  $0x18,%xmm1
paddd  %xmm2,%xmm0
paddd  %xmm2,%xmm1
movdqa %xmm0,0x40(%rsp,%rcx,4)
movdqa %xmm1,0x50(%rsp,%rcx,4)
add    $0x10,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1320 <main+0x1c0>
test   $0x1,%dl
je     13dd <main+0x27d>
movd   0x13(%rsp,%rcx,1),%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
movd   0x17(%rsp,%rcx,1),%xmm1
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
psrad  $0x18,%xmm0
psrad  $0x18,%xmm1
paddd  %xmm2,%xmm0
paddd  %xmm2,%xmm1
movdqa %xmm0,0x20(%rsp,%rcx,4)
movdqa %xmm1,0x30(%rsp,%rcx,4)
cmp    %r15,%rax
je     1405 <main+0x2a5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl 0x13(%rsp,%rax,1),%ecx
add    $0xffffffd0,%ecx
mov    %ecx,0x20(%rsp,%rax,4)
add    $0x1,%rax
cmp    %rax,%r15
jne    13f0 <main+0x290>
movl   $0x0,0x8(%rsp)
test   %r13d,%r13d
jle    1600 <main+0x4a0>
xor    %ebx,%ebx
lea    0x450(%rsp),%rbp
lea    0x60(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x20(%rsp,%rbx,4),%edi
mov    0xc(%rsp),%esi
mov    %r12,%rdx
mov    %rbp,%rcx
mov    %r14,%r8
call   1070 <make_hor_output@plt>
movslq 0x8(%rsp),%rax
movb   $0x20,0x1(%rax,%rbp,1)
lea    0x2(%rax),%ecx
mov    %ecx,0x8(%rsp)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1430 <main+0x2d0>
movb   $0x0,0x1(%rax,%rbp,1)
movl   $0x0,0x8(%rsp)
mov    %r13d,0x1c(%rsp)
test   %r13d,%r13d
lea    0xc0(%rsp),%r13
lea    0x110(%rsp),%r14
jle    1608 <main+0x4a8>
xor    %ebx,%ebx
lea    0x8(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x20(%rsp,%rbx,4),%edi
mov    0xc(%rsp),%esi
mov    %r13,%rdx
mov    %r14,%rcx
mov    %rbp,%r8
call   1060 <make_ver_output@plt>
movslq 0x8(%rsp),%rax
movb   $0x20,0x1(%rax,%r14,1)
lea    0x2(%rax),%ecx
mov    %ecx,0x8(%rsp)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    14a0 <main+0x340>
movb   $0x0,0x1(%rax,%r14,1)
movl   $0x0,0x8(%rsp)
cmpl   $0x0,0x1c(%rsp)
jle    1610 <main+0x4b0>
xor    %ebx,%ebx
lea    0x8(%rsp),%r14
lea    0x50(%rsp),%r12
lea    0x380(%rsp),%rbp
xchg   %ax,%ax
mov    0x20(%rsp,%rbx,4),%edi
mov    0xc(%rsp),%esi
mov    %r12,%rdx
mov    %rbp,%rcx
mov    %r14,%r8
call   1070 <make_hor_output@plt>
movslq 0x8(%rsp),%rax
movb   $0x20,0x1(%rax,%rbp,1)
lea    0x2(%rax),%ecx
mov    %ecx,0x8(%rsp)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1500 <main+0x3a0>
movb   $0x0,0x1(%rax,%rbp,1)
movl   $0x0,0x8(%rsp)
cmpl   $0x0,0x1c(%rsp)
lea    0x70(%rsp),%r12
jle    161d <main+0x4bd>
xor    %ebx,%ebx
lea    0x1e0(%rsp),%rbp
nopw   0x0(%rax,%rax,1)
mov    0x20(%rsp,%rbx,4),%edi
mov    0xc(%rsp),%esi
mov    %r12,%rdx
mov    %rbp,%rcx
mov    %r14,%r8
call   1060 <make_ver_output@plt>
movslq 0x8(%rsp),%rax
movb   $0x20,0x1(%rax,%rbp,1)
lea    0x2(%rax),%ecx
mov    %ecx,0x8(%rsp)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1560 <main+0x400>
movb   $0x0,0x1(%rax,%rbp,1)
movl   $0x0,0x8(%rsp)
cmpl   $0x0,0x1c(%rsp)
mov    %rbp,%r12
jle    16c6 <main+0x566>
xor    %ebx,%ebx
lea    0x110(%rsp),%rbp
lea    0x2b0(%rsp),%r13
nopl   (%rax)
mov    0x20(%rsp,%rbx,4),%edi
mov    0xc(%rsp),%esi
lea    0x40(%rsp),%rdx
mov    %r13,%rcx
mov    %r14,%r8
call   1070 <make_hor_output@plt>
movslq 0x8(%rsp),%rax
movb   $0x20,0x1(%rax,%r13,1)
add    $0x2,%eax
mov    %eax,0x8(%rsp)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    15c0 <main+0x460>
jmp    1647 <main+0x4e7>
cs nopw 0x0(%rax,%rax,1)
nop
movb   $0x0,0x44f(%rsp)
movb   $0x0,0x10f(%rsp)
movb   $0x0,0x37f(%rsp)
lea    0x8(%rsp),%r14
movb   $0x0,0x1df(%rsp)
movl   $0x0,0x8(%rsp)
xor    %eax,%eax
lea    0x1e0(%rsp),%r12
lea    0x110(%rsp),%rbp
lea    0x2b0(%rsp),%r13
cltq
movb   $0x0,-0x1(%rax,%r13,1)
lea    0x450(%rsp),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0xc(%rsp)
jle    1681 <main+0x521>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbp,%rdi
call   1040 <puts@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     1670 <main+0x510>
lea    0x380(%rsp),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0xc(%rsp)
jle    1280 <main+0x120>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
call   1040 <puts@plt>
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
jl     16a0 <main+0x540>
jmp    1280 <main+0x120>
xor    %ecx,%ecx
test   $0x1,%dl
jne    13a3 <main+0x243>
jmp    13dd <main+0x27d>
xor    %eax,%eax
jmp    1637 <main+0x4d7>
xor    %eax,%eax
add    $0x518,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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