#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 _f(int, int, double const, double const *);
double _n_2(const double omega, const double vertices_omegas[4]) {
  return (_f(3, 1, omega, vertices_omegas) * _f(2, 1, omega, vertices_omegas) +
          _f(3, 0, omega, vertices_omegas) * _f(1, 3, omega, vertices_omegas) *
              _f(2, 1, omega, vertices_omegas) +
          _f(3, 0, omega, vertices_omegas) * _f(2, 0, omega, vertices_omegas) *
              _f(1, 2, omega, vertices_omegas));
}


x86 assembly (clang, -O0):
<_n_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x3,%edi
mov    $0x1,%esi
call   1030 <_f@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
mov    $0x1,%esi
call   1030 <_f@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x3,%edi
xor    %esi,%esi
call   1030 <_f@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
mov    $0x3,%esi
call   1030 <_f@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
mov    $0x1,%esi
call   1030 <_f@plt>
movsd  -0x40(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x3,%edi
xor    %esi,%esi
call   1030 <_f@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
xor    %esi,%esi
call   1030 <_f@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <_f@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_n_2>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
movsd  %xmm0,(%rsp)
mov    $0x3,%edi
mov    $0x1,%esi
mov    %rbx,%rdx
call   1030 <_f@plt>
movsd  %xmm0,0x18(%rsp)
mov    $0x2,%edi
mov    $0x1,%esi
movsd  (%rsp),%xmm0
mov    %rbx,%rdx
call   1030 <_f@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x3,%edi
xor    %esi,%esi
movsd  (%rsp),%xmm0
mov    %rbx,%rdx
call   1030 <_f@plt>
movsd  %xmm0,0x10(%rsp)
mov    $0x1,%edi
mov    $0x3,%esi
movsd  (%rsp),%xmm0
mov    %rbx,%rdx
call   1030 <_f@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    $0x2,%edi
mov    $0x1,%esi
movsd  (%rsp),%xmm0
mov    %rbx,%rdx
call   1030 <_f@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0x18(%rsp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rsp)
mov    $0x3,%edi
xor    %esi,%esi
movsd  (%rsp),%xmm0
mov    %rbx,%rdx
call   1030 <_f@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x2,%edi
xor    %esi,%esi
movsd  (%rsp),%xmm0
mov    %rbx,%rdx
call   1030 <_f@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%edi
mov    $0x2,%esi
movsd  (%rsp),%xmm0
mov    %rbx,%rdx
call   1030 <_f@plt>
mulsd  0x8(%rsp),%xmm0
addsd  0x18(%rsp),%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @_n_2(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
store double %0, double* %3
store double* %1, double** %4
%5 = load double, double* %3
%6 = load double*, double** %4
%7 = call double @_f(i32 3, i32 1, double %5, double* %6)
%8 = load double, double* %3
%9 = load double*, double** %4
%10 = call double @_f(i32 2, i32 1, double %8, double* %9)
%11 = load double, double* %3
%12 = load double*, double** %4
%13 = call double @_f(i32 3, i32 0, double %11, double* %12)
%14 = load double, double* %3
%15 = load double*, double** %4
%16 = call double @_f(i32 1, i32 3, double %14, double* %15)
%17 = fmul double %13, %16
%18 = load double, double* %3
%19 = load double*, double** %4
%20 = call double @_f(i32 2, i32 1, double %18, double* %19)
%21 = fmul double %17, %20
%22 = call double @llvm.fmuladd.f64(double %7, double %10, double %21)
%23 = load double, double* %3
%24 = load double*, double** %4
%25 = call double @_f(i32 3, i32 0, double %23, double* %24)
%26 = load double, double* %3
%27 = load double*, double** %4
%28 = call double @_f(i32 2, i32 0, double %26, double* %27)
%29 = fmul double %25, %28
%30 = load double, double* %3
%31 = load double*, double** %4
%32 = call double @_f(i32 1, i32 2, double %30, double* %31)
%33 = call double @llvm.fmuladd.f64(double %29, double %32, double %22)
ret double %33
}

LLVM IR (-O2):
define double @_n_2(double %0, double* %1) {
%3 = tail call double @_f(i32 3, i32 1, double %0, double* %1)
%4 = tail call double @_f(i32 2, i32 1, double %0, double* %1)
%5 = tail call double @_f(i32 3, i32 0, double %0, double* %1)
%6 = tail call double @_f(i32 1, i32 3, double %0, double* %1)
%7 = fmul double %5, %6
%8 = tail call double @_f(i32 2, i32 1, double %0, double* %1)
%9 = fmul double %7, %8
%10 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %9)
%11 = tail call double @_f(i32 3, i32 0, double %0, double* %1)
%12 = tail call double @_f(i32 2, i32 0, double %0, double* %1)
%13 = fmul double %11, %12
%14 = tail call double @_f(i32 1, i32 2, double %0, double* %1)
%15 = tail call double @llvm.fmuladd.f64(double %13, double %14, double %10)
ret double %15
}