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


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

x86 assembly (clang, -O2):
<seven_f1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r13d
mov    0x50(%rsp),%eax
mov    %eax,(%rsp)
call   1030 <seven_f2@plt>
movsd  %xmm0,0x10(%rsp)
mov    0x50(%rsp),%eax
mov    %eax,(%rsp)
mov    %r13d,%edi
mov    %ebp,%esi
mov    %r12d,%edx
mov    %ebx,%ecx
mov    %r15d,%r8d
mov    %r14d,%r9d
call   1030 <seven_f2@plt>
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x50(%rsp),%eax
mov    %eax,(%rsp)
mov    %r13d,%edi
mov    %ebp,%esi
mov    %r15d,%edx
mov    %r12d,%ecx
mov    %ebx,%r8d
mov    %r14d,%r9d
call   1030 <seven_f2@plt>
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x50(%rsp),%eax
mov    %eax,(%rsp)
mov    %r13d,%edi
mov    %ebp,%esi
mov    %r14d,%edx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %ebx,%r9d
call   1030 <seven_f2@plt>
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    %ebx,(%rsp)
mov    %r13d,%edi
mov    %ebp,%esi
mov    0x50(%rsp),%edx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %r14d,%r9d
call   1030 <seven_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 @seven_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 @seven_f2(i32 %15, i32 %16, i32 %17, i32 %18, i32 %19, i32 %20, i32 %21)
%23 = load i32, i32* %8
%24 = load i32, i32* %9
%25 = load i32, i32* %11
%26 = load i32, i32* %10
%27 = load i32, i32* %12
%28 = load i32, i32* %13
%29 = load i32, i32* %14
%30 = call double @seven_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* %9
%34 = load i32, i32* %12
%35 = load i32, i32* %11
%36 = load i32, i32* %10
%37 = load i32, i32* %13
%38 = load i32, i32* %14
%39 = call double @seven_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* %9
%43 = load i32, i32* %13
%44 = load i32, i32* %11
%45 = load i32, i32* %12
%46 = load i32, i32* %10
%47 = load i32, i32* %14
%48 = call double @seven_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* %9
%52 = load i32, i32* %14
%53 = load i32, i32* %11
%54 = load i32, i32* %12
%55 = load i32, i32* %13
%56 = load i32, i32* %10
%57 = call double @seven_f2(i32 %50, i32 %51, i32 %52, i32 %53, i32 %54, i32 %55, i32 %56)
%58 = fadd double %49, %57
ret double %58
}

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