#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_gibbs_pt0_pt0(double sa, double pt0) {
  double sfac, x2, x, y, g03, g08, return_value;
  sfac = 0.0248826675584615;
  x2 = sfac * sa;
  x = sqrt(x2);
  y = pt0 * 0.025;
  g03 = -24715.571866078e0 +
        y * (4420.4472249096725e0 +
             y * (-1778.231237203896e0 +
                  y * (1160.5182516851419e0 +
                       y * (-569.531539542516e0 + y * 128.13429152494615e0))));
  g08 = x2 *
        (1760.062705994408e0 +
         x * (-86.1329351956084e0 +
              x * (-137.1145018408982e0 +
                   y * (296.20061691375236e0 +
                        y * (-205.67709290374563e0 + 49.9394019139016e0 * y))) +
              y * (-60.136422517125e0 + y * 10.50720794170734e0)) +
         y * (-1351.605895580406e0 +
              y * (1097.1125373015109e0 +
                   y * (-433.20648175062206e0 + 63.905091254154904e0 * y))));
  return_value = (g03 + g08) * 0.000625;
  return (return_value);
}


x86 assembly (clang, -O0):
<gsw_gibbs_pt0_pt0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xf76(%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  0xf43(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
movsd  0xf08(%rip),%xmm5
mulsd  %xmm5,%xmm4
movsd  0xf04(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xee4(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xecc(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xeb4(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm5
movsd  0xe5d(%rip),%xmm6
mulsd  %xmm6,%xmm5
movsd  0xe59(%rip),%xmm6
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
movsd  0xe39(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm1
movsd  0xe21(%rip),%xmm4
addsd  %xmm4,%xmm1
mulsd  %xmm1,%xmm3
movsd  0xe09(%rip),%xmm1
addsd  %xmm1,%xmm3
movsd  -0x30(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm4
movsd  0xde3(%rip),%xmm5
mulsd  %xmm5,%xmm4
movsd  0xddf(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm1
addsd  %xmm3,%xmm1
mulsd  %xmm1,%xmm2
movsd  0xdb7(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  -0x30(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm5
movsd  0xd87(%rip),%xmm6
mulsd  %xmm6,%xmm5
movsd  0xd83(%rip),%xmm6
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
movsd  0xd63(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xd4b(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  0xd1c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define double @gsw_gibbs_pt0_pt0(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
store double %0, double* %3
store double %1, double* %4
store double 0x3F997AD78D9A73C9, double* %5
%12 = load double, double* %5
%13 = load double, double* %3
%14 = fmul double %12, %13
store double %14, double* %6
%15 = load double, double* %6
%16 = call double @sqrt(double %15)
store double %16, double* %7
%17 = load double, double* %4
%18 = fmul double %17, 2.500000e-02
store double %18, 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 %23, double 0x4060044C1DBD78C2, double 0xC081CC4097CDBD19)
%25 = call double @llvm.fmuladd.f64(double %22, double %24, double 0x40922212B091DB20)
%26 = call double @llvm.fmuladd.f64(double %21, double %25, double 0xC09BC8ECC9721168)
%27 = call double @llvm.fmuladd.f64(double %20, double %26, double 0x40B144727D54E900)
%28 = call double @llvm.fmuladd.f64(double %19, double %27, double 0xC0D822E499742DAD)
store double %28, double* %9
%29 = load double, double* %6
%30 = load double, double* %7
%31 = load double, double* %7
%32 = load double, double* %8
%33 = load double, double* %8
%34 = load double, double* %8
%35 = call double @llvm.fmuladd.f64(double 0x4048F83E526900EB, double %34, double 0xC069B5AABEBCBE1E)
%36 = call double @llvm.fmuladd.f64(double %33, double %35, double 0x40728335BA14B974)
%37 = call double @llvm.fmuladd.f64(double %32, double %36, double 0xC06123A9FFC3BFAB)
%38 = call double @llvm.fmuladd.f64(double %31, double %37, double 0xC0558882029F6807)
%39 = load double, double* %8
%40 = load double, double* %8
%41 = call double @llvm.fmuladd.f64(double %40, double 0x402503B0C263CF1B, double 0xC04E11764B04BEB4)
%42 = call double @llvm.fmuladd.f64(double %39, double %41, double %38)
%43 = call double @llvm.fmuladd.f64(double %30, double %42, double 0x409B804036000CFB)
%44 = load double, double* %8
%45 = load double, double* %8
%46 = load double, double* %8
%47 = load double, double* %8
%48 = call double @llvm.fmuladd.f64(double 0x404FF3DA07BC3ED7, double %47, double 0xC07B134DBFCEE248)
%49 = call double @llvm.fmuladd.f64(double %46, double %48, double 0x409124733CFA7647)
%50 = call double @llvm.fmuladd.f64(double %45, double %49, double 0xC0951E6C6FE41A8A)
%51 = call double @llvm.fmuladd.f64(double %44, double %50, double %43)
%52 = fmul double %29, %51
store double %52, double* %10
%53 = load double, double* %9
%54 = load double, double* %10
%55 = fadd double %53, %54
%56 = fmul double %55, 6.250000e-04
store double %56, double* %11
%57 = load double, double* %11
ret double %57
}

LLVM IR (-O2):
define double @gsw_gibbs_pt0_pt0(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 0x4060044C1DBD78C2, double 0xC081CC4097CDBD19)
%7 = tail call double @llvm.fmuladd.f64(double %5, double %6, double 0x40922212B091DB20)
%8 = tail call double @llvm.fmuladd.f64(double %5, double %7, double 0xC09BC8ECC9721168)
%9 = tail call double @llvm.fmuladd.f64(double %5, double %8, double 0x40B144727D54E900)
%10 = tail call double @llvm.fmuladd.f64(double %5, double %9, double 0xC0D822E499742DAD)
%11 = tail call double @llvm.fmuladd.f64(double %5, double 0x4048F83E526900EB, double 0xC069B5AABEBCBE1E)
%12 = tail call double @llvm.fmuladd.f64(double %5, double %11, double 0x40728335BA14B974)
%13 = tail call double @llvm.fmuladd.f64(double %5, double %12, double 0xC06123A9FFC3BFAB)
%14 = tail call double @llvm.fmuladd.f64(double %4, double %13, double 0xC0558882029F6807)
%15 = tail call double @llvm.fmuladd.f64(double %5, double 0x402503B0C263CF1B, double 0xC04E11764B04BEB4)
%16 = tail call double @llvm.fmuladd.f64(double %5, double %15, double %14)
%17 = tail call double @llvm.fmuladd.f64(double %4, double %16, double 0x409B804036000CFB)
%18 = tail call double @llvm.fmuladd.f64(double %5, double 0x404FF3DA07BC3ED7, double 0xC07B134DBFCEE248)
%19 = tail call double @llvm.fmuladd.f64(double %5, double %18, double 0x409124733CFA7647)
%20 = tail call double @llvm.fmuladd.f64(double %5, double %19, double 0xC0951E6C6FE41A8A)
%21 = tail call double @llvm.fmuladd.f64(double %5, double %20, double %17)
%22 = fmul double %3, %21
%23 = fadd double %10, %22
%24 = fmul double %23, 6.250000e-04
ret double %24
}