#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int running = 1;
  int runCount = -1;
  int i, n, sum;
  int a, b, fact;
  char menu;
  int input;
  while (running) {
    if (runCount < 0) {
      menu = '?';
      printf("WP15 박준영 1413\n정말 간단한 계산기\n\n>>> ?\n");
    } else {
      printf(">>> ");
      scanf(" %c", &menu);
    }
    switch (menu) {
    default:
    case '?':
      printf("! - 종료\n");
      printf("? - 도움말\n");
      printf("A - 평균 구하기\n");
      printf("D - 약수 구하기\n");
      printf("M - 배수 구하기\n");
      printf("C - 공약수 구하기\n");
      printf("F - 팩토리얼 구하기\n");
      printf("N - 피보나치 수 구하기\n");
      break;
    case '!':
      printf("<<< 총 %d번 사용함\n", runCount);
      running = 0;
      break;
    case 'a':
    case 'A':
      do {
        scanf("%d", &n);
      } while (n <= 0);
      sum = 0;
      printf(">>>>>> ");
      for (i = 0; i < n; i++) {
        scanf("%d", &input);
        sum += input;
      }
      printf("<<< %.2lf (합 %d)\n", sum / (n + 0.0), sum);
      break;
    case 'd':
    case 'D':
      do {
        scanf("%d", &input);
      } while (input <= 0);
      printf("<<< ");
      for (i = 1; i <= input; i++) {
        if (input % i == 0) {
          printf("%d ", i);
        }
      }
      printf("\n");
      break;
    case 'm':
    case 'M':
      do {
        scanf("%d", &input);
      } while (input <= 0);
      printf("<<< ");
      for (i = 1; i <= 16; i++) {
        printf("%d ", i * input);
      }
      printf("...\n");
      break;
    case 'c':
    case 'C':
      do {
        scanf("%d", &a);
      } while (a <= 0);
      do {
        scanf("%d", &b);
      } while (b <= 0);
      n = a < b ? a : b;
      printf("<<< ");
      for (i = 1; i <= n; i++) {
        if (a % i == 0 && b % i == 0) {
          printf("%d ", i);
        }
      }
      printf("\n");
      break;
    case 'f':
    case 'F':
      do {
        scanf("%d", &input);
      } while (input <= 0);
      fact = 1;
      for (i = input; i >= 2; i--) {
        fact *= i;
      }
      printf("<<< %d\n", fact);
      break;
    case 'n':
    case 'N':
      do {
        scanf("%d", &input);
      } while (input <= 0);
      a = 0;
      b = 1;
      for (i = 1; i <= input; i++) {
        n = a + b;
        a = b;
        b = n;
      }
      printf("<<< %d\n", a);
      break;
    }
    runCount++;
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     15ba <main+0x49a>
cmpl   $0x0,-0xc(%rbp)
jge    1168 <main+0x48>
movb   $0x3f,-0x25(%rbp)
lea    0xfdc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1188 <main+0x68>
lea    0x10d5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff2(%rip),%rdi
lea    -0x25(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x25(%rbp),%eax
add    $0xffffffdf,%eax
mov    %eax,%ecx
mov    %rcx,-0x38(%rbp)
sub    $0x4d,%eax
ja     11b2 <main+0x92>
mov    -0x38(%rbp),%rax
lea    0xe57(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    11b7 <main+0x97>
lea    0xfb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfbc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfc4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfcc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    159e <main+0x47e>
mov    -0xc(%rbp),%esi
lea    0xfef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
jmp    159e <main+0x47e>
jmp    124e <main+0x12e>
lea    0xfe9(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0x14(%rbp)
jle    124e <main+0x12e>
movl   $0x0,-0x18(%rbp)
lea    0xfc9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12bb <main+0x19b>
lea    0xfa5(%rip),%rdi
lea    -0x2c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x2c(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1286 <main+0x166>
cvtsi2sdl -0x18(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
xorps  %xmm2,%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%esi
lea    0xf6f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    159e <main+0x47e>
jmp    12eb <main+0x1cb>
lea    0xf4c(%rip),%rdi
lea    -0x2c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0x2c(%rbp)
jle    12eb <main+0x1cb>
lea    0xf4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     135c <main+0x23c>
mov    -0x2c(%rbp),%eax
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%edx
jne    1349 <main+0x229>
mov    -0x10(%rbp),%esi
lea    0xf20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    134e <main+0x22e>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    131c <main+0x1fc>
lea    0xef8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    159e <main+0x47e>
jmp    1374 <main+0x254>
lea    0xec3(%rip),%rdi
lea    -0x2c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0x2c(%rbp)
jle    1374 <main+0x254>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x10(%rbp)
cmpl   $0x10,-0x10(%rbp)
jg     13d2 <main+0x2b2>
mov    -0x10(%rbp),%esi
imul   -0x2c(%rbp),%esi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    13a5 <main+0x285>
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    159e <main+0x47e>
jmp    13ea <main+0x2ca>
lea    0xe4d(%rip),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0x1c(%rbp)
jle    13ea <main+0x2ca>
jmp    140b <main+0x2eb>
lea    0xe2c(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0x20(%rbp)
jle    140b <main+0x2eb>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    143e <main+0x31e>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
jmp    1444 <main+0x324>
mov    -0x20(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    0xe0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     14af <main+0x38f>
mov    -0x1c(%rbp),%eax
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%edx
jne    149c <main+0x37c>
mov    -0x20(%rbp),%eax
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%edx
jne    149c <main+0x37c>
mov    -0x10(%rbp),%esi
lea    0xdcd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14a1 <main+0x381>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    145f <main+0x33f>
lea    0xda5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    159e <main+0x47e>
jmp    14c7 <main+0x3a7>
lea    0xd70(%rip),%rdi
lea    -0x2c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0x2c(%rbp)
jle    14c7 <main+0x3a7>
movl   $0x1,-0x24(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x2,-0x10(%rbp)
jl     1512 <main+0x3f2>
mov    -0x10(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    14f0 <main+0x3d0>
mov    -0x24(%rbp),%esi
lea    0xd4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    159e <main+0x47e>
jmp    152d <main+0x40d>
lea    0xd0a(%rip),%rdi
lea    -0x2c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0x2c(%rbp)
jle    152d <main+0x40d>
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     158d <main+0x46d>
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    155e <main+0x43e>
mov    -0x1c(%rbp),%esi
lea    0xcd4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
lea    0xcad(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    113d <main+0x1d>
mov    -0x4(%rbp),%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    $0xffffffff,%r13d
lea    0xf45(%rip),%r14
lea    0x1093(%rip),%r15
mov    %rsp,%rbp
lea    0x8(%rsp),%rbx
lea    0x108a(%rip),%r12
jmp    119d <main+0x5d>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x8(%rsp),%rbx
add    $0x1,%r13d
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %r13d,%r13d
js     11d0 <main+0x90>
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1025(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
jmp    11e1 <main+0xa1>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movb   $0x3f,0x7(%rsp)
lea    0x10f7(%rip),%rdi
call   1040 <puts@plt>
movsbl 0x7(%rsp),%eax
add    $0xffffffdf,%eax
cmp    $0x4d,%eax
ja     1609 <main+0x4c9>
movslq (%r14,%rax,4),%rax
add    %r14,%rax
jmp    *%rax
mov    %r13d,0x14(%rsp)
mov    %r14,%r13
lea    0xc(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1210 <main+0xd0>
xor    %r12d,%r12d
lea    0xfca(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    126c <main+0x12c>
xor    %r12d,%r12d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
add    (%rsp),%r12d
add    $0x1,%ebx
mov    0xc(%rsp),%eax
cmp    %eax,%ebx
jl     1250 <main+0x110>
xorps  %xmm0,%xmm0
cvtsi2sd %r12d,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
lea    0xf7a(%rip),%rdi
mov    %r12d,%esi
mov    $0x1,%al
call   1050 <printf@plt>
mov    %r13,%r14
mov    0x14(%rsp),%r13d
lea    0x8(%rsp),%rbx
lea    0xf57(%rip),%r12
jmp    118f <main+0x4f>
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    12b0 <main+0x170>
lea    0x10(%rsp),%rbx
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x10(%rsp),%eax
test   %eax,%eax
jle    12d0 <main+0x190>
mov    0x8(%rsp),%ecx
cmp    %eax,%ecx
cmovl  %ecx,%eax
mov    %eax,0xc(%rsp)
lea    0xf1b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%rsp),%ecx
test   %ecx,%ecx
jle    1180 <main+0x40>
xor    %ebx,%ebx
jmp    15a8 <main+0x468>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x0,(%rsp)
jle    1320 <main+0x1e0>
lea    0xeda(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%ecx
test   %ecx,%ecx
jle    1180 <main+0x40>
xor    %ebx,%ebx
jmp    15e8 <main+0x4a8>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    (%rsp),%eax
test   %eax,%eax
jle    1360 <main+0x220>
mov    $0x1,%esi
cmp    $0x1,%eax
je     18b0 <main+0x770>
mov    %eax,%ecx
sub    $0x2,%ecx
mov    $0x0,%edx
cmovb  %edx,%ecx
add    $0x1,%ecx
mov    $0x1,%esi
cmp    $0x8,%ecx
jb     18a0 <main+0x760>
mov    %ecx,%edx
and    $0xfffffff8,%edx
movd   %eax,%xmm0
pshufd $0x0,%xmm0,%xmm0
paddd  0xc4a(%rip),%xmm0
lea    -0x8(%rdx),%ebx
mov    %ebx,%edi
shr    $0x3,%edi
add    $0x1,%edi
mov    %edi,%esi
and    $0x3,%esi
cmp    $0x18,%ebx
jae    16be <main+0x57e>
movdqa 0xc39(%rip),%xmm2
movdqa %xmm2,%xmm1
movdqa 0xc3c(%rip),%xmm9
movdqa 0xc43(%rip),%xmm10
lea    0x8(%rsp),%rbx
jmp    1801 <main+0x6c1>
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x0,(%rsp)
jle    1400 <main+0x2c0>
lea    0xdfa(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%esi
lea    0xdee(%rip),%r12
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%esi
add    %esi,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%eax
lea    (%rax,%rax,2),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%esi
shl    $0x2,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%eax
lea    (%rax,%rax,4),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%eax
add    %eax,%eax
lea    (%rax,%rax,2),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%eax
lea    0x0(,%rax,8),%esi
sub    %eax,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%esi
shl    $0x3,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%eax
lea    (%rax,%rax,8),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%eax
add    %eax,%eax
lea    (%rax,%rax,4),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%eax
lea    (%rax,%rax,4),%ecx
lea    (%rax,%rcx,2),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%eax
shl    $0x2,%eax
lea    (%rax,%rax,2),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%eax
lea    (%rax,%rax,2),%ecx
lea    (%rax,%rcx,4),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%eax
mov    %eax,%esi
shl    $0x4,%esi
sub    %eax,%esi
sub    %eax,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%eax
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,2),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%esi
shl    $0x4,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xcde(%rip),%rdi
call   1040 <puts@plt>
lea    0xca8(%rip),%r12
jmp    118f <main+0x4f>
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    (%rsp),%esi
test   %esi,%esi
jle    1560 <main+0x420>
lea    -0x1(%rsi),%ecx
mov    %esi,%eax
and    $0x7,%eax
cmp    $0x7,%ecx
jae    166e <main+0x52e>
mov    $0x1,%ecx
xor    %edx,%edx
jmp    1695 <main+0x555>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    %ecx,%ebx
jge    1180 <main+0x40>
add    $0x1,%ebx
mov    0x8(%rsp),%eax
cltd
idiv   %ebx
test   %edx,%edx
jne    15a0 <main+0x460>
mov    0x10(%rsp),%eax
cltd
idiv   %ebx
test   %edx,%edx
jne    15a0 <main+0x460>
lea    0xc51(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%rsp),%ecx
jmp    15a0 <main+0x460>
nopw   0x0(%rax,%rax,1)
cmp    %ecx,%ebx
jge    1180 <main+0x40>
add    $0x1,%ebx
mov    %ecx,%eax
cltd
idiv   %ebx
test   %edx,%edx
jne    15e0 <main+0x4a0>
lea    0xc1e(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rsp),%ecx
jmp    15e0 <main+0x4a0>
lea    0xc19(%rip),%rdi
call   1040 <puts@plt>
lea    0xc18(%rip),%rdi
call   1040 <puts@plt>
lea    0xc1a(%rip),%rdi
call   1040 <puts@plt>
lea    0xc23(%rip),%rdi
call   1040 <puts@plt>
lea    0xc2c(%rip),%rdi
call   1040 <puts@plt>
lea    0xc35(%rip),%rdi
call   1040 <puts@plt>
lea    0xc41(%rip),%rdi
call   1040 <puts@plt>
lea    0xc50(%rip),%rdi
call   1040 <puts@plt>
jmp    118f <main+0x4f>
and    $0xfffffff8,%esi
mov    $0x1,%ecx
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
add    %ecx,%edx
add    %edx,%ecx
add    %ecx,%edx
add    %edx,%ecx
add    %ecx,%edx
add    %edx,%ecx
add    %ecx,%edx
add    %edx,%ecx
add    $0xfffffff8,%esi
jne    1680 <main+0x540>
mov    %edx,%esi
test   %eax,%eax
je     16ad <main+0x56d>
nopl   0x0(%rax,%rax,1)
mov    %ecx,%esi
mov    %edx,%ecx
add    %esi,%ecx
mov    %esi,%edx
add    $0xffffffff,%eax
jne    16a0 <main+0x560>
mov    %ecx,0xc(%rsp)
mov    %esi,0x8(%rsp)
mov    %ecx,0x10(%rsp)
jmp    18b0 <main+0x770>
and    $0xfffffffc,%edi
movdqa 0x947(%rip),%xmm2
movdqa %xmm2,%xmm1
movdqa 0x94a(%rip),%xmm9
movdqa 0x951(%rip),%xmm10
movdqa 0x968(%rip),%xmm12
movdqa 0x96f(%rip),%xmm13
movdqa 0x976(%rip),%xmm14
movdqa 0x97d(%rip),%xmm15
movdqa 0x984(%rip),%xmm11
lea    0x8(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm3
paddd  %xmm9,%xmm3
pshufd $0xf5,%xmm0,%xmm4
pshufd $0xf5,%xmm1,%xmm5
pmuludq %xmm4,%xmm5
pmuludq %xmm0,%xmm1
pshufd $0xf5,%xmm2,%xmm4
pshufd $0xf5,%xmm3,%xmm6
pmuludq %xmm4,%xmm6
pmuludq %xmm2,%xmm3
movdqa %xmm0,%xmm2
paddd  %xmm10,%xmm2
movdqa %xmm0,%xmm4
paddd  0x8de(%rip),%xmm4
pmuludq %xmm2,%xmm1
pshufd $0xf5,%xmm2,%xmm2
pmuludq %xmm5,%xmm2
pmuludq %xmm4,%xmm3
pshufd $0xf5,%xmm4,%xmm4
pmuludq %xmm6,%xmm4
movdqa %xmm0,%xmm5
paddd  %xmm12,%xmm5
movdqa %xmm0,%xmm6
paddd  %xmm13,%xmm6
pshufd $0xf5,%xmm5,%xmm7
pmuludq %xmm2,%xmm7
pmuludq %xmm1,%xmm5
pshufd $0xf5,%xmm6,%xmm8
pmuludq %xmm4,%xmm8
pmuludq %xmm3,%xmm6
movdqa %xmm0,%xmm2
paddd  %xmm14,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm15,%xmm3
pmuludq %xmm2,%xmm5
pshufd $0xe8,%xmm5,%xmm1
pshufd $0xf5,%xmm2,%xmm2
pmuludq %xmm7,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm1
pmuludq %xmm3,%xmm6
pshufd $0xe8,%xmm6,%xmm2
pshufd $0xf5,%xmm3,%xmm3
pmuludq %xmm8,%xmm3
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm3,%xmm2
paddd  %xmm11,%xmm0
add    $0xfffffffc,%edi
jne    1720 <main+0x5e0>
test   %esi,%esi
je     1863 <main+0x723>
cs nopw 0x0(%rax,%rax,1)
nop
movdqa %xmm0,%xmm3
paddd  %xmm9,%xmm3
pshufd $0xf5,%xmm1,%xmm4
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm5
pmuludq %xmm4,%xmm5
pshufd $0xe8,%xmm5,%xmm4
punpckldq %xmm4,%xmm1
pshufd $0xf5,%xmm2,%xmm4
pmuludq %xmm3,%xmm2
pshufd $0xe8,%xmm2,%xmm2
pshufd $0xf5,%xmm3,%xmm3
pmuludq %xmm4,%xmm3
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm3,%xmm2
paddd  %xmm10,%xmm0
add    $0xffffffff,%esi
jne    1810 <main+0x6d0>
pshufd $0xf5,%xmm1,%xmm0
pshufd $0xf5,%xmm2,%xmm3
pmuludq %xmm0,%xmm3
pmuludq %xmm1,%xmm2
pshufd $0xee,%xmm2,%xmm0
pmuludq %xmm2,%xmm0
pshufd $0xaa,%xmm3,%xmm1
pmuludq %xmm3,%xmm1
pmuludq %xmm0,%xmm1
movd   %xmm1,%esi
cmp    %edx,%ecx
je     18b0 <main+0x770>
sub    %edx,%eax
cs nopw 0x0(%rax,%rax,1)
nop
imul   %eax,%esi
lea    -0x1(%rax),%ecx
cmp    $0x2,%eax
mov    %ecx,%eax
ja     18a0 <main+0x760>
nopl   (%rax)
lea    0x966(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    118f <main+0x4f>
lea    0x912(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [55 x i8] c"WP15 \EB\B0\95\EC\A4\80\EC\98\81 1413\0A\EC\A0\95\EB\A7\90 \EA\B0\84\EB\8B\A8\ED\95\9C \EA\B3\84\EC\82\B0\EA\B8\B0\0A\0A>>> ?\0A\00"
@.str.1 = [5 x i8] c">>> \00"
@.str.2 = [4 x i8] c" %c\00"
@.str.3 = [12 x i8] c"! - \EC\A2\85\EB\A3\8C\0A\00"
@.str.4 = [15 x i8] c"? - \EB\8F\84\EC\9B\80\EB\A7\90\0A\00"
@.str.5 = [22 x i8] c"A - \ED\8F\89\EA\B7\A0 \EA\B5\AC\ED\95\98\EA\B8\B0\0A\00"
@.str.6 = [22 x i8] c"D - \EC\95\BD\EC\88\98 \EA\B5\AC\ED\95\98\EA\B8\B0\0A\00"
@.str.7 = [22 x i8] c"M - \EB\B0\B0\EC\88\98 \EA\B5\AC\ED\95\98\EA\B8\B0\0A\00"
@.str.8 = [25 x i8] c"C - \EA\B3\B5\EC\95\BD\EC\88\98 \EA\B5\AC\ED\95\98\EA\B8\B0\0A\00"
@.str.9 = [28 x i8] c"F - \ED\8C\A9\ED\86\A0\EB\A6\AC\EC\96\BC \EA\B5\AC\ED\95\98\EA\B8\B0\0A\00"
@.str.10 = [32 x i8] c"N - \ED\94\BC\EB\B3\B4\EB\82\98\EC\B9\98 \EC\88\98 \EA\B5\AC\ED\95\98\EA\B8\B0\0A\00"
@.str.11 = [25 x i8] c"<<< \EC\B4\9D %d\EB\B2\88 \EC\82\AC\EC\9A\A9\ED\95\A8\0A\00"
@.str.12 = [3 x i8] c"%d\00"
@.str.13 = [8 x i8] c">>>>>> \00"
@.str.14 = [20 x i8] c"<<< %.2lf (\ED\95\A9 %d)\0A\00"
@.str.15 = [5 x i8] c"<<< \00"
@.str.16 = [4 x i8] c"%d \00"
@.str.17 = [2 x i8] c"\0A\00"
@.str.18 = [5 x i8] c"...\0A\00"
@.str.19 = [8 x i8] c"<<< %d\0A\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 i8
%11 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 -1, i32* %3
br label %12
12: ; preds = %205, %0
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %209
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
store i8 63, i8* %10
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
br label %23
20: ; preds = %15
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %10)
br label %23
23: ; preds = %20, %18
%24 = load i8, i8* %10
%25 = sext i8 %24 to i32
switch i32 %25, label %26 [
i32 63, label %27
i32 33, label %36
i32 97, label %39
i32 65, label %39
i32 100, label %68
i32 68, label %68
i32 109, label %94
i32 77, label %94
i32 99, label %115
i32 67, label %115
i32 102, label %161
i32 70, label %161
i32 110, label %182
i32 78, label %182
]
26: ; preds = %23
br label %27
27: ; preds = %23, %26
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0))
br label %205
36: ; preds = %23
%37 = load i32, i32* %3
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0), i32 %37)
store i32 0, i32* %2
br label %205
39: ; preds = %23, %23
br label %40
40: ; preds = %42, %39
%41 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %5)
br label %42
42: ; preds = %40
%43 = load i32, i32* %5
%44 = icmp sle i32 %43, 0
br i1 %44, label %40, label %45
45: ; preds = %42
store i32 0, i32* %6
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
store i32 0, i32* %4
br label %47
47: ; preds = %56, %45
%48 = load i32, i32* %4
%49 = load i32, i32* %5
%50 = icmp slt i32 %48, %49
br i1 %50, label %51, label %59
51: ; preds = %47
%52 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %11)
%53 = load i32, i32* %11
%54 = load i32, i32* %6
%55 = add nsw i32 %54, %53
store i32 %55, i32* %6
br label %56
56: ; preds = %51
%57 = load i32, i32* %4
%58 = add nsw i32 %57, 1
store i32 %58, i32* %4
br label %47
59: ; preds = %47
%60 = load i32, i32* %6
%61 = sitofp i32 %60 to double
%62 = load i32, i32* %5
%63 = sitofp i32 %62 to double
%64 = fadd double %63, 0.000000e+00
%65 = fdiv double %61, %64
%66 = load i32, i32* %6
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), double %65, i32 %66)
br label %205
68: ; preds = %23, %23
br label %69
69: ; preds = %71, %68
%70 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %11)
br label %71
71: ; preds = %69
%72 = load i32, i32* %11
%73 = icmp sle i32 %72, 0
br i1 %73, label %69, label %74
74: ; preds = %71
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
store i32 1, i32* %4
br label %76
76: ; preds = %89, %74
%77 = load i32, i32* %4
%78 = load i32, i32* %11
%79 = icmp sle i32 %77, %78
br i1 %79, label %80, label %92
80: ; preds = %76
%81 = load i32, i32* %11
%82 = load i32, i32* %4
%83 = srem i32 %81, %82
%84 = icmp eq i32 %83, 0
br i1 %84, label %85, label %88
85: ; preds = %80
%86 = load i32, i32* %4
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %86)
br label %88
88: ; preds = %85, %80
br label %89
89: ; preds = %88
%90 = load i32, i32* %4
%91 = add nsw i32 %90, 1
store i32 %91, i32* %4
br label %76
92: ; preds = %76
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
br label %205
94: ; preds = %23, %23
br label %95
95: ; preds = %97, %94
%96 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %11)
br label %97
97: ; preds = %95
%98 = load i32, i32* %11
%99 = icmp sle i32 %98, 0
br i1 %99, label %95, label %100
100: ; preds = %97
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
store i32 1, i32* %4
br label %102
102: ; preds = %110, %100
%103 = load i32, i32* %4
%104 = icmp sle i32 %103, 16
br i1 %104, label %105, label %113
105: ; preds = %102
%106 = load i32, i32* %4
%107 = load i32, i32* %11
%108 = mul nsw i32 %106, %107
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %108)
br label %110
110: ; preds = %105
%111 = load i32, i32* %4
%112 = add nsw i32 %111, 1
store i32 %112, i32* %4
br label %102
113: ; preds = %102
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
br label %205
115: ; preds = %23, %23
br label %116
116: ; preds = %118, %115
%117 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %7)
br label %118
118: ; preds = %116
%119 = load i32, i32* %7
%120 = icmp sle i32 %119, 0
br i1 %120, label %116, label %121
121: ; preds = %118
br label %122
122: ; preds = %124, %121
%123 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %8)
br label %124
124: ; preds = %122
%125 = load i32, i32* %8
%126 = icmp sle i32 %125, 0
br i1 %126, label %122, label %127
127: ; preds = %124
%128 = load i32, i32* %7
%129 = load i32, i32* %8
%130 = icmp slt i32 %128, %129
br i1 %130, label %131, label %133
131: ; preds = %127
%132 = load i32, i32* %7
br label %135
133: ; preds = %127
%134 = load i32, i32* %8
br label %135
135: ; preds = %133, %131
%136 = phi i32 [ %132, %131 ], [ %134, %133 ]
store i32 %136, i32* %5
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
store i32 1, i32* %4
br label %138
138: ; preds = %156, %135
%139 = load i32, i32* %4
%140 = load i32, i32* %5
%141 = icmp sle i32 %139, %140
br i1 %141, label %142, label %159
142: ; preds = %138
%143 = load i32, i32* %7
%144 = load i32, i32* %4
%145 = srem i32 %143, %144
%146 = icmp eq i32 %145, 0
br i1 %146, label %147, label %155
147: ; preds = %142
%148 = load i32, i32* %8
%149 = load i32, i32* %4
%150 = srem i32 %148, %149
%151 = icmp eq i32 %150, 0
br i1 %151, label %152, label %155
152: ; preds = %147
%153 = load i32, i32* %4
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %153)
br label %155
155: ; preds = %152, %147, %142
br label %156
156: ; preds = %155
%157 = load i32, i32* %4
%158 = add nsw i32 %157, 1
store i32 %158, i32* %4
br label %138
159: ; preds = %138
%160 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
br label %205
161: ; preds = %23, %23
br label %162
162: ; preds = %164, %161
%163 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %11)
br label %164
164: ; preds = %162
%165 = load i32, i32* %11
%166 = icmp sle i32 %165, 0
br i1 %166, label %162, label %167
167: ; preds = %164
store i32 1, i32* %9
%168 = load i32, i32* %11
store i32 %168, i32* %4
br label %169
169: ; preds = %176, %167
%170 = load i32, i32* %4
%171 = icmp sge i32 %170, 2
br i1 %171, label %172, label %179
172: ; preds = %169
%173 = load i32, i32* %4
%174 = load i32, i32* %9
%175 = mul nsw i32 %174, %173
store i32 %175, i32* %9
br label %176
176: ; preds = %172
%177 = load i32, i32* %4
%178 = add nsw i32 %177, -1
store i32 %178, i32* %4
br label %169
179: ; preds = %169
%180 = load i32, i32* %9
%181 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i64 0, i64 0), i32 %180)
br label %205
182: ; preds = %23, %23
br label %183
183: ; preds = %185, %182
%184 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %11)
br label %185
185: ; preds = %183
%186 = load i32, i32* %11
%187 = icmp sle i32 %186, 0
br i1 %187, label %183, label %188
188: ; preds = %185
store i32 0, i32* %7
store i32 1, i32* %8
store i32 1, i32* %4
br label %189
189: ; preds = %199, %188
%190 = load i32, i32* %4
%191 = load i32, i32* %11
%192 = icmp sle i32 %190, %191
br i1 %192, label %193, label %202
193: ; preds = %189
%194 = load i32, i32* %7
%195 = load i32, i32* %8
%196 = add nsw i32 %194, %195
store i32 %196, i32* %5
%197 = load i32, i32* %8
store i32 %197, i32* %7
%198 = load i32, i32* %5
store i32 %198, i32* %8
br label %199
199: ; preds = %193
%200 = load i32, i32* %4
%201 = add nsw i32 %200, 1
store i32 %201, i32* %4
br label %189
202: ; preds = %189
%203 = load i32, i32* %7
%204 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i64 0, i64 0), i32 %203)
br label %205
205: ; preds = %202, %179, %159, %113, %92, %59, %36, %27
%206 = load i32, i32* %3
%207 = add nsw i32 %206, 1
store i32 %207, i32* %3
%208 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
br label %12
209: ; preds = %12
%210 = load i32, i32* %1
ret i32 %210
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c">>> \00"
@.str.2 = [4 x i8] c" %c\00"
@.str.11 = [25 x i8] c"<<< \EC\B4\9D %d\EB\B2\88 \EC\82\AC\EC\9A\A9\ED\95\A8\0A\00"
@.str.12 = [3 x i8] c"%d\00"
@.str.13 = [8 x i8] c">>>>>> \00"
@.str.14 = [20 x i8] c"<<< %.2lf (\ED\95\A9 %d)\0A\00"
@.str.15 = [5 x i8] c"<<< \00"
@.str.16 = [4 x i8] c"%d \00"
@.str.19 = [8 x i8] c"<<< %d\0A\00"
@str = [4 x i8] c"...\00"
@str.20 = [11 x i8] c"! - \EC\A2\85\EB\A3\8C\00"
@str.21 = [14 x i8] c"? - \EB\8F\84\EC\9B\80\EB\A7\90\00"
@str.22 = [21 x i8] c"A - \ED\8F\89\EA\B7\A0 \EA\B5\AC\ED\95\98\EA\B8\B0\00"
@str.23 = [21 x i8] c"D - \EC\95\BD\EC\88\98 \EA\B5\AC\ED\95\98\EA\B8\B0\00"
@str.24 = [21 x i8] c"M - \EB\B0\B0\EC\88\98 \EA\B5\AC\ED\95\98\EA\B8\B0\00"
@str.25 = [24 x i8] c"C - \EA\B3\B5\EC\95\BD\EC\88\98 \EA\B5\AC\ED\95\98\EA\B8\B0\00"
@str.26 = [27 x i8] c"F - \ED\8C\A9\ED\86\A0\EB\A6\AC\EC\96\BC \EA\B5\AC\ED\95\98\EA\B8\B0\00"
@str.27 = [31 x i8] c"N - \ED\94\BC\EB\B3\B4\EB\82\98\EC\B9\98 \EC\88\98 \EA\B5\AC\ED\95\98\EA\B8\B0\00"
@str.28 = [54 x i8] c"WP15 \EB\B0\95\EC\A4\80\EC\98\81 1413\0A\EC\A0\95\EB\A7\90 \EA\B0\84\EB\8B\A8\ED\95\9C \EA\B3\84\EC\82\B0\EA\B8\B0\0A\0A>>> ?\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
%5 = alloca i32
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %5 to i8*
br label %10
10: ; preds = %294, %0
%11 = phi i32 [ -1, %0 ], [ %295, %294 ]
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
store i8 63, i8* %4
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.28, i64 0, i64 0))
br label %18
15: ; preds = %10
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %4)
br label %18
18: ; preds = %15, %13
%19 = load i8, i8* %4
%20 = sext i8 %19 to i32
switch i32 %20, label %27 [
i32 78, label %26
i32 33, label %297
i32 97, label %25
i32 65, label %25
i32 100, label %24
i32 68, label %24
i32 109, label %23
i32 77, label %23
i32 99, label %22
i32 67, label %22
i32 102, label %21
i32 70, label %21
i32 110, label %26
]
21: ; preds = %18, %18
br label %170
22: ; preds = %18, %18
br label %136
23: ; preds = %18, %18
br label %82
24: ; preds = %18, %18
br label %60
25: ; preds = %18, %18
br label %36
26: ; preds = %18, %18
br label %253
27: ; preds = %18
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.20, i64 0, i64 0))
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.21, i64 0, i64 0))
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.22, i64 0, i64 0))
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.23, i64 0, i64 0))
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.24, i64 0, i64 0))
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.25, i64 0, i64 0))
%34 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.26, i64 0, i64 0))
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.27, i64 0, i64 0))
br label %294
36: ; preds = %25, %36
%37 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %1)
%38 = load i32, i32* %1
%39 = icmp slt i32 %38, 1
br i1 %39, label %36, label %40
40: ; preds = %36
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%42 = load i32, i32* %1
%43 = icmp sgt i32 %42, 0
br i1 %43, label %44, label %53
44: ; preds = %40, %44
%45 = phi i32 [ %49, %44 ], [ 0, %40 ]
%46 = phi i32 [ %50, %44 ], [ 0, %40 ]
%47 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %5)
%48 = load i32, i32* %5
%49 = add nsw i32 %48, %45
%50 = add nuw nsw i32 %46, 1
%51 = load i32, i32* %1
%52 = icmp slt i32 %50, %51
br i1 %52, label %44, label %53
53: ; preds = %44, %40
%54 = phi i32 [ 0, %40 ], [ %49, %44 ]
%55 = phi i32 [ %42, %40 ], [ %51, %44 ]
%56 = sitofp i32 %54 to double
%57 = sitofp i32 %55 to double
%58 = fdiv double %56, %57
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), double %58, i32 %54)
br label %294
60: ; preds = %24, %60
%61 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %5)
%62 = load i32, i32* %5
%63 = icmp slt i32 %62, 1
br i1 %63, label %60, label %64
64: ; preds = %60
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
%66 = load i32, i32* %5
%67 = icmp slt i32 %66, 1
br i1 %67, label %80, label %68
68: ; preds = %64, %76
%69 = phi i32 [ %77, %76 ], [ %66, %64 ]
%70 = phi i32 [ %78, %76 ], [ 1, %64 ]
%71 = srem i32 %69, %70
%72 = icmp eq i32 %71, 0
br i1 %72, label %73, label %76
73: ; preds = %68
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %70)
%75 = load i32, i32* %5
br label %76
76: ; preds = %68, %73
%77 = phi i32 [ %69, %68 ], [ %75, %73 ]
%78 = add nuw nsw i32 %70, 1
%79 = icmp slt i32 %70, %77
br i1 %79, label %68, label %80
80: ; preds = %76, %64
%81 = call i32 @putchar(i32 10)
br label %294
82: ; preds = %23, %82
%83 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %5)
%84 = load i32, i32* %5
%85 = icmp slt i32 %84, 1
br i1 %85, label %82, label %86
86: ; preds = %82
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
%88 = load i32, i32* %5
%89 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %88)
%90 = load i32, i32* %5
%91 = shl nsw i32 %90, 1
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %91)
%93 = load i32, i32* %5
%94 = mul nsw i32 %93, 3
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %94)
%96 = load i32, i32* %5
%97 = shl nsw i32 %96, 2
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %97)
%99 = load i32, i32* %5
%100 = mul nsw i32 %99, 5
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %100)
%102 = load i32, i32* %5
%103 = mul nsw i32 %102, 6
%104 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %103)
%105 = load i32, i32* %5
%106 = mul nsw i32 %105, 7
%107 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %106)
%108 = load i32, i32* %5
%109 = shl nsw i32 %108, 3
%110 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %109)
%111 = load i32, i32* %5
%112 = mul nsw i32 %111, 9
%113 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %112)
%114 = load i32, i32* %5
%115 = mul nsw i32 %114, 10
%116 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %115)
%117 = load i32, i32* %5
%118 = mul nsw i32 %117, 11
%119 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %118)
%120 = load i32, i32* %5
%121 = mul nsw i32 %120, 12
%122 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %121)
%123 = load i32, i32* %5
%124 = mul nsw i32 %123, 13
%125 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %124)
%126 = load i32, i32* %5
%127 = mul nsw i32 %126, 14
%128 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %127)
%129 = load i32, i32* %5
%130 = mul nsw i32 %129, 15
%131 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %130)
%132 = load i32, i32* %5
%133 = shl nsw i32 %132, 4
%134 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %133)
%135 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
br label %294
136: ; preds = %22, %136
%137 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %2)
%138 = load i32, i32* %2
%139 = icmp slt i32 %138, 1
br i1 %139, label %136, label %140
140: ; preds = %136, %140
%141 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %3)
%142 = load i32, i32* %3
%143 = icmp slt i32 %142, 1
br i1 %143, label %140, label %144
144: ; preds = %140
%145 = load i32, i32* %2
%146 = icmp slt i32 %145, %142
%147 = select i1 %146, i32 %145, i32 %142
store i32 %147, i32* %1
%148 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
%149 = load i32, i32* %1
%150 = icmp slt i32 %149, 1
br i1 %150, label %168, label %151
151: ; preds = %144, %164
%152 = phi i32 [ %165, %164 ], [ %149, %144 ]
%153 = phi i32 [ %166, %164 ], [ 1, %144 ]
%154 = load i32, i32* %2
%155 = srem i32 %154, %153
%156 = icmp eq i32 %155, 0
br i1 %156, label %157, label %164
157: ; preds = %151
%158 = load i32, i32* %3
%159 = srem i32 %158, %153
%160 = icmp eq i32 %159, 0
br i1 %160, label %161, label %164
161: ; preds = %157
%162 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %153)
%163 = load i32, i32* %1
br label %164
164: ; preds = %151, %157, %161
%165 = phi i32 [ %152, %151 ], [ %152, %157 ], [ %163, %161 ]
%166 = add nuw nsw i32 %153, 1
%167 = icmp slt i32 %153, %165
br i1 %167, label %151, label %168
168: ; preds = %164, %144
%169 = call i32 @putchar(i32 10)
br label %294
170: ; preds = %21, %170
%171 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %5)
%172 = load i32, i32* %5
%173 = icmp slt i32 %172, 1
br i1 %173, label %170, label %174
174: ; preds = %170
%175 = icmp eq i32 %172, 1
br i1 %175, label %250, label %176
176: ; preds = %174
%177 = add i32 %172, 1
%178 = call i32 @llvm.umin.i32(i32 %172, i32 2)
%179 = sub i32 %177, %178
%180 = icmp ult i32 %179, 8
br i1 %180, label %241, label %181
181: ; preds = %176
%182 = and i32 %179, -8
%183 = sub i32 %172, %182
%184 = insertelement <4 x i32> poison, i32 %172, i64 0
%185 = shufflevector <4 x i32> %184, <4 x i32> poison, <4 x i32> zeroinitializer
%186 = add <4 x i32> %185, <i32 0, i32 -1, i32 -2, i32 -3>
%187 = add i32 %182, -8
%188 = lshr exact i32 %187, 3
%189 = add nuw nsw i32 %188, 1
%190 = and i32 %189, 3
%191 = icmp ult i32 %187, 24
br i1 %191, label %217, label %192
192: ; preds = %181
%193 = and i32 %189, 1073741820
br label %194
194: ; preds = %194, %192
%195 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %192 ], [ %212, %194 ]
%196 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %192 ], [ %213, %194 ]
%197 = phi <4 x i32> [ %186, %192 ], [ %214, %194 ]
%198 = phi i32 [ 0, %192 ], [ %215, %194 ]
%199 = add <4 x i32> %197, <i32 -4, i32 -4, i32 -4, i32 -4>
%200 = mul <4 x i32> %195, %197
%201 = mul <4 x i32> %196, %199
%202 = add <4 x i32> %197, <i32 -8, i32 -8, i32 -8, i32 -8>
%203 = add <4 x i32> %197, <i32 -12, i32 -12, i32 -12, i32 -12>
%204 = mul <4 x i32> %200, %202
%205 = mul <4 x i32> %201, %203
%206 = add <4 x i32> %197, <i32 -16, i32 -16, i32 -16, i32 -16>
%207 = add <4 x i32> %197, <i32 -20, i32 -20, i32 -20, i32 -20>
%208 = mul <4 x i32> %204, %206
%209 = mul <4 x i32> %205, %207
%210 = add <4 x i32> %197, <i32 -24, i32 -24, i32 -24, i32 -24>
%211 = add <4 x i32> %197, <i32 -28, i32 -28, i32 -28, i32 -28>
%212 = mul <4 x i32> %208, %210
%213 = mul <4 x i32> %209, %211
%214 = add <4 x i32> %197, <i32 -32, i32 -32, i32 -32, i32 -32>
%215 = add i32 %198, 4
%216 = icmp eq i32 %215, %193
br i1 %216, label %217, label %194
217: ; preds = %194, %181
%218 = phi <4 x i32> [ undef, %181 ], [ %212, %194 ]
%219 = phi <4 x i32> [ undef, %181 ], [ %213, %194 ]
%220 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %181 ], [ %212, %194 ]
%221 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %181 ], [ %213, %194 ]
%222 = phi <4 x i32> [ %186, %181 ], [ %214, %194 ]
%223 = icmp eq i32 %190, 0
br i1 %223, label %235, label %224
224: ; preds = %217, %224
%225 = phi <4 x i32> [ %230, %224 ], [ %220, %217 ]
%226 = phi <4 x i32> [ %231, %224 ], [ %221, %217 ]
%227 = phi <4 x i32> [ %232, %224 ], [ %222, %217 ]
%228 = phi i32 [ %233, %224 ], [ 0, %217 ]
%229 = add <4 x i32> %227, <i32 -4, i32 -4, i32 -4, i32 -4>
%230 = mul <4 x i32> %225, %227
%231 = mul <4 x i32> %226, %229
%232 = add <4 x i32> %227, <i32 -8, i32 -8, i32 -8, i32 -8>
%233 = add i32 %228, 1
%234 = icmp eq i32 %233, %190
br i1 %234, label %235, label %224
235: ; preds = %224, %217
%236 = phi <4 x i32> [ %218, %217 ], [ %230, %224 ]
%237 = phi <4 x i32> [ %219, %217 ], [ %231, %224 ]
%238 = mul <4 x i32> %237, %236
%239 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %238)
%240 = icmp eq i32 %179, %182
br i1 %240, label %250, label %241
241: ; preds = %176, %235
%242 = phi i32 [ 1, %176 ], [ %239, %235 ]
%243 = phi i32 [ %172, %176 ], [ %183, %235 ]
br label %244
244: ; preds = %241, %244
%245 = phi i32 [ %247, %244 ], [ %242, %241 ]
%246 = phi i32 [ %248, %244 ], [ %243, %241 ]
%247 = mul nsw i32 %245, %246
%248 = add nsw i32 %246, -1
%249 = icmp ugt i32 %246, 2
br i1 %249, label %244, label %250
250: ; preds = %244, %235, %174
%251 = phi i32 [ 1, %174 ], [ %239, %235 ], [ %247, %244 ]
%252 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i64 0, i64 0), i32 %251)
br label %294
253: ; preds = %26, %253
%254 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %5)
%255 = load i32, i32* %5
%256 = icmp slt i32 %255, 1
br i1 %256, label %253, label %257
257: ; preds = %253
%258 = add i32 %255, -1
%259 = and i32 %255, 7
%260 = icmp ult i32 %258, 7
br i1 %260, label %277, label %261
261: ; preds = %257
%262 = and i32 %255, -8
br label %263
263: ; preds = %263, %261
%264 = phi i32 [ 0, %261 ], [ %273, %263 ]
%265 = phi i32 [ 1, %261 ], [ %274, %263 ]
%266 = phi i32 [ 0, %261 ], [ %275, %263 ]
%267 = add nsw i32 %265, %264
%268 = add nsw i32 %267, %265
%269 = add nsw i32 %268, %267
%270 = add nsw i32 %269, %268
%271 = add nsw i32 %270, %269
%272 = add nsw i32 %271, %270
%273 = add nsw i32 %272, %271
%274 = add nsw i32 %273, %272
%275 = add i32 %266, 8
%276 = icmp eq i32 %275, %262
br i1 %276, label %277, label %263
277: ; preds = %263, %257
%278 = phi i32 [ undef, %257 ], [ %273, %263 ]
%279 = phi i32 [ undef, %257 ], [ %274, %263 ]
%280 = phi i32 [ 0, %257 ], [ %273, %263 ]
%281 = phi i32 [ 1, %257 ], [ %274, %263 ]
%282 = icmp eq i32 %259, 0
br i1 %282, label %290, label %283
283: ; preds = %277, %283
%284 = phi i32 [ %285, %283 ], [ %280, %277 ]
%285 = phi i32 [ %287, %283 ], [ %281, %277 ]
%286 = phi i32 [ %288, %283 ], [ 0, %277 ]
%287 = add nsw i32 %285, %284
%288 = add i32 %286, 1
%289 = icmp eq i32 %288, %259
br i1 %289, label %290, label %283
290: ; preds = %283, %277
%291 = phi i32 [ %278, %277 ], [ %285, %283 ]
%292 = phi i32 [ %279, %277 ], [ %287, %283 ]
store i32 %292, i32* %1
store i32 %291, i32* %2
store i32 %292, i32* %3
%293 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i64 0, i64 0), i32 %291)
br label %294
294: ; preds = %290, %250, %168, %86, %80, %53, %27
%295 = add nsw i32 %11, 1
%296 = call i32 @putchar(i32 10)
br label %10
297: ; preds = %18
%298 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0), i32 %11)
%299 = call i32 @putchar(i32 10)
ret i32 0
}