#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 f(int, int, int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *, int *);
main() {
  int a, b, c, d, e;
  scanf("%d %d %d %d %d", &a, &b, &c, &d, &e);
  printf("%d\n", f(a, b, d, e) + f(a, c, d, e) + f(b, c, d, e));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec1(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x10(%rbp),%r8
lea    -0x14(%rbp),%r9
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <f@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <f@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <f@plt>
mov    -0x18(%rbp),%esi
add    %eax,%esi
lea    0xe6b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xec4(%rip),%rdi
lea    0x1c(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0xc(%rsp),%r9
call   1050 <scanf@plt>
mov    0x1c(%rsp),%edi
mov    0x18(%rsp),%esi
mov    0x10(%rsp),%edx
mov    0xc(%rsp),%ecx
call   1030 <f@plt>
mov    %eax,%ebx
mov    0x1c(%rsp),%edi
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
mov    0xc(%rsp),%ecx
call   1030 <f@plt>
add    %eax,%ebx
mov    0x18(%rsp),%edi
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
mov    0xc(%rsp),%ecx
call   1030 <f@plt>
add    %eax,%ebx
lea    0xe69(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%d %d %d %d %d\00"
@.str.1 = [4 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 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4, i32* %5)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = call i32 @f(i32 %7, i32 %8, i32 %9, i32 %10)
%12 = load i32, i32* %1
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = call i32 @f(i32 %12, i32 %13, i32 %14, i32 %15)
%17 = add nsw i32 %11, %16
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = call i32 @f(i32 %18, i32 %19, i32 %20, i32 %21)
%23 = add nsw i32 %17, %22
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"%d %d %d %d %d\00"
@.str.1 = [4 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 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4, i32* %5)
%12 = load i32, i32* %1
%13 = load i32, i32* %2
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = call i32 @f(i32 %12, i32 %13, i32 %14, i32 %15)
%17 = load i32, i32* %1
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = call i32 @f(i32 %17, i32 %18, i32 %19, i32 %20)
%22 = add nsw i32 %21, %16
%23 = load i32, i32* %2
%24 = load i32, i32* %3
%25 = load i32, i32* %4
%26 = load i32, i32* %5
%27 = call i32 @f(i32 %23, i32 %24, i32 %25, i32 %26)
%28 = add nsw i32 %22, %27
%29 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %28)
ret i32 0
}