#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 factorial(int);
int /*<<< orphan*/ factorial_for_big_number(int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  int j;
  printf("Enter:");
  scanf("%d", &n);
  if (n < 0)
    printf("Invalid Input");
  else if (n == 0) {
    printf("%2d!:Cannot Calculated\n", n - 2);
    printf("%2d!:Cannot Calculated\n", n - 1);
    printf("%+2d!:%d", n, factorial(n));
  } else if (n == 1) {
    printf("%d!:Cannot Calculated\n", n - 2);
    printf("%2d!:%d\n", n - 1, factorial(n - 1));
    printf("%+d!:%d", n, factorial(n));
  } else if (n == 2 || n == 3 || n == 4) {
    printf("%d!:%2d\n", n - 2, factorial(n - 2));
    printf("%d!:%2d\n", n - 1, factorial(n - 1));
    printf("%d!:%2d", n, factorial(n));
  } else if (n == 5 || n == 6 || n == 7) {
    printf("%d!:%4d\n", n - 2, factorial(n - 2));
    printf("%d!:%4d\n", n - 1, factorial(n - 1));
    printf("%d!:%4d", n, factorial(n));
  } else if (n == 8 || n == 9) {
    printf("%d!:%6d\n", n - 2, factorial(n - 2));
    printf("%d!:%6d\n", n - 1, factorial(n - 1));
    printf("%d!:%6d", n, factorial(n));
  } else if (n == 10 || n == 11) {
    printf("%2d!:%8d\n", n - 2, factorial(n - 2));
    printf("%2d!:%8d\n", n - 1, factorial(n - 1));
    printf("%2d!:%8d\n", n, factorial(n));
  } else if (n == 12) {
    printf("%2d!:%9d\n", n - 2, factorial(n - 2));
    printf("%2d!:%9d\n", n - 1, factorial(n - 1));
    printf("%2d!:%9d\n", n, factorial(n));
  } else if (n >= 169)
    printf("Large Input for array[300]");
  else {
    if (n == 13) {
      printf("%2d!:    %9d\n", n - 2, factorial(n - 2));
      printf("%2d!:    %9d\n", n - 1, factorial(n - 1));
      factorial_for_big_number(n);
    } else if (n == 14) {
      printf("%2d!:     %9d\n", n - 2, factorial(n - 2));
      factorial_for_big_number(n - 1);
      printf("\n");
      factorial_for_big_number(n);
    } else if (n == 167) {
      factorial_for_big_number(n - 2);
      printf("\n\n");
      factorial_for_big_number(n - 1);
      printf("\n\n");
      printf("167 is large input for array[300]");
    } else if (n == 168) {
      factorial_for_big_number(n - 2);
      printf("\n\n");
      printf("%d is large input for array[300]", n - 1);
      printf("\n\n");
      printf("%d is large input for array[300]", n);
    } else {
      factorial_for_big_number(n - 2);
      printf("\n\n");
      factorial_for_big_number(n - 1);
      printf("\n\n");
      factorial_for_big_number(n);
    }
  }
  getchar();
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xee7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jge    119a <main+0x4a>
lea    0xe79(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1711 <main+0x5c1>
cmpl   $0x0,-0x8(%rbp)
jne    11f2 <main+0xa2>
mov    -0x8(%rbp),%esi
sub    $0x2,%esi
lea    0xe64(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xe47(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    170c <main+0x5bc>
cmpl   $0x1,-0x8(%rbp)
jne    125d <main+0x10d>
mov    -0x8(%rbp),%esi
sub    $0x2,%esi
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <factorial@plt>
mov    -0x18(%rbp),%esi
mov    %eax,%edx
lea    0xe1d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    -0x14(%rbp),%esi
mov    %eax,%edx
lea    0xe05(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1707 <main+0x5b7>
cmpl   $0x2,-0x8(%rbp)
je     127b <main+0x12b>
cmpl   $0x3,-0x8(%rbp)
je     127b <main+0x12b>
cmpl   $0x4,-0x8(%rbp)
jne    12ef <main+0x19f>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <factorial@plt>
mov    -0x24(%rbp),%esi
mov    %eax,%edx
lea    0xdc3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <factorial@plt>
mov    -0x20(%rbp),%esi
mov    %eax,%edx
lea    0xd9c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
lea    0xd84(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1702 <main+0x5b2>
cmpl   $0x5,-0x8(%rbp)
je     130d <main+0x1bd>
cmpl   $0x6,-0x8(%rbp)
je     130d <main+0x1bd>
cmpl   $0x7,-0x8(%rbp)
jne    1381 <main+0x231>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <factorial@plt>
mov    -0x30(%rbp),%esi
mov    %eax,%edx
lea    0xd42(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <factorial@plt>
mov    -0x2c(%rbp),%esi
mov    %eax,%edx
lea    0xd1b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    -0x28(%rbp),%esi
mov    %eax,%edx
lea    0xd03(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    16fd <main+0x5ad>
cmpl   $0x8,-0x8(%rbp)
je     1395 <main+0x245>
cmpl   $0x9,-0x8(%rbp)
jne    1409 <main+0x2b9>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <factorial@plt>
mov    -0x3c(%rbp),%esi
mov    %eax,%edx
lea    0xccb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <factorial@plt>
mov    -0x38(%rbp),%esi
mov    %eax,%edx
lea    0xca4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    -0x34(%rbp),%esi
mov    %eax,%edx
lea    0xc8c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    16f8 <main+0x5a8>
cmpl   $0xa,-0x8(%rbp)
je     141d <main+0x2cd>
cmpl   $0xb,-0x8(%rbp)
jne    1491 <main+0x341>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x48(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <factorial@plt>
mov    -0x48(%rbp),%esi
mov    %eax,%edx
lea    0xc54(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <factorial@plt>
mov    -0x44(%rbp),%esi
mov    %eax,%edx
lea    0xc2d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    -0x40(%rbp),%esi
mov    %eax,%edx
lea    0xc0c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    16f3 <main+0x5a3>
cmpl   $0xc,-0x8(%rbp)
jne    150f <main+0x3bf>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x54(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <factorial@plt>
mov    -0x54(%rbp),%esi
mov    %eax,%edx
lea    0xbe0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x50(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <factorial@plt>
mov    -0x50(%rbp),%esi
mov    %eax,%edx
lea    0xbb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    -0x4c(%rbp),%esi
mov    %eax,%edx
lea    0xb98(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    16ee <main+0x59e>
cmpl   $0xa9,-0x8(%rbp)
jl     152f <main+0x3df>
lea    0xb82(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    16e9 <main+0x599>
cmpl   $0xd,-0x8(%rbp)
jne    1594 <main+0x444>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x5c(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <factorial@plt>
mov    -0x5c(%rbp),%esi
mov    %eax,%edx
lea    0xb67(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x58(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <factorial@plt>
mov    -0x58(%rbp),%esi
mov    %eax,%edx
lea    0xb40(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1070 <factorial_for_big_number@plt>
jmp    16e4 <main+0x594>
cmpl   $0xe,-0x8(%rbp)
jne    15eb <main+0x49b>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x60(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <factorial@plt>
mov    -0x60(%rbp),%esi
mov    %eax,%edx
lea    0xb10(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1070 <factorial_for_big_number@plt>
lea    0xb07(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1070 <factorial_for_big_number@plt>
jmp    16df <main+0x58f>
cmpl   $0xa7,-0x8(%rbp)
jne    163d <main+0x4ed>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1070 <factorial_for_big_number@plt>
lea    0xad3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1070 <factorial_for_big_number@plt>
lea    0xaba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xaaf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    16da <main+0x58a>
cmpl   $0xa8,-0x8(%rbp)
jne    169b <main+0x54b>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1070 <factorial_for_big_number@plt>
lea    0xa81(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
lea    0xa92(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xa5f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xa73(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    16d5 <main+0x585>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1070 <factorial_for_big_number@plt>
lea    0xa30(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1070 <factorial_for_big_number@plt>
lea    0xa17(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1070 <factorial_for_big_number@plt>
jmp    16da <main+0x58a>
jmp    16df <main+0x58f>
jmp    16e4 <main+0x594>
jmp    16e9 <main+0x599>
jmp    16ee <main+0x59e>
jmp    16f3 <main+0x5a3>
jmp    16f8 <main+0x5a8>
jmp    16fd <main+0x5ad>
jmp    1702 <main+0x5b2>
jmp    1707 <main+0x5b7>
jmp    170c <main+0x5bc>
jmp    1711 <main+0x5c1>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xe81(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xece(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1080 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
js     11f6 <main+0x86>
lea    -0x2(%rax),%ebx
cmp    $0x3,%ebx
jae    1209 <main+0x99>
mov    %ebx,%edi
call   1050 <factorial@plt>
lea    0xea9(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%ebx
add    $0xffffffff,%ebx
mov    %ebx,%edi
call   1050 <factorial@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1050 <factorial@plt>
lea    0xe76(%rip),%rdi
jmp    139a <main+0x22a>
lea    0xe0a(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    13a5 <main+0x235>
cmp    $0x1,%eax
je     1254 <main+0xe4>
test   %eax,%eax
jne    129e <main+0x12e>
lea    0xdf8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xfffffffe,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%esi
add    $0xffffffff,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1050 <factorial@plt>
lea    0xdde(%rip),%rdi
jmp    139a <main+0x22a>
lea    0xddb(%rip),%rdi
mov    $0xffffffff,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%ebx
add    $0xffffffff,%ebx
mov    %ebx,%edi
call   1050 <factorial@plt>
lea    0xdd1(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1050 <factorial@plt>
lea    0xdbd(%rip),%rdi
jmp    139a <main+0x22a>
lea    -0x5(%rax),%ecx
cmp    $0x2,%ecx
ja     12f5 <main+0x185>
mov    %ebx,%edi
call   1050 <factorial@plt>
lea    0xdbb(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%ebx
add    $0xffffffff,%ebx
mov    %ebx,%edi
call   1050 <factorial@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1050 <factorial@plt>
lea    0xd88(%rip),%rdi
jmp    139a <main+0x22a>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
cmp    $0xa,%ecx
je     1354 <main+0x1e4>
cmp    $0x8,%ecx
jne    13be <main+0x24e>
mov    %ebx,%edi
call   1050 <factorial@plt>
lea    0xd6a(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%ebx
add    $0xffffffff,%ebx
mov    %ebx,%edi
call   1050 <factorial@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1050 <factorial@plt>
lea    0xd37(%rip),%rdi
jmp    139a <main+0x22a>
mov    %ebx,%edi
call   1050 <factorial@plt>
lea    0xd2f(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%ebx
add    $0xffffffff,%ebx
mov    %ebx,%edi
call   1050 <factorial@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1050 <factorial@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
cmp    $0xc,%eax
jne    1413 <main+0x2a3>
mov    $0xa,%edi
call   1050 <factorial@plt>
lea    0xcc7(%rip),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%ebp
add    $0xffffffff,%ebp
mov    %ebp,%edi
call   1050 <factorial@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%ebp
mov    %ebp,%edi
call   1050 <factorial@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
jmp    139c <main+0x22c>
cmp    $0xa9,%eax
jb     1426 <main+0x2b6>
lea    0xc84(%rip),%rdi
jmp    11fd <main+0x8d>
cmp    $0xa6,%eax
jg     1479 <main+0x309>
cmp    $0xd,%eax
je     14db <main+0x36b>
cmp    $0xe,%eax
jne    1554 <main+0x3e4>
mov    $0xc,%edi
call   1050 <factorial@plt>
lea    0xc7e(%rip),%rdi
mov    $0xc,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%edi
add    $0xffffffff,%edi
call   1090 <factorial_for_big_number@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    157e <main+0x40e>
cmp    $0xa7,%eax
je     151b <main+0x3ab>
cmp    $0xa8,%eax
jne    1554 <main+0x3e4>
mov    $0xa6,%edi
call   1090 <factorial_for_big_number@plt>
lea    0xbb4(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    0xc(%rsp),%esi
add    $0xffffffff,%esi
lea    0xc49(%rip),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    0xc(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    13a5 <main+0x235>
mov    $0xb,%edi
call   1050 <factorial@plt>
lea    0xbd4(%rip),%rbx
mov    %rbx,%rdi
mov    $0xb,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%ebp
add    $0xffffffff,%ebp
mov    %ebp,%edi
call   1050 <factorial@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
jmp    157e <main+0x40e>
mov    $0xa5,%edi
call   1090 <factorial_for_big_number@plt>
lea    0xb28(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    0xc(%rsp),%edi
add    $0xffffffff,%edi
call   1090 <factorial_for_big_number@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xb8e(%rip),%rdi
jmp    11fd <main+0x8d>
mov    %ebx,%edi
call   1090 <factorial_for_big_number@plt>
lea    0xaf2(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    0xc(%rsp),%edi
add    $0xffffffff,%edi
call   1090 <factorial_for_big_number@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    0xc(%rsp),%edi
call   1090 <factorial_for_big_number@plt>
jmp    13a5 <main+0x235>

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

LLVM IR (-O2):
@.str = [7 x i8] c"Enter:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [14 x i8] c"Invalid Input\00"
@.str.3 = [24 x i8] c"%2d!:Cannot Calculated\0A\00"
@.str.4 = [9 x i8] c"%+2d!:%d\00"
@.str.5 = [23 x i8] c"%d!:Cannot Calculated\0A\00"
@.str.6 = [9 x i8] c"%2d!:%d\0A\00"
@.str.7 = [8 x i8] c"%+d!:%d\00"
@.str.8 = [9 x i8] c"%d!:%2d\0A\00"
@.str.9 = [8 x i8] c"%d!:%2d\00"
@.str.10 = [9 x i8] c"%d!:%4d\0A\00"
@.str.11 = [8 x i8] c"%d!:%4d\00"
@.str.12 = [9 x i8] c"%d!:%6d\0A\00"
@.str.13 = [8 x i8] c"%d!:%6d\00"
@.str.14 = [10 x i8] c"%2d!:%8d\0A\00"
@.str.15 = [10 x i8] c"%2d!:%9d\0A\00"
@.str.16 = [27 x i8] c"Large Input for array[300]\00"
@.str.17 = [14 x i8] c"%2d!: %9d\0A\00"
@.str.18 = [15 x i8] c"%2d!: %9d\0A\00"
@.str.21 = [34 x i8] c"167 is large input for array[300]\00"
@.str.22 = [33 x i8] c"%d is large input for array[300]\00"
@str.27 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %138
9: ; preds = %0
switch i32 %5, label %38 [
i32 0, label %10
i32 1, label %18
i32 4, label %27
i32 3, label %27
i32 2, label %27
]
10: ; preds = %9
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 -2)
%12 = load i32, i32* %1
%13 = add nsw i32 %12, -1
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %1
%16 = call i32 @factorial(i32 %15)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %15, i32 %16)
br label %138
18: ; preds = %9
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 -1)
%20 = load i32, i32* %1
%21 = add nsw i32 %20, -1
%22 = call i32 @factorial(i32 %21)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %21, i32 %22)
%24 = load i32, i32* %1
%25 = call i32 @factorial(i32 %24)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 %24, i32 %25)
br label %138
27: ; preds = %9, %9, %9
%28 = add nsw i32 %5, -2
%29 = call i32 @factorial(i32 %28)
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %28, i32 %29)
%31 = load i32, i32* %1
%32 = add nsw i32 %31, -1
%33 = call i32 @factorial(i32 %32)
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %32, i32 %33)
%35 = load i32, i32* %1
%36 = call i32 @factorial(i32 %35)
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32 %35, i32 %36)
br label %138
38: ; preds = %9
%39 = add nsw i32 %5, -5
%40 = icmp ult i32 %39, 3
br i1 %40, label %41, label %52
41: ; preds = %38
%42 = add nsw i32 %5, -2
%43 = call i32 @factorial(i32 %42)
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i32 %42, i32 %43)
%45 = load i32, i32* %1
%46 = add nsw i32 %45, -1
%47 = call i32 @factorial(i32 %46)
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i32 %46, i32 %47)
%49 = load i32, i32* %1
%50 = call i32 @factorial(i32 %49)
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i32 %49, i32 %50)
br label %138
52: ; preds = %38
%53 = and i32 %5, -2
switch i32 %53, label %76 [
i32 8, label %54
i32 10, label %65
]
54: ; preds = %52
%55 = add nsw i32 %5, -2
%56 = call i32 @factorial(i32 %55)
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), i32 %55, i32 %56)
%58 = load i32, i32* %1
%59 = add nsw i32 %58, -1
%60 = call i32 @factorial(i32 %59)
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), i32 %59, i32 %60)
%62 = load i32, i32* %1
%63 = call i32 @factorial(i32 %62)
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i32 %62, i32 %63)
br label %138
65: ; preds = %52
%66 = add nsw i32 %5, -2
%67 = call i32 @factorial(i32 %66)
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i32 %66, i32 %67)
%69 = load i32, i32* %1
%70 = add nsw i32 %69, -1
%71 = call i32 @factorial(i32 %70)
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i32 %70, i32 %71)
%73 = load i32, i32* %1
%74 = call i32 @factorial(i32 %73)
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i32 %73, i32 %74)
br label %138
76: ; preds = %52
%77 = icmp eq i32 %5, 12
br i1 %77, label %78, label %88
78: ; preds = %76
%79 = call i32 @factorial(i32 10)
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i64 0, i64 0), i32 10, i32 %79)
%81 = load i32, i32* %1
%82 = add nsw i32 %81, -1
%83 = call i32 @factorial(i32 %82)
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i64 0, i64 0), i32 %82, i32 %83)
%85 = load i32, i32* %1
%86 = call i32 @factorial(i32 %85)
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i64 0, i64 0), i32 %85, i32 %86)
br label %138
88: ; preds = %76
%89 = icmp ugt i32 %5, 168
br i1 %89, label %90, label %92
90: ; preds = %88
%91 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.16, i64 0, i64 0))
br label %138
92: ; preds = %88
switch i32 %5, label %128 [
i32 13, label %93
i32 14, label %102
i32 167, label %111
i32 168, label %119
]
93: ; preds = %92
%94 = call i32 @factorial(i32 11)
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i64 0, i64 0), i32 11, i32 %94)
%96 = load i32, i32* %1
%97 = add nsw i32 %96, -1
%98 = call i32 @factorial(i32 %97)
%99 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i64 0, i64 0), i32 %97, i32 %98)
%100 = load i32, i32* %1
%101 = call i32 @factorial_for_big_number(i32 %100)
br label %138
102: ; preds = %92
%103 = call i32 @factorial(i32 12)
%104 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.18, i64 0, i64 0), i32 12, i32 %103)
%105 = load i32, i32* %1
%106 = add nsw i32 %105, -1
%107 = call i32 @factorial_for_big_number(i32 %106)
%108 = call i32 @putchar(i32 10)
%109 = load i32, i32* %1
%110 = call i32 @factorial_for_big_number(i32 %109)
br label %138
111: ; preds = %92
%112 = call i32 @factorial_for_big_number(i32 165)
%113 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.27, i64 0, i64 0))
%114 = load i32, i32* %1
%115 = add nsw i32 %114, -1
%116 = call i32 @factorial_for_big_number(i32 %115)
%117 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.27, i64 0, i64 0))
%118 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.21, i64 0, i64 0))
br label %138
119: ; preds = %92
%120 = call i32 @factorial_for_big_number(i32 166)
%121 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.27, i64 0, i64 0))
%122 = load i32, i32* %1
%123 = add nsw i32 %122, -1
%124 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.22, i64 0, i64 0), i32 %123)
%125 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.27, i64 0, i64 0))
%126 = load i32, i32* %1
%127 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.22, i64 0, i64 0), i32 %126)
br label %138
128: ; preds = %92
%129 = add nsw i32 %5, -2
%130 = call i32 @factorial_for_big_number(i32 %129)
%131 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.27, i64 0, i64 0))
%132 = load i32, i32* %1
%133 = add nsw i32 %132, -1
%134 = call i32 @factorial_for_big_number(i32 %133)
%135 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.27, i64 0, i64 0))
%136 = load i32, i32* %1
%137 = call i32 @factorial_for_big_number(i32 %136)
br label %138
138: ; preds = %10, %27, %54, %78, %93, %111, %128, %119, %102, %90, %65, %41, %18, %7
%139 = call i32 (...) @getchar()
%140 = call i32 (...) @getchar()
ret i32 0
}