#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 */
scalar_t__ EOF;
unsigned long long calcfat(int);
int /*<<< orphan*/ printf(char *, unsigned long long);
scalar_t__ scanf(char *, int *, int *);
int main() {
  int i, x, y;
  long long unsigned n[25];
  for (i = 0; i <= 20; i++) {
    n[i] = calcfat(i);
  }
  while (scanf(" %d %d", &x, &y) != EOF) {
    printf("%llu\n", n[x] + n[y]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jg     1178 <main+0x48>
mov    -0x8(%rbp),%edi
call   1050 <calcfat@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
mov    %rcx,-0xe0(%rbp,%rax,8)
ff
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1149 <main+0x19>
jmp    117d <main+0x4d>
lea    0xe7c(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <scanf@plt>
mov    0x2e50(%rip),%rcx
cmp    (%rcx),%rax
je     11ca <main+0x9a>
movslq -0xc(%rbp),%rax
mov    -0xe0(%rbp,%rax,8),%rsi
ff
movslq -0x10(%rbp),%rax
add    -0xe0(%rbp,%rax,8),%rsi
ff
lea    0xe47(%rip),%rdi
call   1030 <printf@plt>
jmp    117d <main+0x4d>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe0,%rsp
xor    %edi,%edi
call   1050 <calcfat@plt>
mov    %rax,0x10(%rsp)
mov    $0x1,%edi
call   1050 <calcfat@plt>
mov    %rax,0x18(%rsp)
mov    $0x2,%edi
call   1050 <calcfat@plt>
mov    %rax,0x20(%rsp)
mov    $0x3,%edi
call   1050 <calcfat@plt>
mov    %rax,0x28(%rsp)
mov    $0x4,%edi
call   1050 <calcfat@plt>
mov    %rax,0x30(%rsp)
mov    $0x5,%edi
call   1050 <calcfat@plt>
mov    %rax,0x38(%rsp)
mov    $0x6,%edi
call   1050 <calcfat@plt>
mov    %rax,0x40(%rsp)
mov    $0x7,%edi
call   1050 <calcfat@plt>
mov    %rax,0x48(%rsp)
mov    $0x8,%edi
call   1050 <calcfat@plt>
mov    %rax,0x50(%rsp)
mov    $0x9,%edi
call   1050 <calcfat@plt>
mov    %rax,0x58(%rsp)
mov    $0xa,%edi
call   1050 <calcfat@plt>
mov    %rax,0x60(%rsp)
mov    $0xb,%edi
call   1050 <calcfat@plt>
mov    %rax,0x68(%rsp)
mov    $0xc,%edi
call   1050 <calcfat@plt>
mov    %rax,0x70(%rsp)
mov    $0xd,%edi
call   1050 <calcfat@plt>
mov    %rax,0x78(%rsp)
mov    $0xe,%edi
call   1050 <calcfat@plt>
mov    %rax,0x80(%rsp)
mov    $0xf,%edi
call   1050 <calcfat@plt>
mov    %rax,0x88(%rsp)
mov    $0x10,%edi
call   1050 <calcfat@plt>
mov    %rax,0x90(%rsp)
mov    $0x11,%edi
call   1050 <calcfat@plt>
mov    %rax,0x98(%rsp)
mov    $0x12,%edi
call   1050 <calcfat@plt>
mov    %rax,0xa0(%rsp)
mov    $0x13,%edi
call   1050 <calcfat@plt>
mov    %rax,0xa8(%rsp)
mov    $0x14,%edi
call   1050 <calcfat@plt>
mov    %rax,0xb0(%rsp)
lea    0xd6c(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x2d3e(%rip),%r13
cmp    0x0(%r13),%rax
je     1300 <main+0x1d0>
lea    0xd50(%rip),%r14
lea    0xd42(%rip),%r15
lea    0xc(%rsp),%r12
lea    0x8(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
movslq 0xc(%rsp),%rax
movslq 0x8(%rsp),%rcx
mov    0x10(%rsp,%rcx,8),%rsi
add    0x10(%rsp,%rax,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmp    0x0(%r13),%rax
jne    12d0 <main+0x1a0>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c" %d %d\00"
@EOF = global i64 0
@.str.1 = [6 x i8] c"%llu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [25 x i64]
store i32 0, i32* %1
store i32 0, i32* %2
br label %6
6: ; preds = %15, %0
%7 = load i32, i32* %2
%8 = icmp sle i32 %7, 20
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i32, i32* %2
%11 = call i64 @calcfat(i32 %10)
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [25 x i64], [25 x i64]* %5, i64 0, i64 %13
store i64 %11, i64* %14
br label %15
15: ; preds = %9
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %6
18: ; preds = %6
br label %19
19: ; preds = %23, %18
%20 = call i64 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%21 = load i64, i64* @EOF
%22 = icmp ne i64 %20, %21
br i1 %22, label %23, label %34
23: ; preds = %19
%24 = load i32, i32* %3
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [25 x i64], [25 x i64]* %5, i64 0, i64 %25
%27 = load i64, i64* %26
%28 = load i32, i32* %4
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [25 x i64], [25 x i64]* %5, i64 0, i64 %29
%31 = load i64, i64* %30
%32 = add i64 %27, %31
%33 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %32)
br label %19
34: ; preds = %19
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c" %d %d\00"
@EOF = global i64 0
@.str.1 = [6 x i8] c"%llu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [25 x i64]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast [25 x i64]* %3 to i8*
%7 = tail call i64 @calcfat(i32 0)
%8 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 0
store i64 %7, i64* %8
%9 = tail call i64 @calcfat(i32 1)
%10 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 1
store i64 %9, i64* %10
%11 = tail call i64 @calcfat(i32 2)
%12 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 2
store i64 %11, i64* %12
%13 = tail call i64 @calcfat(i32 3)
%14 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 3
store i64 %13, i64* %14
%15 = tail call i64 @calcfat(i32 4)
%16 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 4
store i64 %15, i64* %16
%17 = tail call i64 @calcfat(i32 5)
%18 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 5
store i64 %17, i64* %18
%19 = tail call i64 @calcfat(i32 6)
%20 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 6
store i64 %19, i64* %20
%21 = tail call i64 @calcfat(i32 7)
%22 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 7
store i64 %21, i64* %22
%23 = tail call i64 @calcfat(i32 8)
%24 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 8
store i64 %23, i64* %24
%25 = tail call i64 @calcfat(i32 9)
%26 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 9
store i64 %25, i64* %26
%27 = tail call i64 @calcfat(i32 10)
%28 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 10
store i64 %27, i64* %28
%29 = tail call i64 @calcfat(i32 11)
%30 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 11
store i64 %29, i64* %30
%31 = tail call i64 @calcfat(i32 12)
%32 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 12
store i64 %31, i64* %32
%33 = tail call i64 @calcfat(i32 13)
%34 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 13
store i64 %33, i64* %34
%35 = tail call i64 @calcfat(i32 14)
%36 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 14
store i64 %35, i64* %36
%37 = tail call i64 @calcfat(i32 15)
%38 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 15
store i64 %37, i64* %38
%39 = tail call i64 @calcfat(i32 16)
%40 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 16
store i64 %39, i64* %40
%41 = tail call i64 @calcfat(i32 17)
%42 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 17
store i64 %41, i64* %42
%43 = tail call i64 @calcfat(i32 18)
%44 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 18
store i64 %43, i64* %44
%45 = tail call i64 @calcfat(i32 19)
%46 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 19
store i64 %45, i64* %46
%47 = tail call i64 @calcfat(i32 20)
%48 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 20
store i64 %47, i64* %48
%49 = call i64 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%50 = load i64, i64* @EOF
%51 = icmp eq i64 %49, %50
br i1 %51, label %66, label %52
52: ; preds = %0, %52
%53 = load i32, i32* %1
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 %54
%56 = load i64, i64* %55
%57 = load i32, i32* %2
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [25 x i64], [25 x i64]* %3, i64 0, i64 %58
%60 = load i64, i64* %59
%61 = add i64 %60, %56
%62 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %61)
%63 = call i64 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%64 = load i64, i64* @EOF
%65 = icmp eq i64 %63, %64
br i1 %65, label %66, label %52
66: ; preds = %52, %0
ret i32 0
}