#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 isdivisable(int, int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ scanf(char *, int *);
int main() {
  int n, i, j, k, l = 1, m, p, a, b, c, in_avg, rest, total;
  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 (m != 0) {
      c = c / m;
      n = n / m;
    }
    in_avg = c / n;
    rest = c - in_avg * n;
    j = countchar(in_avg);
    k = countchar(n);
    p = countchar(rest);
    total = j + k;
    if (n == 1) {
      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 < total - p; i++) {
          printf(" ");
        }
        printf("%d\n", rest);
        printf("%d", in_avg);
        for (i = 0; i < total - j; i++) {
          printf("-");
        }
        printf("\n");
        for (i = 0; i < total - k; i++) {
          printf(" ");
        }
        printf("%d\n", n);
      } else if (b < 0) {
        printf("Case %d:\n", l);
        for (i = 0; i < total - p + 2; i++) {
          printf(" ");
        }
        printf("%d\n", rest);
        printf("- %d", in_avg);
        for (i = 0; i < total - j; i++) {
          printf("-");
        }
        printf("\n");
        for (i = 0; i < total - k + 2; i++) {
          printf(" ");
        }
        printf("%d\n", n);
      }
    } else if (c < n) {
      if (b > 0) {
        printf("Case %d:\n", l);
        for (i = 0; i < k - p; i++) {
          printf(" ");
        }
        printf("%d\n", rest);
        for (i = 0; i < k; i++) {
          printf("-");
        }
        printf("\n");
        printf("%d\n", n);
      } else if (b < 0) {
        printf("Case %d:\n", l);
        for (i = 0; i < k - p + 2; i++) {
          printf(" ");
        }
        printf("%d\n", rest);
        printf("- ");
        for (i = 0; i < k; i++) {
          printf("-");
        }
        printf("\n");
        for (i = 0; i < 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)
movl   $0x1,-0x18(%rbp)
lea    0xebd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1070 <scanf@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x39(%rbp)
je     1192 <main+0x42>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0x39(%rbp)
mov    -0x39(%rbp),%al
test   $0x1,%al
jne    11a2 <main+0x52>
jmp    1688 <main+0x538>
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11ea <main+0x9a>
lea    0xe60(%rip),%rdi
lea    -0x24(%rbp),%rsi
call   1070 <scanf@plt>
mov    -0x28(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11b7 <main+0x67>
mov    -0x28(%rbp),%edi
call   1040 <abs@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1060 <isdivisable@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1221 <main+0xd1>
mov    -0x2c(%rbp),%eax
cltd
idivl  -0x1c(%rbp)
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x1c(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0x2c(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0x30(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x30(%rbp),%ecx
imul   -0x8(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%edi
call   1030 <countchar@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <countchar@plt>
mov    %eax,-0x14(%rbp)
mov    -0x34(%rbp),%edi
call   1030 <countchar@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x38(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    12aa <main+0x15a>
cmpl   $0x0,-0x28(%rbp)
jge    1291 <main+0x141>
mov    -0x18(%rbp),%esi
mov    -0x30(%rbp),%edx
lea    0xd7b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    12a5 <main+0x155>
mov    -0x18(%rbp),%esi
mov    -0x30(%rbp),%edx
lea    0xd71(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    167a <main+0x52a>
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    14bb <main+0x36b>
cmpl   $0x0,-0x28(%rbp)
jle    13b3 <main+0x263>
mov    -0x18(%rbp),%esi
lea    0xd52(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    -0x20(%rbp),%ecx
cmp    %ecx,%eax
jge    1305 <main+0x1b5>
lea    0xd3e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12d8 <main+0x188>
mov    -0x34(%rbp),%esi
lea    0xd09(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%esi
lea    0xd0a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jge    135b <main+0x20b>
lea    0xce0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    132e <main+0x1de>
lea    0xcc2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    -0x14(%rbp),%ecx
cmp    %ecx,%eax
jge    139d <main+0x24d>
lea    0xca6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1370 <main+0x220>
mov    -0x8(%rbp),%esi
lea    0xc71(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14b6 <main+0x366>
cmpl   $0x0,-0x28(%rbp)
jge    14b1 <main+0x361>
mov    -0x18(%rbp),%esi
lea    0xc55(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    -0x20(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    1405 <main+0x2b5>
lea    0xc3e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    13d5 <main+0x285>
mov    -0x34(%rbp),%esi
lea    0xc09(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%esi
lea    0xc08(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jge    145b <main+0x30b>
lea    0xbe0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    142e <main+0x2de>
lea    0xbc2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    -0x14(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    14a0 <main+0x350>
lea    0xba3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1470 <main+0x320>
mov    -0x8(%rbp),%esi
lea    0xb6e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14b6 <main+0x366>
jmp    1675 <main+0x525>
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1670 <main+0x520>
cmpl   $0x0,-0x28(%rbp)
jle    157a <main+0x42a>
mov    -0x18(%rbp),%esi
lea    0xb41(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    -0x20(%rbp),%ecx
cmp    %ecx,%eax
jge    1516 <main+0x3c6>
lea    0xb2d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    14e9 <main+0x399>
mov    -0x34(%rbp),%esi
lea    0xaf8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1556 <main+0x406>
lea    0xae5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    152e <main+0x3de>
lea    0xac7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xaaa(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    166b <main+0x51b>
cmpl   $0x0,-0x28(%rbp)
jge    1666 <main+0x516>
mov    -0x18(%rbp),%esi
lea    0xa8e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    -0x20(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    15cc <main+0x47c>
lea    0xa77(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    159c <main+0x44c>
mov    -0x34(%rbp),%esi
lea    0xa42(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xa49(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    161a <main+0x4ca>
lea    0xa21(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    15f2 <main+0x4a2>
lea    0xa03(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    1655 <main+0x505>
lea    0x9ee(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    162f <main+0x4df>
mov    -0x8(%rbp),%esi
lea    0x9b9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    166b <main+0x51b>
jmp    1670 <main+0x520>
jmp    1675 <main+0x525>
jmp    167a <main+0x52a>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1166 <main+0x16>
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
lea    0xec3(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1070 <scanf@plt>
test   %rax,%rax
je     154e <main+0x3fe>
mov    0x4(%rsp),%esi
test   %esi,%esi
je     154e <main+0x3fe>
mov    $0x1,%r12d
lea    0xe97(%rip),%r13
lea    0x14(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r12d,0x10(%rsp)
mov    $0x0,%ebp
test   %esi,%esi
jle    11da <main+0x8a>
xor    %ebx,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r13,%rdi
mov    %r14,%rsi
call   1070 <scanf@plt>
add    0x14(%rsp),%ebp
mov    0x4(%rsp),%esi
add    $0x1,%ebx
cmp    %esi,%ebx
jl     11c0 <main+0x70>
mov    %ebp,%r12d
neg    %r12d
cmovs  %ebp,%r12d
mov    %r12d,%edi
call   1060 <isdivisable@plt>
test   %eax,%eax
je     1210 <main+0xc0>
mov    %eax,%ecx
mov    %r12d,%eax
cltd
idiv   %ecx
mov    0x4(%rsp),%edx
mov    %eax,%r12d
mov    %edx,%eax
cltd
idiv   %ecx
mov    %eax,%ecx
mov    %eax,0x4(%rsp)
jmp    1214 <main+0xc4>
nopl   0x0(%rax)
mov    0x4(%rsp),%ecx
mov    %r12d,%eax
cltd
idiv   %ecx
mov    %edx,%ebx
mov    %eax,0xc(%rsp)
mov    %eax,%edi
call   1030 <countchar@plt>
mov    %eax,%r14d
mov    0x4(%rsp),%edi
call   1030 <countchar@plt>
mov    %eax,%r15d
mov    %ebx,%edi
call   1030 <countchar@plt>
mov    %eax,%ecx
mov    0x4(%rsp),%eax
cmp    $0x1,%eax
jne    1260 <main+0x110>
test   %ebp,%ebp
js     13be <main+0x26e>
lea    0xdb8(%rip),%rdi
jmp    13c5 <main+0x275>
nopl   0x0(%rax)
mov    %ebx,0x8(%rsp)
cmp    %eax,%r12d
jle    1330 <main+0x1e0>
lea    (%r15,%r14,1),%ebx
test   %ebp,%ebp
mov    0x10(%rsp),%r12d
jle    1408 <main+0x2b8>
lea    0xd97(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
mov    %ecx,%ebp
call   1050 <printf@plt>
sub    %ebp,%ebx
test   %ebx,%ebx
jle    12af <main+0x15f>
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%ebx
jne    12a0 <main+0x150>
lea    0xd62(%rip),%rdi
mov    0x8(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    0xc(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r15d,%r15d
jle    12f0 <main+0x1a0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x2d,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%r15d
jne    12e0 <main+0x190>
mov    $0xa,%edi
call   1040 <putchar@plt>
test   %r14d,%r14d
jle    13aa <main+0x25a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x20,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%r14d
jne    1310 <main+0x1c0>
jmp    13aa <main+0x25a>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x10(%rsp),%r12d
jge    13d8 <main+0x288>
test   %ebp,%ebp
jle    14b5 <main+0x365>
lea    0xcd2(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
mov    %ecx,%ebp
call   1050 <printf@plt>
mov    %r15d,%ebx
sub    %ebp,%ebx
test   %ebx,%ebx
jle    136f <main+0x21f>
nop
mov    $0x20,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%ebx
jne    1360 <main+0x210>
lea    0xca2(%rip),%rdi
mov    0x8(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r15d,%r15d
jle    13a0 <main+0x250>
cs nopw 0x0(%rax,%rax,1)
mov    $0x2d,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%r15d
jne    1390 <main+0x240>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    0x4(%rsp),%esi
lea    0xc63(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    13d8 <main+0x288>
lea    0xc3b(%rip),%rdi
mov    0x10(%rsp),%r12d
mov    %r12d,%esi
mov    0xc(%rsp),%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
lea    0x4(%rsp),%rsi
call   1070 <scanf@plt>
test   %rax,%rax
lea    0x14(%rsp),%r14
je     154e <main+0x3fe>
add    $0x1,%r12d
mov    0x4(%rsp),%esi
test   %esi,%esi
jne    11a0 <main+0x50>
jmp    154e <main+0x3fe>
jns    13d8 <main+0x288>
lea    0xc0b(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
mov    %ecx,%ebp
call   1050 <printf@plt>
sub    %ebp,%ebx
add    $0x2,%ebx
test   %ebx,%ebx
jle    143f <main+0x2ef>
cs nopw 0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%ebx
jne    1430 <main+0x2e0>
lea    0xbd2(%rip),%rdi
mov    0x8(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xbce(%rip),%rdi
mov    0xc(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r15d,%r15d
jle    1480 <main+0x330>
nopl   0x0(%rax,%rax,1)
mov    $0x2d,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%r15d
jne    1470 <main+0x320>
mov    $0xa,%edi
call   1040 <putchar@plt>
cmp    $0xffffffff,%r14d
jl     13aa <main+0x25a>
add    $0x2,%r14d
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%r14d
jne    14a0 <main+0x350>
jmp    13aa <main+0x25a>
jns    13d8 <main+0x288>
lea    0xb5a(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
mov    %ecx,%ebp
call   1050 <printf@plt>
mov    %r15d,%ebx
sub    %ebp,%ebx
add    $0x2,%ebx
test   %ebx,%ebx
jle    14ef <main+0x39f>
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%ebx
jne    14e0 <main+0x390>
lea    0xb22(%rip),%rdi
mov    0x8(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xb23(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r15d,%r15d
jle    1530 <main+0x3e0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x2d,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%r15d
jne    1520 <main+0x3d0>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    $0x20,%edi
call   1040 <putchar@plt>
mov    $0x20,%edi
jmp    13a5 <main+0x255>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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