#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_ct_from_pt(double sa, double pt) {
  double sfac, x2, x, y, cp0, pot_enthalpy;
  sfac = 0.0248826675584615e0;
  x2 = sfac * sa;
  x = sqrt(x2);
  y = pt * 0.025e0;
  pot_enthalpy =
      61.01362420681071e0 +
      y * (168776.46138048015e0 +
           y * (-2735.2785605119625e0 +
                y * (2574.2164453821433e0 +
                     y * (-1536.6644434977543e0 +
                          y * (545.7340497931629e0 + (-50.91091728474331e0 -
                                                      18.30489878927802e0 * y) *
                                                         y))))) +
      x2 * (268.5520265845071e0 +
            y * (-12019.028203559312e0 +
                 y * (3734.858026725145e0 +
                      y * (-2046.7671145057618e0 +
                           y * (465.28655623826234e0 +
                                (-0.6370820302376359e0 -
                                 10.650848542359153e0 * y) *
                                    y)))) +
            x * (937.2099110620707e0 +
                 y * (588.1802812170108e0 +
                      y * (248.39476522971285e0 +
                           (-3.871557904936333e0 - 2.6268019854268356e0 * y) *
                               y)) +
                 x * (-1687.914374187449e0 +
                      x * (246.9598888781377e0 + x * (123.59576582457964e0 -
                                                      48.5891069025409e0 * x)) +
                      y * (936.3206544460336e0 +
                           y * (-942.7827304544439e0 +
                                y * (369.4389437509002e0 +
                                     (-33.83664947895248e0 -
                                      9.987880382780322e0 * y) *
                                         y))))));
  cp0 = 3991.86795711963e0;
  return (pot_enthalpy / cp0);
}


x86 assembly (clang, -O0):
<gsw_ct_from_pt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xfce(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  0xf9b(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm5
movsd  0xf5b(%rip),%xmm6
mulsd  %xmm6,%xmm5
movsd  0xf57(%rip),%xmm6
addsd  %xmm6,%xmm5
movsd  -0x30(%rbp),%xmm6
mulsd  %xmm6,%xmm5
movsd  0xf32(%rip),%xmm6
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
movsd  0xf1a(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xf02(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xeea(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
movsd  0xed2(%rip),%xmm2
addsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm1
movsd  0xeba(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm5
movsd  -0x30(%rbp),%xmm6
movsd  0xe80(%rip),%xmm7
mulsd  %xmm7,%xmm6
movsd  0xe7c(%rip),%xmm7
addsd  %xmm7,%xmm6
movsd  -0x30(%rbp),%xmm7
mulsd  %xmm7,%xmm6
movsd  0xe57(%rip),%xmm7
addsd  %xmm7,%xmm6
mulsd  %xmm6,%xmm5
movsd  0xe3f(%rip),%xmm6
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
movsd  0xe27(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm2
movsd  0xe0f(%rip),%xmm4
addsd  %xmm4,%xmm2
mulsd  %xmm2,%xmm3
movsd  0xdf7(%rip),%xmm2
addsd  %xmm2,%xmm3
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm5
movsd  -0x30(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm6
movsd  0xdc7(%rip),%xmm7
mulsd  %xmm7,%xmm6
movsd  0xdc3(%rip),%xmm7
addsd  %xmm7,%xmm6
movsd  -0x30(%rbp),%xmm7
mulsd  %xmm7,%xmm6
movsd  0xd9e(%rip),%xmm7
addsd  %xmm7,%xmm6
mulsd  %xmm6,%xmm4
movsd  0xd86(%rip),%xmm6
addsd  %xmm6,%xmm4
mulsd  %xmm4,%xmm5
movsd  0xd6e(%rip),%xmm4
addsd  %xmm4,%xmm5
movsd  -0x28(%rbp),%xmm4
movsd  -0x28(%rbp),%xmm7
movsd  -0x28(%rbp),%xmm6
movsd  -0x28(%rbp),%xmm8
movsd  0xd3c(%rip),%xmm9
mulsd  %xmm9,%xmm8
movsd  0xd36(%rip),%xmm9
addsd  %xmm9,%xmm8
mulsd  %xmm8,%xmm6
movsd  0xd13(%rip),%xmm8
addsd  %xmm8,%xmm6
mulsd  %xmm6,%xmm7
movsd  0xcfa(%rip),%xmm6
addsd  %xmm6,%xmm7
movsd  -0x30(%rbp),%xmm6
movsd  -0x30(%rbp),%xmm8
movsd  -0x30(%rbp),%xmm9
movsd  -0x30(%rbp),%xmm10
movsd  0xcc6(%rip),%xmm11
mulsd  %xmm11,%xmm10
movsd  0xcc0(%rip),%xmm11
addsd  %xmm11,%xmm10
movsd  -0x30(%rbp),%xmm11
mulsd  %xmm11,%xmm10
movsd  0xc97(%rip),%xmm11
addsd  %xmm11,%xmm10
mulsd  %xmm10,%xmm9
movsd  0xc7c(%rip),%xmm10
addsd  %xmm10,%xmm9
mulsd  %xmm9,%xmm8
movsd  0xc61(%rip),%xmm9
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,-0x40(%rbp)
movsd  0xc26(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsw_ct_from_pt>:
sub    $0x18,%rsp
movapd %xmm0,%xmm6
mulsd  0xee0(%rip),%xmm6
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm6
jb     1133 <gsw_ct_from_pt+0x23>
xorps  %xmm0,%xmm0
sqrtsd %xmm6,%xmm0
jmp    1154 <gsw_ct_from_pt+0x44>
movapd %xmm6,%xmm0
movsd  %xmm6,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
call   1030 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm6
mulsd  0xeac(%rip),%xmm1
movsd  0xeac(%rip),%xmm7
mulsd  %xmm1,%xmm7
addsd  0xea8(%rip),%xmm7
mulsd  %xmm1,%xmm7
addsd  0xea4(%rip),%xmm7
mulsd  %xmm1,%xmm7
addsd  0xea0(%rip),%xmm7
mulsd  %xmm1,%xmm7
addsd  0xe9c(%rip),%xmm7
mulsd  %xmm1,%xmm7
addsd  0xe98(%rip),%xmm7
mulsd  %xmm1,%xmm7
addsd  0xe94(%rip),%xmm7
mulsd  %xmm1,%xmm7
addsd  0xe90(%rip),%xmm7
movsd  0xe90(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xe8c(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xe88(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xe84(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xe80(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xe7c(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xe78(%rip),%xmm2
movsd  0xe78(%rip),%xmm3
mulsd  %xmm1,%xmm3
addsd  0xe74(%rip),%xmm3
mulsd  %xmm1,%xmm3
addsd  0xe70(%rip),%xmm3
mulsd  %xmm1,%xmm3
addsd  0xe6c(%rip),%xmm3
mulsd  %xmm1,%xmm3
addsd  0xe68(%rip),%xmm3
movsd  0xe68(%rip),%xmm4
mulsd  %xmm0,%xmm4
addsd  0xe64(%rip),%xmm4
mulsd  %xmm0,%xmm4
addsd  0xe60(%rip),%xmm4
mulsd  %xmm0,%xmm4
addsd  0xe5c(%rip),%xmm4
movsd  0xe5c(%rip),%xmm5
mulsd  %xmm1,%xmm5
addsd  0xe58(%rip),%xmm5
mulsd  %xmm1,%xmm5
addsd  0xe54(%rip),%xmm5
mulsd  %xmm1,%xmm5
addsd  0xe50(%rip),%xmm5
mulsd  %xmm1,%xmm5
addsd  0xe4c(%rip),%xmm5
mulsd  %xmm1,%xmm5
addsd  %xmm4,%xmm5
mulsd  %xmm0,%xmm5
addsd  %xmm3,%xmm5
mulsd  %xmm0,%xmm5
addsd  %xmm2,%xmm5
mulsd  %xmm5,%xmm6
addsd  %xmm7,%xmm6
divsd  0xe2c(%rip),%xmm6
movapd %xmm6,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @gsw_ct_from_pt(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
store double %0, double* %3
store double %1, double* %4
store double 0x3F997AD78D9A73C9, double* %5
%11 = load double, double* %5
%12 = load double, double* %3
%13 = fmul double %11, %12
store double %13, double* %6
%14 = load double, double* %6
%15 = call double @sqrt(double %14)
store double %15, double* %7
%16 = load double, double* %4
%17 = fmul double %16, 2.500000e-02
store double %17, double* %8
%18 = load double, double* %8
%19 = load double, double* %8
%20 = load double, double* %8
%21 = load double, double* %8
%22 = load double, double* %8
%23 = load double, double* %8
%24 = call double @llvm.fmuladd.f64(double 0xC0324E0DD8D88A02, double %23, double 0xC0497498F005AAB5)
%25 = load double, double* %8
%26 = call double @llvm.fmuladd.f64(double %24, double %25, double 0x40810DDF557F7A29)
%27 = call double @llvm.fmuladd.f64(double %22, double %26, double 0xC09802A863E05394)
%28 = call double @llvm.fmuladd.f64(double %21, double %27, double 0x40A41C6ED1EDDB5A)
%29 = call double @llvm.fmuladd.f64(double %20, double %28, double 0xC0A55E8E9F7BC1AC)
%30 = call double @llvm.fmuladd.f64(double %19, double %29, double 0x41049A43B0E83FCA)
%31 = call double @llvm.fmuladd.f64(double %18, double %30, double 0x404E81BE702157CD)
%32 = load double, double* %6
%33 = load double, double* %8
%34 = load double, double* %8
%35 = load double, double* %8
%36 = load double, double* %8
%37 = load double, double* %8
%38 = call double @llvm.fmuladd.f64(double 0xC0254D3C052829E6, double %37, double 0xBFE462F9DA97AD80)
%39 = load double, double* %8
%40 = call double @llvm.fmuladd.f64(double %38, double %39, double 0x407D1495BBFE7CD3)
%41 = call double @llvm.fmuladd.f64(double %36, double %40, double 0xC09FFB1186770A23)
%42 = call double @llvm.fmuladd.f64(double %35, double %41, double 0x40AD2DB74F47672F)
%43 = call double @llvm.fmuladd.f64(double %34, double %42, double 0xC0C779839C2C9A70)
%44 = call double @llvm.fmuladd.f64(double %33, double %43, double 0x4070C8D519D3EFB0)
%45 = load double, double* %7
%46 = load double, double* %8
%47 = load double, double* %8
%48 = load double, double* %8
%49 = call double @llvm.fmuladd.f64(double 0xC00503B0C263CF1C, double %48, double 0xC00EF8F359D22CB4)
%50 = load double, double* %8
%51 = call double @llvm.fmuladd.f64(double %49, double %50, double 0x406F0CA1EAB0E6DE)
%52 = call double @llvm.fmuladd.f64(double %47, double %51, double 0x4082617137475928)
%53 = call double @llvm.fmuladd.f64(double %46, double %52, double 0x408D49ADE5D9D54C)
%54 = load double, double* %7
%55 = load double, double* %7
%56 = load double, double* %7
%57 = load double, double* %7
%58 = call double @llvm.fmuladd.f64(double 0xC0484B67DAE02169, double %57, double 0x405EE62106FB2938)
%59 = call double @llvm.fmuladd.f64(double %56, double %58, double 0x406EDEB768E16CA8)
%60 = call double @llvm.fmuladd.f64(double %55, double %59, double 0xC09A5FA851B4FD9A)
%61 = load double, double* %8
%62 = load double, double* %8
%63 = load double, double* %8
%64 = load double, double* %8
%65 = call double @llvm.fmuladd.f64(double 0xC023F9CB7520CD8A, double %64, double 0xC040EB175483287E)
%66 = load double, double* %8
%67 = call double @llvm.fmuladd.f64(double %65, double %66, double 0x40771705E9E1EE66)
%68 = call double @llvm.fmuladd.f64(double %63, double %67, double 0xC08D7643082F3B5C)
%69 = call double @llvm.fmuladd.f64(double %62, double %68, double 0x408D4290B3473840)
%70 = call double @llvm.fmuladd.f64(double %61, double %69, double %60)
%71 = call double @llvm.fmuladd.f64(double %54, double %70, double %53)
%72 = call double @llvm.fmuladd.f64(double %45, double %71, double %44)
%73 = call double @llvm.fmuladd.f64(double %32, double %72, double %31)
store double %73, double* %10
store double 0x40AF2FBC64E02648, double* %9
%74 = load double, double* %10
%75 = load double, double* %9
%76 = fdiv double %74, %75
ret double %76
}

LLVM IR (-O2):
define double @gsw_ct_from_pt(double %0, double %1) {
%3 = fmul double %0, 0x3F997AD78D9A73C9
%4 = tail call double @sqrt(double %3)
%5 = fmul double %1, 2.500000e-02
%6 = tail call double @llvm.fmuladd.f64(double %5, double 0xC0324E0DD8D88A02, double 0xC0497498F005AAB5)
%7 = tail call double @llvm.fmuladd.f64(double %6, double %5, double 0x40810DDF557F7A29)
%8 = tail call double @llvm.fmuladd.f64(double %5, double %7, double 0xC09802A863E05394)
%9 = tail call double @llvm.fmuladd.f64(double %5, double %8, double 0x40A41C6ED1EDDB5A)
%10 = tail call double @llvm.fmuladd.f64(double %5, double %9, double 0xC0A55E8E9F7BC1AC)
%11 = tail call double @llvm.fmuladd.f64(double %5, double %10, double 0x41049A43B0E83FCA)
%12 = tail call double @llvm.fmuladd.f64(double %5, double %11, double 0x404E81BE702157CD)
%13 = tail call double @llvm.fmuladd.f64(double %5, double 0xC0254D3C052829E6, double 0xBFE462F9DA97AD80)
%14 = tail call double @llvm.fmuladd.f64(double %13, double %5, double 0x407D1495BBFE7CD3)
%15 = tail call double @llvm.fmuladd.f64(double %5, double %14, double 0xC09FFB1186770A23)
%16 = tail call double @llvm.fmuladd.f64(double %5, double %15, double 0x40AD2DB74F47672F)
%17 = tail call double @llvm.fmuladd.f64(double %5, double %16, double 0xC0C779839C2C9A70)
%18 = tail call double @llvm.fmuladd.f64(double %5, double %17, double 0x4070C8D519D3EFB0)
%19 = tail call double @llvm.fmuladd.f64(double %5, double 0xC00503B0C263CF1C, double 0xC00EF8F359D22CB4)
%20 = tail call double @llvm.fmuladd.f64(double %19, double %5, double 0x406F0CA1EAB0E6DE)
%21 = tail call double @llvm.fmuladd.f64(double %5, double %20, double 0x4082617137475928)
%22 = tail call double @llvm.fmuladd.f64(double %5, double %21, double 0x408D49ADE5D9D54C)
%23 = tail call double @llvm.fmuladd.f64(double %4, double 0xC0484B67DAE02169, double 0x405EE62106FB2938)
%24 = tail call double @llvm.fmuladd.f64(double %4, double %23, double 0x406EDEB768E16CA8)
%25 = tail call double @llvm.fmuladd.f64(double %4, double %24, double 0xC09A5FA851B4FD9A)
%26 = tail call double @llvm.fmuladd.f64(double %5, double 0xC023F9CB7520CD8A, double 0xC040EB175483287E)
%27 = tail call double @llvm.fmuladd.f64(double %26, double %5, double 0x40771705E9E1EE66)
%28 = tail call double @llvm.fmuladd.f64(double %5, double %27, double 0xC08D7643082F3B5C)
%29 = tail call double @llvm.fmuladd.f64(double %5, double %28, double 0x408D4290B3473840)
%30 = tail call double @llvm.fmuladd.f64(double %5, double %29, double %25)
%31 = tail call double @llvm.fmuladd.f64(double %4, double %30, double %22)
%32 = tail call double @llvm.fmuladd.f64(double %4, double %31, double %18)
%33 = tail call double @llvm.fmuladd.f64(double %3, double %32, double %12)
%34 = fdiv double %33, 0x40AF2FBC64E02648
ret double %34
}