#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 sqrt(double);
double gsw_sigma0(double sa, double ct) {
  double v01 = 9.998420897506056e2, v02 = 2.839940833161907e0,
         v03 = -3.147759265588511e-2, v04 = 1.181805545074306e-3,
         v05 = -6.698001071123802e0, v06 = -2.986498947203215e-2,
         v07 = 2.327859407479162e-4, v08 = -3.988822378968490e-2,
         v09 = 5.095422573880500e-4, v10 = -1.426984671633621e-5,
         v11 = 1.645039373682922e-7, v21 = 1.0e0, v22 = 2.775927747785646e-3,
         v23 = -2.349607444135925e-5, v24 = 1.119513357486743e-6,
         v25 = 6.743689325042773e-10, v26 = -7.521448093615448e-3,
         v27 = -2.764306979894411e-5, v28 = 1.262937315098546e-7,
         v29 = 9.527875081696435e-10, v30 = -1.811147201949891e-11,
         v31 = -3.303308871386421e-5, v32 = 3.801564588876298e-7,
         v33 = -7.672876869259043e-9, v34 = -4.634182341116144e-11,
         v35 = 2.681097235569143e-12, v36 = 5.419326551148740e-6;
  double v_hat_denominator, v_hat_numerator, sqrtsa;
  sqrtsa = sqrt(sa);
  v_hat_denominator =
      v01 + ct * (v02 + ct * (v03 + v04 * ct)) +
      sa * (v05 + ct * (v06 + v07 * ct) +
            sqrtsa * (v08 + ct * (v09 + ct * (v10 + v11 * ct))));
  v_hat_numerator =
      v21 + ct * (v22 + ct * (v23 + ct * (v24 + v25 * ct))) +
      sa * (v26 + ct * (v27 + ct * (v28 + ct * (v29 + v30 * ct))) + v36 * sa +
            sqrtsa * (v31 + ct * (v32 + ct * (v33 + ct * (v34 + v35 * ct)))));
  return (v_hat_denominator / v_hat_numerator - 1000e0);
}


x86 assembly (clang, -O0):
<gsw_sigma0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xfab(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xf96(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xf81(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xf6c(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xf57(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xf42(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xf2d(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xf18(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xf03(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xeee(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xec4(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xeaf(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xe9a(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xe85(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xe6d(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xe55(%rip),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xe3d(%rip),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xe25(%rip),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xe0d(%rip),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xdf5(%rip),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0xddd(%rip),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0xdc5(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0xdad(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0xd95(%rip),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  0xd7d(%rip),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  0xd65(%rip),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm5
movsd  -0x30(%rbp),%xmm4
movsd  -0x10(%rbp),%xmm6
mulsd  %xmm6,%xmm4
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm5
movsd  -0x48(%rbp),%xmm4
movsd  -0x10(%rbp),%xmm6
mulsd  %xmm6,%xmm4
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
addsd  %xmm2,%xmm3
movsd  -0x100(%rbp),%xmm2
ff
movsd  -0x50(%rbp),%xmm5
movsd  -0x10(%rbp),%xmm4
movsd  -0x58(%rbp),%xmm7
movsd  -0x10(%rbp),%xmm6
movsd  -0x60(%rbp),%xmm9
movsd  -0x68(%rbp),%xmm8
movsd  -0x10(%rbp),%xmm10
mulsd  %xmm10,%xmm8
addsd  %xmm9,%xmm8
mulsd  %xmm8,%xmm6
addsd  %xmm7,%xmm6
mulsd  %xmm6,%xmm4
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm5
movsd  -0x10(%rbp),%xmm4
movsd  -0x88(%rbp),%xmm7
ff
movsd  -0x90(%rbp),%xmm6
ff
movsd  -0x10(%rbp),%xmm8
mulsd  %xmm8,%xmm6
addsd  %xmm7,%xmm6
mulsd  %xmm6,%xmm4
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm3
ff
movsd  -0x10(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm5
ff
movsd  -0x10(%rbp),%xmm4
movsd  -0xa8(%rbp),%xmm7
ff
movsd  -0x10(%rbp),%xmm6
movsd  -0xb0(%rbp),%xmm9
ff ff
movsd  -0xb8(%rbp),%xmm8
ff ff
movsd  -0x10(%rbp),%xmm10
mulsd  %xmm10,%xmm8
addsd  %xmm9,%xmm8
mulsd  %xmm8,%xmm6
addsd  %xmm7,%xmm6
mulsd  %xmm6,%xmm4
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
movsd  -0xe8(%rbp),%xmm3
ff
movsd  -0x8(%rbp),%xmm4
mulsd  %xmm4,%xmm3
addsd  %xmm2,%xmm3
movsd  -0x100(%rbp),%xmm2
ff
movsd  -0xc0(%rbp),%xmm5
ff
movsd  -0x10(%rbp),%xmm4
movsd  -0xc8(%rbp),%xmm7
ff
movsd  -0x10(%rbp),%xmm6
movsd  -0xd0(%rbp),%xmm9
ff ff
movsd  -0x10(%rbp),%xmm8
movsd  -0xd8(%rbp),%xmm11
ff ff
movsd  -0xe0(%rbp),%xmm10
ff ff
movsd  -0x10(%rbp),%xmm12
mulsd  %xmm12,%xmm10
addsd  %xmm11,%xmm10
mulsd  %xmm10,%xmm8
addsd  %xmm9,%xmm8
mulsd  %xmm8,%xmm6
addsd  %xmm7,%xmm6
mulsd  %xmm6,%xmm4
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
divsd  -0xf8(%rbp),%xmm0
ff
movsd  0xb0a(%rip),%xmm1
subsd  %xmm1,%xmm0
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsw_sigma0>:
sub    $0x28,%rsp
movapd %xmm0,%xmm6
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm6
jb     112b <gsw_sigma0+0x1b>
xorps  %xmm0,%xmm0
sqrtsd %xmm6,%xmm0
jmp    1149 <gsw_sigma0+0x39>
movapd %xmm6,%xmm0
movapd %xmm6,0x10(%rsp)
movaps %xmm1,(%rsp)
call   1030 <sqrt@plt>
movapd (%rsp),%xmm1
movapd 0x10(%rsp),%xmm6
movsd  0xeaf(%rip),%xmm3
mulsd  %xmm1,%xmm3
addsd  0xeab(%rip),%xmm3
movsd  0xeab(%rip),%xmm4
mulsd  %xmm1,%xmm4
addsd  0xea7(%rip),%xmm4
movapd %xmm1,%xmm2
unpcklpd %xmm1,%xmm2
movapd 0xedf(%rip),%xmm7
unpcklpd %xmm4,%xmm7
mulpd  %xmm2,%xmm7
addpd  0xedf(%rip),%xmm7
mulpd  %xmm2,%xmm7
addpd  0xee3(%rip),%xmm7
mulpd  %xmm2,%xmm7
addpd  0xee7(%rip),%xmm7
movsd  0xe6f(%rip),%xmm4
mulsd  %xmm1,%xmm4
addsd  0xe6b(%rip),%xmm4
mulsd  %xmm1,%xmm4
addsd  0xe67(%rip),%xmm4
mulsd  %xmm1,%xmm4
addsd  0xe63(%rip),%xmm4
mulsd  %xmm1,%xmm4
addsd  0xe5f(%rip),%xmm4
movapd %xmm1,%xmm5
unpcklpd %xmm6,%xmm5
shufpd $0x2,0xeae(%rip),%xmm3
mulpd  %xmm5,%xmm3
movapd 0xeb2(%rip),%xmm5
unpcklpd %xmm4,%xmm5
mulsd  0xe3e(%rip),%xmm1
addpd  %xmm3,%xmm5
addsd  0xe3a(%rip),%xmm1
movapd 0xea2(%rip),%xmm3
unpcklpd %xmm1,%xmm3
mulpd  %xmm2,%xmm3
addpd  0xea2(%rip),%xmm3
mulpd  %xmm2,%xmm3
addpd  0xea6(%rip),%xmm3
mulpd  %xmm2,%xmm3
addpd  0xeaa(%rip),%xmm3
unpcklpd %xmm0,%xmm0
mulpd  %xmm3,%xmm0
addpd  %xmm5,%xmm0
unpcklpd %xmm6,%xmm6
mulpd  %xmm0,%xmm6
addpd  %xmm7,%xmm6
movapd %xmm6,%xmm0
unpckhpd %xmm6,%xmm0
divsd  %xmm0,%xmm6
addsd  0xde6(%rip),%xmm6
movapd %xmm6,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @gsw_sigma0(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0x408F3EBC998D192F, double* %5
store double 0x4006B832E6480B06, double* %6
store double 0xBFA01DD4BE07158E, double* %7
store double 0x3F535CDA0AA5141F, double* %8
store double 0xC01ACAC0CAF432E4, double* %9
store double 0xBF9E94ED844FA0F2, double* %10
store double 0x3F2E830001452CFC, double* %11
store double 0xBFA46C3AB1582DFC, double* %12
store double 0x3F40B259AA6BB2BF, double* %13
store double 0xBEEDED10CC84A6D6, double* %14
store double 0x3E86144FEF843373, double* %15
store double 1.000000e+00, double* %16
store double 0x3F66BD8ADC91CDB6, double* %17
store double 0xBEF8A32DF0E2C663, double* %18
store double 0x3EB2C845F439D142, double* %19
store double 0x3E072BCFD6295640, double* %20
store double 0xBF7ECECF594A4D0F, double* %21
store double 0xBEFCFC614ABDE6BC, double* %22
store double 0x3E80F36B6915609B, double* %23
store double 0x3E105E675DDF54DA, double* %24
store double 0xBDB3E9ED19245025, double* %25
store double 0xBF0151A0492353E4, double* %26
store double 0x3E998309C9A5AF2D, double* %27
store double 0xBE407A356B462757, double* %28
store double 0xBDC97A08262FF761, double* %29
store double 0x3D87954B5454878B, double* %30
store double 0x3ED6BAF523B168F6, double* %31
%35 = load double, double* %3
%36 = call double @sqrt(double %35)
store double %36, double* %34
%37 = load double, double* %5
%38 = load double, double* %4
%39 = load double, double* %6
%40 = load double, double* %4
%41 = load double, double* %7
%42 = load double, double* %8
%43 = load double, double* %4
%44 = call double @llvm.fmuladd.f64(double %42, double %43, double %41)
%45 = call double @llvm.fmuladd.f64(double %40, double %44, double %39)
%46 = call double @llvm.fmuladd.f64(double %38, double %45, double %37)
%47 = load double, double* %3
%48 = load double, double* %9
%49 = load double, double* %4
%50 = load double, double* %10
%51 = load double, double* %11
%52 = load double, double* %4
%53 = call double @llvm.fmuladd.f64(double %51, double %52, double %50)
%54 = call double @llvm.fmuladd.f64(double %49, double %53, double %48)
%55 = load double, double* %34
%56 = load double, double* %12
%57 = load double, double* %4
%58 = load double, double* %13
%59 = load double, double* %4
%60 = load double, double* %14
%61 = load double, double* %15
%62 = load double, double* %4
%63 = call double @llvm.fmuladd.f64(double %61, double %62, double %60)
%64 = call double @llvm.fmuladd.f64(double %59, double %63, double %58)
%65 = call double @llvm.fmuladd.f64(double %57, double %64, double %56)
%66 = call double @llvm.fmuladd.f64(double %55, double %65, double %54)
%67 = call double @llvm.fmuladd.f64(double %47, double %66, double %46)
store double %67, double* %32
%68 = load double, double* %16
%69 = load double, double* %4
%70 = load double, double* %17
%71 = load double, double* %4
%72 = load double, double* %18
%73 = load double, double* %4
%74 = load double, double* %19
%75 = load double, double* %20
%76 = load double, double* %4
%77 = call double @llvm.fmuladd.f64(double %75, double %76, double %74)
%78 = call double @llvm.fmuladd.f64(double %73, double %77, double %72)
%79 = call double @llvm.fmuladd.f64(double %71, double %78, double %70)
%80 = call double @llvm.fmuladd.f64(double %69, double %79, double %68)
%81 = load double, double* %3
%82 = load double, double* %21
%83 = load double, double* %4
%84 = load double, double* %22
%85 = load double, double* %4
%86 = load double, double* %23
%87 = load double, double* %4
%88 = load double, double* %24
%89 = load double, double* %25
%90 = load double, double* %4
%91 = call double @llvm.fmuladd.f64(double %89, double %90, double %88)
%92 = call double @llvm.fmuladd.f64(double %87, double %91, double %86)
%93 = call double @llvm.fmuladd.f64(double %85, double %92, double %84)
%94 = call double @llvm.fmuladd.f64(double %83, double %93, double %82)
%95 = load double, double* %31
%96 = load double, double* %3
%97 = call double @llvm.fmuladd.f64(double %95, double %96, double %94)
%98 = load double, double* %34
%99 = load double, double* %26
%100 = load double, double* %4
%101 = load double, double* %27
%102 = load double, double* %4
%103 = load double, double* %28
%104 = load double, double* %4
%105 = load double, double* %29
%106 = load double, double* %30
%107 = load double, double* %4
%108 = call double @llvm.fmuladd.f64(double %106, double %107, double %105)
%109 = call double @llvm.fmuladd.f64(double %104, double %108, double %103)
%110 = call double @llvm.fmuladd.f64(double %102, double %109, double %101)
%111 = call double @llvm.fmuladd.f64(double %100, double %110, double %99)
%112 = call double @llvm.fmuladd.f64(double %98, double %111, double %97)
%113 = call double @llvm.fmuladd.f64(double %81, double %112, double %80)
store double %113, double* %33
%114 = load double, double* %32
%115 = load double, double* %33
%116 = fdiv double %114, %115
%117 = fsub double %116, 1.000000e+03
ret double %117
}

LLVM IR (-O2):
define double @gsw_sigma0(double %0, double %1) {
%3 = tail call double @sqrt(double %0)
%4 = tail call double @llvm.fmuladd.f64(double %1, double 0x3F2E830001452CFC, double 0xBF9E94ED844FA0F2)
%5 = tail call double @llvm.fmuladd.f64(double %1, double 0x3E072BCFD6295640, double 0x3EB2C845F439D142)
%6 = insertelement <2 x double> poison, double %1, i64 0
%7 = shufflevector <2 x double> %6, <2 x double> poison, <2 x i32> zeroinitializer
%8 = insertelement <2 x double> <double 0x3F535CDA0AA5141F, double poison>, double %5, i64 1
%9 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %7, <2 x double> %8, <2 x double> <double 0xBFA01DD4BE07158E, double 0xBEF8A32DF0E2C663>)
%10 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %7, <2 x double> %9, <2 x double> <double 0x4006B832E6480B06, double 0x3F66BD8ADC91CDB6>)
%11 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %7, <2 x double> %10, <2 x double> <double 0x408F3EBC998D192F, double 1.000000e+00>)
%12 = tail call double @llvm.fmuladd.f64(double %1, double 0xBDB3E9ED19245025, double 0x3E105E675DDF54DA)
%13 = tail call double @llvm.fmuladd.f64(double %1, double %12, double 0x3E80F36B6915609B)
%14 = tail call double @llvm.fmuladd.f64(double %1, double %13, double 0xBEFCFC614ABDE6BC)
%15 = tail call double @llvm.fmuladd.f64(double %1, double %14, double 0xBF7ECECF594A4D0F)
%16 = insertelement <2 x double> %6, double %0, i64 1
%17 = insertelement <2 x double> <double poison, double 0x3ED6BAF523B168F6>, double %4, i64 0
%18 = insertelement <2 x double> <double 0xC01ACAC0CAF432E4, double poison>, double %15, i64 1
%19 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %16, <2 x double> %17, <2 x double> %18)
%20 = tail call double @llvm.fmuladd.f64(double %1, double 0x3D87954B5454878B, double 0xBDC97A08262FF761)
%21 = insertelement <2 x double> <double 0x3E86144FEF843373, double poison>, double %20, i64 1
%22 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %7, <2 x double> %21, <2 x double> <double 0xBEEDED10CC84A6D6, double 0xBE407A356B462757>)
%23 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %7, <2 x double> %22, <2 x double> <double 0x3F40B259AA6BB2BF, double 0x3E998309C9A5AF2D>)
%24 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %7, <2 x double> %23, <2 x double> <double 0xBFA46C3AB1582DFC, double 0xBF0151A0492353E4>)
%25 = insertelement <2 x double> poison, double %3, i64 0
%26 = shufflevector <2 x double> %25, <2 x double> poison, <2 x i32> zeroinitializer
%27 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %26, <2 x double> %24, <2 x double> %19)
%28 = insertelement <2 x double> poison, double %0, i64 0
%29 = shufflevector <2 x double> %28, <2 x double> poison, <2 x i32> zeroinitializer
%30 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %29, <2 x double> %27, <2 x double> %11)
%31 = extractelement <2 x double> %30, i64 0
%32 = extractelement <2 x double> %30, i64 1
%33 = fdiv double %31, %32
%34 = fadd double %33, -1.000000e+03
ret double %34
}