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


x86 assembly (clang, -O0):
<_J_22>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x3,%edi
mov    $0x1,%esi
call   1040 <_f@plt>
mov    %eax,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <_f@plt>
mov    %eax,%ecx
mov    -0x40(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x3c(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <_f@plt>
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x2c(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x3,%edi
xor    %esi,%esi
call   1040 <_f@plt>
mov    %eax,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
mov    $0x3,%esi
call   1040 <_f@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x34(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <_f@plt>
mov    %eax,%ecx
mov    -0x34(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <_f@plt>
mov    -0x30(%rbp),%ecx
mov    %eax,%edx
mov    -0x2c(%rbp),%eax
imul   %edx,%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x3,%edi
xor    %esi,%esi
call   1040 <_f@plt>
mov    %eax,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <_f@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x24(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <_f@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x1c(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <_f@plt>
mov    %eax,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <_f@plt>
mov    -0x20(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    %eax,%esi
mov    -0x18(%rbp),%eax
add    %esi,%edx
imul   %edx,%ecx
add    %ecx,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
call   1030 <_n_2@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_J_22>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r14
movsd  %xmm0,0x8(%rsp)
mov    $0x3,%edi
mov    $0x1,%esi
mov    %r14,%rdx
call   1040 <_f@plt>
mov    %eax,%ebp
mov    $0x2,%edi
mov    $0x1,%esi
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdx
call   1040 <_f@plt>
mov    %eax,%ebx
imul   %ebp,%ebx
mov    $0x2,%edi
mov    $0x1,%esi
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdx
call   1040 <_f@plt>
mov    %eax,%r15d
imul   %ebx,%r15d
mov    $0x3,%edi
xor    %esi,%esi
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdx
call   1040 <_f@plt>
mov    %eax,%ebx
mov    $0x1,%edi
mov    $0x3,%esi
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdx
call   1040 <_f@plt>
mov    %eax,%ebp
imul   %ebx,%ebp
mov    $0x2,%edi
mov    $0x1,%esi
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdx
call   1040 <_f@plt>
mov    %eax,%r12d
mov    $0x2,%edi
mov    $0x1,%esi
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdx
call   1040 <_f@plt>
mov    %eax,%ebx
imul   %r12d,%ebx
imul   %ebp,%ebx
add    %r15d,%ebx
mov    $0x3,%edi
xor    %esi,%esi
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdx
call   1040 <_f@plt>
mov    %eax,%r15d
mov    $0x2,%edi
xor    %esi,%esi
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdx
call   1040 <_f@plt>
mov    %eax,%ebp
imul   %r15d,%ebp
mov    $0x1,%edi
mov    $0x2,%esi
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdx
call   1040 <_f@plt>
mov    %eax,%r15d
mov    $0x2,%edi
mov    $0x1,%esi
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdx
call   1040 <_f@plt>
mov    %eax,%r12d
mov    $0x2,%edi
xor    %esi,%esi
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdx
call   1040 <_f@plt>
add    %r12d,%eax
imul   %r15d,%eax
imul   %ebp,%eax
mov    %ebx,%ecx
add    %eax,%ecx
lea    0x3(%rax,%rbx,1),%ebx
cmovns %ecx,%ebx
sar    $0x2,%ebx
movsd  0x8(%rsp),%xmm0
mov    %r14,%rdi
call   1030 <_n_2@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double @_J_22(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 i32 @_f(i32 3, i32 1, double %5, double* %6)
%8 = load double, double* %3
%9 = load double*, double** %4
%10 = call i32 @_f(i32 2, i32 1, double %8, double* %9)
%11 = mul nsw i32 %7, %10
%12 = load double, double* %3
%13 = load double*, double** %4
%14 = call i32 @_f(i32 2, i32 1, double %12, double* %13)
%15 = mul nsw i32 %11, %14
%16 = load double, double* %3
%17 = load double*, double** %4
%18 = call i32 @_f(i32 3, i32 0, double %16, double* %17)
%19 = load double, double* %3
%20 = load double*, double** %4
%21 = call i32 @_f(i32 1, i32 3, double %19, double* %20)
%22 = mul nsw i32 %18, %21
%23 = load double, double* %3
%24 = load double*, double** %4
%25 = call i32 @_f(i32 2, i32 1, double %23, double* %24)
%26 = mul nsw i32 %22, %25
%27 = load double, double* %3
%28 = load double*, double** %4
%29 = call i32 @_f(i32 2, i32 1, double %27, double* %28)
%30 = mul nsw i32 %26, %29
%31 = add nsw i32 %15, %30
%32 = load double, double* %3
%33 = load double*, double** %4
%34 = call i32 @_f(i32 3, i32 0, double %32, double* %33)
%35 = load double, double* %3
%36 = load double*, double** %4
%37 = call i32 @_f(i32 2, i32 0, double %35, double* %36)
%38 = mul nsw i32 %34, %37
%39 = load double, double* %3
%40 = load double*, double** %4
%41 = call i32 @_f(i32 1, i32 2, double %39, double* %40)
%42 = mul nsw i32 %38, %41
%43 = load double, double* %3
%44 = load double*, double** %4
%45 = call i32 @_f(i32 2, i32 1, double %43, double* %44)
%46 = load double, double* %3
%47 = load double*, double** %4
%48 = call i32 @_f(i32 2, i32 0, double %46, double* %47)
%49 = add nsw i32 %45, %48
%50 = mul nsw i32 %42, %49
%51 = add nsw i32 %31, %50
%52 = sdiv i32 %51, 4
%53 = load double, double* %3
%54 = load double*, double** %4
%55 = call i32 @_n_2(double %53, double* %54)
%56 = sdiv i32 %52, %55
%57 = sitofp i32 %56 to double
ret double %57
}

LLVM IR (-O2):
define double @_J_22(double %0, double* %1) {
%3 = tail call i32 @_f(i32 3, i32 1, double %0, double* %1)
%4 = tail call i32 @_f(i32 2, i32 1, double %0, double* %1)
%5 = mul nsw i32 %4, %3
%6 = tail call i32 @_f(i32 2, i32 1, double %0, double* %1)
%7 = mul nsw i32 %5, %6
%8 = tail call i32 @_f(i32 3, i32 0, double %0, double* %1)
%9 = tail call i32 @_f(i32 1, i32 3, double %0, double* %1)
%10 = mul nsw i32 %9, %8
%11 = tail call i32 @_f(i32 2, i32 1, double %0, double* %1)
%12 = mul nsw i32 %10, %11
%13 = tail call i32 @_f(i32 2, i32 1, double %0, double* %1)
%14 = mul nsw i32 %12, %13
%15 = add nsw i32 %14, %7
%16 = tail call i32 @_f(i32 3, i32 0, double %0, double* %1)
%17 = tail call i32 @_f(i32 2, i32 0, double %0, double* %1)
%18 = mul nsw i32 %17, %16
%19 = tail call i32 @_f(i32 1, i32 2, double %0, double* %1)
%20 = mul nsw i32 %18, %19
%21 = tail call i32 @_f(i32 2, i32 1, double %0, double* %1)
%22 = tail call i32 @_f(i32 2, i32 0, double %0, double* %1)
%23 = add nsw i32 %22, %21
%24 = mul nsw i32 %20, %23
%25 = add nsw i32 %15, %24
%26 = sdiv i32 %25, 4
%27 = tail call i32 @_n_2(double %0, double* %1)
%28 = sdiv i32 %26, %27
%29 = sitofp i32 %28 to double
ret double %29
}