#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 abs(int);
int countchar(int);
int /*<<< orphan*/ freopen(char *, char *, int /*<<< orphan*/);
int isdivisable(int, int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ scanf(char *, int *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main() {
  freopen("In.txt", "r", stdin);
  freopen("out.txt", "w", stdout);
  int n, i, j, k, l = 1, m, a, b, c, in_avg, rest;
  char ch = ' ';
  while (scanf("%d", &n) && n) {
    b = 0, m = 0;
    for (i = 1; i <= n; i++) {
      scanf("%d", &a);
      b = b + a;
    }
    c = abs(b);
    m = isdivisable(c, n);
    if (isdivisable(c, n) && m != 0) {
      c = c / m;
      n = n / m;
    }
    in_avg = c / n;
    rest = c - in_avg * n;
    j = countchar(in_avg);
    k = countchar(n);
    if (n == 1 || rest == 0) {
      if (b < 0) {
        printf("Case %d:\n- %d\n", l, in_avg);
      } else {
        printf("Case %d:\n%d\n", l, in_avg);
      }
    } else if (c > n) {
      if (b > 0) {
        printf("Case %d:\n", l);
        for (i = 0; i < j + k - 1; i++) {
          printf(" ");
        }
        printf("%d\n", rest);
        printf("%d", in_avg);
        for (i = 0; i < k; i++) {
          printf("-");
        }
        printf("\n");
        for (i = 0; i < j; i++) {
          printf(" ");
        }
        printf("%d\n", n);
      } else if (b < 0) {
        printf("Case %d:\n", l);
        for (i = 0; i < j + k + 1; i++) {
          printf(" ");
        }
        printf("%d\n", rest);
        printf("- %d", in_avg);
        for (i = 0; i < k; i++) {
          printf("-");
        }
        printf("\n");
        for (i = 0; i < j + 2; i++) {
          printf(" ");
        }
        printf("%d\n", n);
      }
    } else if (c < n) {
      if (b > 0) {
        printf("Case %d:\n", l);
        for (i = 0; i < j + k - 1; i++) {
          printf(" ");
        }
        printf("%d\n", rest);
        for (i = 0; i < k; i++) {
          printf("-");
        }
        printf("\n");
        for (i = 0; i < j; i++) {
          printf(" ");
        }
        printf("%d\n", n);
      } else if (b < 0) {
        printf("Case %d:\n", l);
        for (i = 0; i < j + k + 1; i++) {
          printf(" ");
        }
        printf("%d\n", rest);
        printf("- ");
        for (i = 0; i < k; i++) {
          printf("-");
        }
        printf("\n");
        for (i = 0; i < j + 2; i++) {
          printf(" ");
        }
        printf("%d\n", n);
      }
    }
    l++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e72(%rip),%rax
mov    (%rax),%edx
lea    0xe81(%rip),%rdi
lea    0xe81(%rip),%rsi
call   1060 <freopen@plt>
mov    0x2e46(%rip),%rax
mov    (%rax),%edx
lea    0xe6e(%rip),%rdi
lea    0xe6f(%rip),%rsi
call   1060 <freopen@plt>
movl   $0x1,-0x18(%rbp)
movb   $0x20,-0x31(%rbp)
lea    0xe84(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1080 <scanf@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x32(%rbp)
je     11de <main+0x7e>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0x32(%rbp)
mov    -0x32(%rbp),%al
test   $0x1,%al
jne    11ee <main+0x8e>
jmp    1708 <main+0x5a8>
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1236 <main+0xd6>
lea    0xe27(%rip),%rdi
lea    -0x20(%rbp),%rsi
call   1080 <scanf@plt>
mov    -0x24(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1203 <main+0xa3>
mov    -0x24(%rbp),%edi
call   1040 <abs@plt>
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1070 <isdivisable@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1070 <isdivisable@plt>
cmp    $0x0,%eax
je     1281 <main+0x121>
cmpl   $0x0,-0x1c(%rbp)
je     1281 <main+0x121>
mov    -0x28(%rbp),%eax
cltd
idivl  -0x1c(%rbp)
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x1c(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0x28(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x2c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x30(%rbp)
mov    -0x2c(%rbp),%edi
call   1030 <countchar@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <countchar@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     12c4 <main+0x164>
cmpl   $0x0,-0x30(%rbp)
jne    1300 <main+0x1a0>
cmpl   $0x0,-0x24(%rbp)
jge    12e7 <main+0x187>
mov    -0x18(%rbp),%esi
mov    -0x2c(%rbp),%edx
lea    0xd38(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    12fb <main+0x19b>
mov    -0x18(%rbp),%esi
mov    -0x2c(%rbp),%edx
lea    0xd2e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    16fa <main+0x59a>
mov    -0x28(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1502 <main+0x3a2>
cmpl   $0x0,-0x24(%rbp)
jle    1402 <main+0x2a2>
mov    -0x18(%rbp),%esi
lea    0xd0f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    135e <main+0x1fe>
lea    0xcf8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    132e <main+0x1ce>
mov    -0x30(%rbp),%esi
lea    0xcc3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x2c(%rbp),%esi
lea    0xcc4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13af <main+0x24f>
lea    0xc9f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1387 <main+0x227>
lea    0xc81(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    13ec <main+0x28c>
lea    0xc6a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    13c4 <main+0x264>
mov    -0x8(%rbp),%esi
lea    0xc35(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14fd <main+0x39d>
cmpl   $0x0,-0x24(%rbp)
jge    14f8 <main+0x398>
mov    -0x18(%rbp),%esi
lea    0xc19(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    -0x14(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1454 <main+0x2f4>
lea    0xc02(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1424 <main+0x2c4>
mov    -0x30(%rbp),%esi
lea    0xbcd(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x2c(%rbp),%esi
lea    0xbcc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    14a5 <main+0x345>
lea    0xba9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    147d <main+0x31d>
lea    0xb8b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    14e7 <main+0x387>
lea    0xb6f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    14ba <main+0x35a>
mov    -0x8(%rbp),%esi
lea    0xb3a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14fd <main+0x39d>
jmp    16f5 <main+0x595>
mov    -0x28(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    16f0 <main+0x590>
cmpl   $0x0,-0x24(%rbp)
jle    15f3 <main+0x493>
mov    -0x18(%rbp),%esi
lea    0xb0d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1560 <main+0x400>
lea    0xaf6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1530 <main+0x3d0>
mov    -0x30(%rbp),%esi
lea    0xac1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    15a0 <main+0x440>
lea    0xaae(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1578 <main+0x418>
lea    0xa90(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    15dd <main+0x47d>
lea    0xa79(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    15b5 <main+0x455>
mov    -0x8(%rbp),%esi
lea    0xa44(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    16eb <main+0x58b>
cmpl   $0x0,-0x24(%rbp)
jge    16e6 <main+0x586>
mov    -0x18(%rbp),%esi
lea    0xa28(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    -0x14(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1645 <main+0x4e5>
lea    0xa11(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1615 <main+0x4b5>
mov    -0x30(%rbp),%esi
lea    0x9dc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x9e3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1693 <main+0x533>
lea    0x9bb(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    166b <main+0x50b>
lea    0x99d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    16d5 <main+0x575>
lea    0x981(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    16a8 <main+0x548>
mov    -0x8(%rbp),%esi
lea    0x94c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    16eb <main+0x58b>
jmp    16f0 <main+0x590>
jmp    16f5 <main+0x595>
jmp    16fa <main+0x59a>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11b2 <main+0x52>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x2e73(%rip),%rax
mov    (%rax),%edx
lea    0xe82(%rip),%rdi
lea    0xe82(%rip),%rsi
call   1060 <freopen@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%edx
lea    0xe6f(%rip),%rdi
lea    0xe70(%rip),%rsi
call   1060 <freopen@plt>
lea    0xe8e(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1080 <scanf@plt>
test   %rax,%rax
je     1609 <main+0x4a9>
mov    0x4(%rsp),%esi
test   %esi,%esi
je     1609 <main+0x4a9>
mov    $0x1,%r13d
lea    0xe62(%rip),%r12
lea    0x14(%rsp),%r14
xchg   %ax,%ax
mov    %r13d,0x8(%rsp)
mov    $0x0,%ebp
test   %esi,%esi
jle    121a <main+0xba>
xor    %ebx,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r12,%rdi
mov    %r14,%rsi
call   1080 <scanf@plt>
add    0x14(%rsp),%ebp
mov    0x4(%rsp),%esi
add    $0x1,%ebx
cmp    %esi,%ebx
jl     1200 <main+0xa0>
mov    %ebp,%r13d
neg    %r13d
cmovs  %ebp,%r13d
mov    %r13d,%edi
call   1070 <isdivisable@plt>
mov    %eax,%ebx
mov    0x4(%rsp),%esi
mov    %r13d,%edi
call   1070 <isdivisable@plt>
test   %eax,%eax
je     1260 <main+0x100>
test   %ebx,%ebx
je     1260 <main+0x100>
mov    %r13d,%eax
cltd
idiv   %ebx
mov    0x4(%rsp),%ecx
mov    %eax,%r13d
mov    %ecx,%eax
cltd
idiv   %ebx
mov    %eax,%ecx
mov    %eax,0x4(%rsp)
jmp    1264 <main+0x104>
nopl   0x0(%rax)
mov    0x4(%rsp),%ecx
mov    %r13d,%eax
cltd
idiv   %ecx
mov    %edx,%ebx
mov    %eax,0xc(%rsp)
mov    %eax,%edi
call   1030 <countchar@plt>
mov    %eax,%r15d
mov    0x4(%rsp),%edi
call   1030 <countchar@plt>
mov    %eax,%r14d
mov    0x4(%rsp),%eax
cmp    $0x1,%eax
je     1370 <main+0x210>
test   %ebx,%ebx
je     1370 <main+0x210>
cmp    %eax,%r13d
jle    1390 <main+0x230>
test   %ebp,%ebp
jle    1464 <main+0x304>
mov    %ebx,0x10(%rsp)
lea    0xd78(%rip),%rdi
mov    0x8(%rsp),%r13d
mov    %r13d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    (%r14,%r15,1),%ebp
cmp    $0x2,%ebp
jl     12ef <main+0x18f>
add    $0xffffffff,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x20,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%ebp
jne    12e0 <main+0x180>
lea    0xd35(%rip),%rdi
mov    0x10(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r12,%rdi
mov    0xc(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r14d,%r14d
jle    1330 <main+0x1d0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x2d,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%r14d
jne    1320 <main+0x1c0>
mov    $0xa,%edi
call   1040 <putchar@plt>
test   %r15d,%r15d
jle    15d0 <main+0x470>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x20,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%r15d
jne    1350 <main+0x1f0>
jmp    15d0 <main+0x470>
cs nopw 0x0(%rax,%rax,1)
nop
test   %ebp,%ebp
js     1445 <main+0x2e5>
lea    0xca3(%rip),%rdi
jmp    144c <main+0x2ec>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x8(%rsp),%r13d
jge    15e2 <main+0x482>
test   %ebp,%ebp
jle    1525 <main+0x3c5>
mov    %ebx,%ebp
lea    0xc83(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    (%r14,%r15,1),%ebx
cmp    $0x2,%ebx
jl     13df <main+0x27f>
add    $0xffffffff,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x20,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%ebx
jne    13d0 <main+0x270>
lea    0xc45(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r14d,%r14d
jle    1410 <main+0x2b0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x2d,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%r14d
jne    1400 <main+0x2a0>
mov    $0xa,%edi
call   1040 <putchar@plt>
test   %r15d,%r15d
jle    15d0 <main+0x470>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x20,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%r15d
jne    1430 <main+0x2d0>
jmp    15d0 <main+0x470>
lea    0xbc7(%rip),%rdi
mov    0x8(%rsp),%r13d
mov    %r13d,%esi
mov    0xc(%rsp),%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    15e2 <main+0x482>
mov    0x8(%rsp),%r13d
jns    15e2 <main+0x482>
mov    %ebx,0x10(%rsp)
lea    0xbb5(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14d,%eax
add    %r15d,%eax
js     14af <main+0x34f>
lea    (%r14,%r15,1),%ebp
add    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x20,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%ebp
jne    14a0 <main+0x340>
lea    0xb75(%rip),%rdi
mov    0x10(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xb71(%rip),%rdi
mov    0xc(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r14d,%r14d
jle    14f0 <main+0x390>
nopl   0x0(%rax,%rax,1)
mov    $0x2d,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%r14d
jne    14e0 <main+0x380>
mov    $0xa,%edi
call   1040 <putchar@plt>
cmp    $0xffffffff,%r15d
jl     15d0 <main+0x470>
add    $0x2,%r15d
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%r15d
jne    1510 <main+0x3b0>
jmp    15d0 <main+0x470>
jns    15e2 <main+0x482>
mov    %ebx,%ebp
lea    0xafb(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14d,%eax
add    %r15d,%eax
js     155f <main+0x3ff>
lea    (%r14,%r15,1),%ebx
add    $0x1,%ebx
nopl   (%rax)
mov    $0x20,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%ebx
jne    1550 <main+0x3f0>
lea    0xac5(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xac8(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r14d,%r14d
jle    15a0 <main+0x440>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2d,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%r14d
jne    1590 <main+0x430>
mov    $0xa,%edi
call   1040 <putchar@plt>
cmp    $0xffffffff,%r15d
jl     15d0 <main+0x470>
add    $0x2,%r15d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x20,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%r15d
jne    15c0 <main+0x460>
mov    0x4(%rsp),%esi
lea    0xa50(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r12,%rdi
lea    0x4(%rsp),%rsi
call   1080 <scanf@plt>
test   %rax,%rax
lea    0x14(%rsp),%r14
je     1609 <main+0x4a9>
add    $0x1,%r13d
mov    0x4(%rsp),%esi
test   %esi,%esi
jne    11e0 <main+0x80>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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