#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 pow(double, double);
double sin(double);
double omega(double latitude, double A, double B, double C) {
  double slat, om;
  slat = sin(latitude);
  om = A + B * pow(slat, 2.0) + C * pow(slat, 4.0);
  om = om * pow(10.0, -6.0);
  return om;
}


x86 assembly (clang, -O0):
<omega>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xeac(%rip),%xmm1
call   1040 <pow@plt>
movsd  -0x58(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe6e(%rip),%xmm1
call   1040 <pow@plt>
movsd  -0x48(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe2d(%rip),%xmm0
movsd  0xe2d(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<omega>:
sub    $0x18,%rsp
movsd  %xmm3,0x10(%rsp)
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,(%rsp)
call   1030 <sin@plt>
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  0x8(%rsp),%xmm1
addsd  (%rsp),%xmm1
movsd  %xmm1,(%rsp)
movsd  0xea6(%rip),%xmm1
call   1040 <pow@plt>
mulsd  0x10(%rsp),%xmm0
addsd  (%rsp),%xmm0
mulsd  0xe96(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @omega(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%11 = load double, double* %5
%12 = call double @sin(double %11)
store double %12, double* %9
%13 = load double, double* %6
%14 = load double, double* %7
%15 = load double, double* %9
%16 = call double @pow(double %15, double 2.000000e+00)
%17 = call double @llvm.fmuladd.f64(double %14, double %16, double %13)
%18 = load double, double* %8
%19 = load double, double* %9
%20 = call double @pow(double %19, double 4.000000e+00)
%21 = call double @llvm.fmuladd.f64(double %18, double %20, double %17)
store double %21, double* %10
%22 = load double, double* %10
%23 = call double @pow(double 1.000000e+01, double -6.000000e+00)
%24 = fmul double %22, %23
store double %24, double* %10
%25 = load double, double* %10
ret double %25
}

LLVM IR (-O2):
define double @omega(double %0, double %1, double %2, double %3) {
%5 = tail call double @sin(double %0)
%6 = fmul double %5, %5
%7 = tail call double @llvm.fmuladd.f64(double %2, double %6, double %1)
%8 = tail call double @pow(double %5, double 4.000000e+00)
%9 = tail call double @llvm.fmuladd.f64(double %3, double %8, double %7)
%10 = fmul double %9, 0x3EB0C6F7A0B5ED8D
ret double %10
}