#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 */
long _fact(long);
scalar_t__ _sum(long, long);
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ scanf(char *, long *);
long _main() {
  long EV_num1;
  long EV_num2;
  long EV_flag;
  EV_flag = 0;
  while ((EV_flag != (-1))) {
    scanf("%ld", &EV_num1);
    scanf("%ld", &EV_num2);
    EV_num1 = _fact(EV_num1);
    EV_num2 = _fact(EV_num2);
    printf("%ld\n", (long)_sum(EV_num1, EV_num2));
    scanf("%ld", &EV_flag);
  }
  return 0;
}


x86 assembly (clang, -O0):
<_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x18(%rbp)
cmpq   $0xffffffffffffffff,-0x18(%rbp)
je     11c6 <_main+0x86>
lea    0xe9e(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xe8e(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <_fact@plt>
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <_fact@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <_sum@plt>
mov    %rax,%rsi
lea    0xe58(%rip),%rdi
call   1040 <printf@plt>
lea    0xe48(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
jmp    1150 <_main+0x10>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20,%rsp
movq   $0x0,0x10(%rsp)
lea    0xea3(%rip),%rbx
lea    0x8(%rsp),%r14
lea    0x18(%rsp),%r15
lea    0xe96(%rip),%r12
lea    0x10(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
mov    0x8(%rsp),%rdi
call   1030 <_fact@plt>
mov    %rax,0x8(%rsp)
mov    0x18(%rsp),%rdi
call   1030 <_fact@plt>
mov    %rax,0x18(%rsp)
mov    0x8(%rsp),%rdi
mov    %rax,%rsi
call   1060 <_sum@plt>
mov    %r12,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1050 <scanf@plt>
cmpq   $0xffffffffffffffff,0x10(%rsp)
jne    1180 <_main+0x40>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i64 @_main() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
store i64 0, i64* %3
br label %4
4: ; preds = %7, %0
%5 = load i64, i64* %3
%6 = icmp ne i64 %5, -1
br i1 %6, label %7, label %19
7: ; preds = %4
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %2)
%10 = load i64, i64* %1
%11 = call i64 @_fact(i64 %10)
store i64 %11, i64* %1
%12 = load i64, i64* %2
%13 = call i64 @_fact(i64 %12)
store i64 %13, i64* %2
%14 = load i64, i64* %1
%15 = load i64, i64* %2
%16 = call i64 @_sum(i64 %14, i64 %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %16)
%18 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %3)
br label %4
19: ; preds = %4
ret i64 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i64 @_main() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = bitcast i64* %1 to i8*
%5 = bitcast i64* %2 to i8*
%6 = bitcast i64* %3 to i8*
store i64 0, i64* %3
br label %7
7: ; preds = %0, %7
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %2)
%10 = load i64, i64* %1
%11 = call i64 @_fact(i64 %10)
store i64 %11, i64* %1
%12 = load i64, i64* %2
%13 = call i64 @_fact(i64 %12)
store i64 %13, i64* %2
%14 = load i64, i64* %1
%15 = call i64 @_sum(i64 %14, i64 %13)
%16 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %15)
%17 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %3)
%18 = load i64, i64* %3
%19 = icmp eq i64 %18, -1
br i1 %19, label %20, label %7
20: ; preds = %7
ret i64 0
}