#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 */
double eight_f2(int, int, int, int, int, int, int);
double eight_f1(int a, int b, int c, int d, int e, int f, int g) {
  return eight_f2(a, b, c, d, e, f, g) + eight_f2(a, c, b, d, e, f, g) +
         eight_f2(a, d, b, c, e, f, g) + eight_f2(a, e, b, c, d, f, g) +
         eight_f2(a, f, b, c, d, e, g) + eight_f2(a, g, b, c, d, e, f);
}


x86 assembly (clang, -O0):
<eight_f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <eight_f2@plt>
movsd  %xmm0,-0x40(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <eight_f2@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <eight_f2@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <eight_f2@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <eight_f2@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    0x10(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <eight_f2@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
addsd  %xmm1,%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eight_f1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9d,%r13d
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %esi,%ebx
mov    %edi,%ebp
mov    0x50(%rsp),%eax
mov    %eax,(%rsp)
call   1030 <eight_f2@plt>
movsd  %xmm0,0x10(%rsp)
mov    0x50(%rsp),%eax
mov    %eax,(%rsp)
mov    %ebp,%edi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
mov    %r13d,%r9d
call   1030 <eight_f2@plt>
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x50(%rsp),%eax
mov    %eax,(%rsp)
mov    %ebp,%edi
mov    %r15d,%esi
mov    %ebx,%edx
mov    %r12d,%ecx
mov    %r14d,%r8d
mov    %r13d,%r9d
call   1030 <eight_f2@plt>
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x50(%rsp),%eax
mov    %eax,(%rsp)
mov    %ebp,%edi
mov    %r14d,%esi
mov    %ebx,%edx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %r13d,%r9d
call   1030 <eight_f2@plt>
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x50(%rsp),%eax
mov    %eax,(%rsp)
mov    %ebp,%edi
mov    %r13d,%esi
mov    %ebx,%edx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %r14d,%r9d
call   1030 <eight_f2@plt>
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    %r13d,(%rsp)
mov    %ebp,%edi
mov    0x50(%rsp),%esi
mov    %ebx,%edx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %r14d,%r9d
call   1030 <eight_f2@plt>
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double @eight_f1(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = load i32, i32* %13
%21 = load i32, i32* %14
%22 = call double @eight_f2(i32 %15, i32 %16, i32 %17, i32 %18, i32 %19, i32 %20, i32 %21)
%23 = load i32, i32* %8
%24 = load i32, i32* %10
%25 = load i32, i32* %9
%26 = load i32, i32* %11
%27 = load i32, i32* %12
%28 = load i32, i32* %13
%29 = load i32, i32* %14
%30 = call double @eight_f2(i32 %23, i32 %24, i32 %25, i32 %26, i32 %27, i32 %28, i32 %29)
%31 = fadd double %22, %30
%32 = load i32, i32* %8
%33 = load i32, i32* %11
%34 = load i32, i32* %9
%35 = load i32, i32* %10
%36 = load i32, i32* %12
%37 = load i32, i32* %13
%38 = load i32, i32* %14
%39 = call double @eight_f2(i32 %32, i32 %33, i32 %34, i32 %35, i32 %36, i32 %37, i32 %38)
%40 = fadd double %31, %39
%41 = load i32, i32* %8
%42 = load i32, i32* %12
%43 = load i32, i32* %9
%44 = load i32, i32* %10
%45 = load i32, i32* %11
%46 = load i32, i32* %13
%47 = load i32, i32* %14
%48 = call double @eight_f2(i32 %41, i32 %42, i32 %43, i32 %44, i32 %45, i32 %46, i32 %47)
%49 = fadd double %40, %48
%50 = load i32, i32* %8
%51 = load i32, i32* %13
%52 = load i32, i32* %9
%53 = load i32, i32* %10
%54 = load i32, i32* %11
%55 = load i32, i32* %12
%56 = load i32, i32* %14
%57 = call double @eight_f2(i32 %50, i32 %51, i32 %52, i32 %53, i32 %54, i32 %55, i32 %56)
%58 = fadd double %49, %57
%59 = load i32, i32* %8
%60 = load i32, i32* %14
%61 = load i32, i32* %9
%62 = load i32, i32* %10
%63 = load i32, i32* %11
%64 = load i32, i32* %12
%65 = load i32, i32* %13
%66 = call double @eight_f2(i32 %59, i32 %60, i32 %61, i32 %62, i32 %63, i32 %64, i32 %65)
%67 = fadd double %58, %66
ret double %67
}

LLVM IR (-O2):
define double @eight_f1(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = tail call double @eight_f2(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
%9 = tail call double @eight_f2(i32 %0, i32 %2, i32 %1, i32 %3, i32 %4, i32 %5, i32 %6)
%10 = fadd double %8, %9
%11 = tail call double @eight_f2(i32 %0, i32 %3, i32 %1, i32 %2, i32 %4, i32 %5, i32 %6)
%12 = fadd double %10, %11
%13 = tail call double @eight_f2(i32 %0, i32 %4, i32 %1, i32 %2, i32 %3, i32 %5, i32 %6)
%14 = fadd double %12, %13
%15 = tail call double @eight_f2(i32 %0, i32 %5, i32 %1, i32 %2, i32 %3, i32 %4, i32 %6)
%16 = fadd double %14, %15
%17 = tail call double @eight_f2(i32 %0, i32 %6, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5)
%18 = fadd double %16, %17
ret double %18
}