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


x86 assembly (clang, -O0):
<_g_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm1
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm1
movsd  0xec6(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <_f@plt>
mov    %eax,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
xor    %esi,%esi
call   1030 <_f@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
mov    $0x1,%esi
call   1030 <_f@plt>
mov    %eax,-0x24(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
mov    $0x3,%esi
call   1030 <_f@plt>
mov    -0x24(%rbp),%ecx
movsd  -0x20(%rbp),%xmm0
mov    %eax,%edx
mov    -0x14(%rbp),%eax
imul   %edx,%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_g_2>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  %xmm0,(%rsp)
movsd  0x18(%rdi),%xmm2
subsd  (%rdi),%xmm2
movsd  0xecf(%rip),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rsp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    %rbx,%rdx
call   1030 <_f@plt>
mov    %eax,%r14d
mov    $0x2,%edi
xor    %esi,%esi
movsd  (%rsp),%xmm0
mov    %rbx,%rdx
call   1030 <_f@plt>
mov    %eax,%ebp
imul   %r14d,%ebp
mov    $0x2,%edi
mov    $0x1,%esi
movsd  (%rsp),%xmm0
mov    %rbx,%rdx
call   1030 <_f@plt>
mov    %eax,%r14d
mov    $0x1,%edi
mov    $0x3,%esi
movsd  (%rsp),%xmm0
mov    %rbx,%rdx
call   1030 <_f@plt>
imul   %r14d,%eax
add    %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define double @_g_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** %4
%6 = getelementptr inbounds double, double* %5, i64 3
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = fsub double %7, %10
%12 = fdiv double 3.000000e+00, %11
%13 = load double, double* %3
%14 = load double*, double** %4
%15 = call i32 @_f(i32 1, i32 2, double %13, double* %14)
%16 = load double, double* %3
%17 = load double*, double** %4
%18 = call i32 @_f(i32 2, i32 0, double %16, double* %17)
%19 = mul nsw i32 %15, %18
%20 = load double, double* %3
%21 = load double*, double** %4
%22 = call i32 @_f(i32 2, i32 1, double %20, double* %21)
%23 = load double, double* %3
%24 = load double*, double** %4
%25 = call i32 @_f(i32 1, i32 3, double %23, double* %24)
%26 = mul nsw i32 %22, %25
%27 = add nsw i32 %19, %26
%28 = sitofp i32 %27 to double
%29 = fmul double %12, %28
ret double %29
}

LLVM IR (-O2):
define double @_g_2(double %0, double* %1) {
%3 = getelementptr inbounds double, double* %1, i64 3
%4 = load double, double* %3
%5 = load double, double* %1
%6 = fsub double %4, %5
%7 = fdiv double 3.000000e+00, %6
%8 = tail call i32 @_f(i32 1, i32 2, double %0, double* %1)
%9 = tail call i32 @_f(i32 2, i32 0, double %0, double* %1)
%10 = mul nsw i32 %9, %8
%11 = tail call i32 @_f(i32 2, i32 1, double %0, double* %1)
%12 = tail call i32 @_f(i32 1, i32 3, double %0, double* %1)
%13 = mul nsw i32 %12, %11
%14 = add nsw i32 %13, %10
%15 = sitofp i32 %14 to double
%16 = fmul double %7, %15
ret double %16
}