#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 asin(double);
double atan2(double, double);
double cos(double const);
double dot(double *, double const *, int);
double norm(double const *, int);
double sin(double const);
int /*<<< orphan*/ trace(int, char *, double const, double const, ...);
void tide_pl(const double *eu, const double *rp, double GMp, const double *pos,
             double *dr) {
  const double H3 = 0.292, L3 = 0.015;
  double r, ep[3], latp, lonp, p, K2, K3, a, H2, L2, dp, du, cosp, sinl, cosl;
  int i;
  trace(4, "tide_pl : pos=%.3f %.3f\n", pos[0] * (180.0 / 3.1415926535897932),
        pos[1] * (180.0 / 3.1415926535897932));
  if ((r = norm(rp, 3)) <= 0.0)
    return;
  for (i = 0; i < 3; i++)
    ep[i] = rp[i] / r;
  K2 = GMp / 3.986004415E+14 * ((6378137.0) * (6378137.0)) *
       ((6378137.0) * (6378137.0)) / (r * r * r);
  K3 = K2 * 6378137.0 / r;
  latp = asin(ep[2]);
  lonp = atan2(ep[1], ep[0]);
  cosp = cos(latp);
  sinl = sin(pos[0]);
  cosl = cos(pos[0]);
  p = (3.0 * sinl * sinl - 1.0) / 2.0;
  H2 = 0.6078 - 0.0006 * p;
  L2 = 0.0847 + 0.0002 * p;
  a = dot(ep, eu, 3);
  dp = K2 * 3.0 * L2 * a;
  du = K2 * (H2 * (1.5 * a * a - 0.5) - 3.0 * L2 * a * a);
  dp += K3 * L3 * (7.5 * a * a - 1.5);
  du += K3 * (H3 * (2.5 * a * a * a - 1.5 * a) - L3 * (7.5 * a * a - 1.5) * a);
  du += 3.0 / 4.0 * 0.0025 * K2 * sin(2.0 * latp) * sin(2.0 * pos[0]) *
        sin(pos[1] - lonp);
  du += 3.0 / 4.0 * 0.0022 * K2 * cosp * cosp * cosl * cosl *
        sin(2.0 * (pos[1] - lonp));
  dr[0] = dp * ep[0] + du * eu[0];
  dr[1] = dp * ep[1] + du * eu[1];
  dr[2] = dp * ep[2] + du * eu[2];
  trace(5, "tide_pl : dr=%.3f %.3f %.3f\n", dr[0], dr[1], dr[2]);
}


x86 assembly (clang, -O0):
<tide_pl>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movsd  0xe78(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe63(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x20(%rbp),%rax
movsd  0xe4a(%rip),%xmm0
mulsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  0xe3a(%rip),%xmm1
mulsd  0x8(%rax),%xmm1
mov    $0x4,%edi
lea    0xec9(%rip),%rsi
mov    $0x2,%al
call   1090 <trace@plt>
mov    -0x10(%rbp),%rdi
mov    $0x3,%esi
call   1050 <norm@plt>
movaps %xmm0,%xmm1
movsd  %xmm1,-0x40(%rbp)
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jb     1206 <tide_pl+0x96>
jmp    1740 <tide_pl+0x5d0>
movl   $0x0,-0xcc(%rbp)
cmpl   $0x3,-0xcc(%rbp)
jge    1253 <tide_pl+0xe3>
mov    -0x10(%rbp),%rax
movslq -0xcc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x40(%rbp),%xmm0
movslq -0xcc(%rbp),%rax
movsd  %xmm0,-0x60(%rbp,%rax,8)
mov    -0xcc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xcc(%rbp)
jmp    1210 <tide_pl+0xa0>
movsd  -0x18(%rbp),%xmm0
movsd  0xe38(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe24(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe18(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xdec(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
call   1070 <asin@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
call   1040 <atan2@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <sin@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0xd3b(%rip),%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xc0(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  0xd4f(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xcdb(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  0xd1d(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd19(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movsd  0xce8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xce4(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x3,%edx
call   1030 <dot@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xc9e(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm1
ff
movsd  0xc5c(%rip),%xmm3
mulsd  -0x90(%rbp),%xmm3
ff
movsd  -0x90(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm3
movsd  0xc58(%rip),%xmm2
addsd  %xmm2,%xmm3
movsd  0xc44(%rip),%xmm2
mulsd  -0xa0(%rbp),%xmm2
ff
mulsd  -0x90(%rbp),%xmm2
ff
mulsd  -0x90(%rbp),%xmm2
ff
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xbb1(%rip),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
movsd  0xbd1(%rip),%xmm2
mulsd  -0x90(%rbp),%xmm2
ff
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm2
movsd  0xbad(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  0xb99(%rip),%xmm2
mulsd  -0x90(%rbp),%xmm2
ff
mulsd  -0x90(%rbp),%xmm2
ff
movsd  -0x90(%rbp),%xmm3
ff
movsd  0xb71(%rip),%xmm1
mulsd  -0x90(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  0xb3a(%rip),%xmm3
mulsd  -0x90(%rbp),%xmm3
ff
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm3
movsd  0xb16(%rip),%xmm1
addsd  %xmm1,%xmm3
movsd  0xae2(%rip),%xmm1
mulsd  %xmm3,%xmm1
mulsd  -0x90(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xabf(%rip),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0xb0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xaaf(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0xa8a(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
call   1060 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0xa5d(%rip),%xmm0
mulsd  (%rax),%xmm0
call   1060 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0x70(%rbp),%xmm0
call   1060 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0xe0(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xa07(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
mulsd  -0xb8(%rbp),%xmm0
ff
mulsd  -0xb8(%rbp),%xmm0
ff
mulsd  -0xc8(%rbp),%xmm0
ff
mulsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
subsd  -0x70(%rbp),%xmm1
movsd  0x9bc(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1060 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0xd8(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0x60(%rbp),%xmm2
movsd  -0xb0(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
mulsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0x58(%rbp),%xmm2
movsd  -0xb0(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0x50(%rbp),%xmm2
movsd  -0xb0(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
mulsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    $0x5,%edi
lea    0x980(%rip),%rsi
mov    $0x3,%al
call   1090 <trace@plt>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tide_pl>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rcx,%r14
mov    %rdx,%r12
movaps %xmm0,0x20(%rsp)
mov    %rsi,%rbx
mov    %rdi,%r15
movsd  0xe6c(%rip),%xmm1
movsd  (%rdx),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x8(%rdx),%xmm1
lea    0xf18(%rip),%rsi
mov    $0x4,%edi
mov    $0x2,%al
call   1090 <trace@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1050 <norm@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    1518 <tide_pl+0x3a8>
movupd (%rbx),%xmm2
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
divpd  %xmm1,%xmm2
movapd %xmm2,0x40(%rsp)
movapd %xmm2,0x50(%rsp)
movsd  0x10(%rbx),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x60(%rsp)
movapd 0x20(%rsp),%xmm3
divsd  0xe00(%rip),%xmm3
unpcklpd %xmm0,%xmm3
movapd 0xe9c(%rip),%xmm2
unpcklpd %xmm0,%xmm2
mulpd  %xmm2,%xmm3
mulpd  %xmm2,%xmm3
movapd %xmm3,%xmm2
unpckhpd %xmm3,%xmm2
divsd  %xmm2,%xmm3
movapd %xmm3,0x20(%rsp)
movsd  0xdd6(%rip),%xmm2
mulsd  %xmm3,%xmm2
divsd  %xmm0,%xmm2
movsd  %xmm2,0x8(%rsp)
movapd %xmm1,%xmm0
call   1070 <asin@plt>
movsd  %xmm0,0x38(%rsp)
movaps 0x40(%rsp),%xmm1
movaps %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
call   1040 <atan2@plt>
movsd  %xmm0,0x40(%rsp)
movsd  0x38(%rsp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x70(%rsp)
movsd  (%r12),%xmm0
call   1060 <sin@plt>
movsd  %xmm0,0x10(%rsp)
movsd  (%r12),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x68(%rsp)
movsd  0x10(%rsp),%xmm1
movapd %xmm1,%xmm0
mulsd  0xd65(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xd61(%rip),%xmm0
mulsd  0xd61(%rip),%xmm0
movsd  0xd61(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xd5d(%rip),%xmm1
movsd  %xmm1,0x10(%rsp)
mulsd  0xd57(%rip),%xmm0
addsd  0xd57(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
lea    0x50(%rsp),%rdi
mov    %r15,%rsi
mov    $0x3,%edx
call   1030 <dot@plt>
movapd 0x20(%rsp),%xmm2
movsd  0xd01(%rip),%xmm5
mulsd  %xmm2,%xmm5
movsd  0x18(%rsp),%xmm3
mulsd  %xmm3,%xmm5
movsd  0xd23(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xd47(%rip),%xmm7
mulsd  %xmm0,%xmm7
mulsd  %xmm0,%xmm7
mulsd  %xmm0,%xmm7
subsd  %xmm1,%xmm7
mulsd  %xmm0,%xmm1
addsd  0xd03(%rip),%xmm1
mulsd  %xmm0,%xmm5
mulsd  0x10(%rsp),%xmm1
mulsd  0xcf9(%rip),%xmm3
mulsd  %xmm0,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm1,%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm3,%xmm6
movsd  0xce5(%rip),%xmm4
movsd  0x8(%rsp),%xmm3
mulsd  %xmm3,%xmm4
movsd  0xcdb(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  0xcd3(%rip),%xmm1
mulsd  %xmm1,%xmm4
addsd  %xmm5,%xmm4
movsd  %xmm4,0x10(%rsp)
mulsd  0xccd(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0xcc9(%rip),%xmm7
addsd  %xmm1,%xmm7
mulsd  %xmm3,%xmm7
addsd  %xmm6,%xmm7
movsd  %xmm7,0x18(%rsp)
movsd  0xcb7(%rip),%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x38(%rsp),%xmm0
addsd  %xmm0,%xmm0
call   1060 <sin@plt>
movsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  (%r12),%xmm0
addsd  %xmm0,%xmm0
call   1060 <sin@plt>
movsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0x8(%r12),%xmm0
subsd  0x40(%rsp),%xmm0
call   1060 <sin@plt>
movsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movapd 0x20(%rsp),%xmm0
mulsd  0xc4d(%rip),%xmm0
addsd  0x18(%rsp),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0x70(%rsp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x68(%rsp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movapd %xmm0,0x20(%rsp)
movsd  0x8(%r12),%xmm0
subsd  0x40(%rsp),%xmm0
addsd  %xmm0,%xmm0
call   1060 <sin@plt>
movapd 0x20(%rsp),%xmm2
mulsd  %xmm0,%xmm2
addsd  0x8(%rsp),%xmm2
movsd  (%r15),%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm2,%xmm4
movsd  0x50(%rsp),%xmm0
movsd  0x10(%rsp),%xmm3
mulsd  %xmm3,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%r14)
movsd  0x8(%r15),%xmm2
mulsd  %xmm4,%xmm2
movsd  0x58(%rsp),%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%r14)
mulsd  0x10(%r15),%xmm4
movapd %xmm3,%xmm2
mulsd  0x60(%rsp),%xmm2
addsd  %xmm4,%xmm2
movsd  %xmm2,0x10(%r14)
lea    0xbcd(%rip),%rsi
mov    $0x5,%edi
mov    $0x3,%al
call   1090 <trace@plt>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [25 x i8] c"tide_pl : pos=%.3f %.3f\0A\00"
@.str.1 = [29 x i8] c"tide_pl : dr=%.3f %.3f %.3f\0A\00"
define void @tide_pl(double* %0, double* %1, double %2, double* %3, double* %4) {
%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 [3 x 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 i32
store double* %0, double** %6
store double* %1, double** %7
store double %2, double* %8
store double* %3, double** %9
store double* %4, double** %10
store double 2.920000e-01, double* %11
store double 1.500000e-02, double* %12
%29 = load double*, double** %9
%30 = getelementptr inbounds double, double* %29, i64 0
%31 = load double, double* %30
%32 = fmul double %31, 0x404CA5DC1A63C1F8
%33 = load double*, double** %9
%34 = getelementptr inbounds double, double* %33, i64 1
%35 = load double, double* %34
%36 = fmul double %35, 0x404CA5DC1A63C1F8
%37 = call i32 (i32, i8*, double, double, ...) @trace(i32 4, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double %32, double %36)
%38 = load double*, double** %7
%39 = call double @norm(double* %38, i32 3)
store double %39, double* %13
%40 = fcmp ole double %39, 0.000000e+00
br i1 %40, label %41, label %42
41: ; preds = %5
br label %237
42: ; preds = %5
store i32 0, i32* %28
br label %43
43: ; preds = %57, %42
%44 = load i32, i32* %28
%45 = icmp slt i32 %44, 3
br i1 %45, label %46, label %60
46: ; preds = %43
%47 = load double*, double** %7
%48 = load i32, i32* %28
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds double, double* %47, i64 %49
%51 = load double, double* %50
%52 = load double, double* %13
%53 = fdiv double %51, %52
%54 = load i32, i32* %28
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 %55
store double %53, double* %56
br label %57
57: ; preds = %46
%58 = load i32, i32* %28
%59 = add nsw i32 %58, 1
store i32 %59, i32* %28
br label %43
60: ; preds = %43
%61 = load double, double* %8
%62 = fdiv double %61, 0x42F6A8665B911600
%63 = fmul double %62, 0x42C27FD94C2FB880
%64 = fmul double %63, 0x42C27FD94C2FB880
%65 = load double, double* %13
%66 = load double, double* %13
%67 = fmul double %65, %66
%68 = load double, double* %13
%69 = fmul double %67, %68
%70 = fdiv double %64, %69
store double %70, double* %18
%71 = load double, double* %18
%72 = fmul double %71, 0x415854A640000000
%73 = load double, double* %13
%74 = fdiv double %72, %73
store double %74, double* %19
%75 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 2
%76 = load double, double* %75
%77 = call double @asin(double %76)
store double %77, double* %15
%78 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 1
%79 = load double, double* %78
%80 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%81 = load double, double* %80
%82 = call double @atan2(double %79, double %81)
store double %82, double* %16
%83 = load double, double* %15
%84 = call double @cos(double %83)
store double %84, double* %25
%85 = load double*, double** %9
%86 = getelementptr inbounds double, double* %85, i64 0
%87 = load double, double* %86
%88 = call double @sin(double %87)
store double %88, double* %26
%89 = load double*, double** %9
%90 = getelementptr inbounds double, double* %89, i64 0
%91 = load double, double* %90
%92 = call double @cos(double %91)
store double %92, double* %27
%93 = load double, double* %26
%94 = fmul double 3.000000e+00, %93
%95 = load double, double* %26
%96 = call double @llvm.fmuladd.f64(double %94, double %95, double -1.000000e+00)
%97 = fdiv double %96, 2.000000e+00
store double %97, double* %17
%98 = load double, double* %17
%99 = call double @llvm.fmuladd.f64(double -6.000000e-04, double %98, double 6.078000e-01)
store double %99, double* %21
%100 = load double, double* %17
%101 = call double @llvm.fmuladd.f64(double 2.000000e-04, double %100, double 0x3FB5AEE631F8A090)
store double %101, double* %22
%102 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%103 = load double*, double** %6
%104 = call double @dot(double* %102, double* %103, i32 3)
store double %104, double* %20
%105 = load double, double* %18
%106 = fmul double %105, 3.000000e+00
%107 = load double, double* %22
%108 = fmul double %106, %107
%109 = load double, double* %20
%110 = fmul double %108, %109
store double %110, double* %23
%111 = load double, double* %18
%112 = load double, double* %21
%113 = load double, double* %20
%114 = fmul double 1.500000e+00, %113
%115 = load double, double* %20
%116 = call double @llvm.fmuladd.f64(double %114, double %115, double -5.000000e-01)
%117 = load double, double* %22
%118 = fmul double 3.000000e+00, %117
%119 = load double, double* %20
%120 = fmul double %118, %119
%121 = load double, double* %20
%122 = fmul double %120, %121
%123 = fneg double %122
%124 = call double @llvm.fmuladd.f64(double %112, double %116, double %123)
%125 = fmul double %111, %124
store double %125, double* %24
%126 = load double, double* %19
%127 = fmul double %126, 1.500000e-02
%128 = load double, double* %20
%129 = fmul double 7.500000e+00, %128
%130 = load double, double* %20
%131 = call double @llvm.fmuladd.f64(double %129, double %130, double -1.500000e+00)
%132 = load double, double* %23
%133 = call double @llvm.fmuladd.f64(double %127, double %131, double %132)
store double %133, double* %23
%134 = load double, double* %19
%135 = load double, double* %20
%136 = fmul double 2.500000e+00, %135
%137 = load double, double* %20
%138 = fmul double %136, %137
%139 = load double, double* %20
%140 = load double, double* %20
%141 = fmul double 1.500000e+00, %140
%142 = fneg double %141
%143 = call double @llvm.fmuladd.f64(double %138, double %139, double %142)
%144 = load double, double* %20
%145 = fmul double 7.500000e+00, %144
%146 = load double, double* %20
%147 = call double @llvm.fmuladd.f64(double %145, double %146, double -1.500000e+00)
%148 = fmul double 1.500000e-02, %147
%149 = load double, double* %20
%150 = fmul double %148, %149
%151 = fneg double %150
%152 = call double @llvm.fmuladd.f64(double 2.920000e-01, double %143, double %151)
%153 = load double, double* %24
%154 = call double @llvm.fmuladd.f64(double %134, double %152, double %153)
store double %154, double* %24
%155 = load double, double* %18
%156 = fmul double 1.875000e-03, %155
%157 = load double, double* %15
%158 = fmul double 2.000000e+00, %157
%159 = call double @sin(double %158)
%160 = fmul double %156, %159
%161 = load double*, double** %9
%162 = getelementptr inbounds double, double* %161, i64 0
%163 = load double, double* %162
%164 = fmul double 2.000000e+00, %163
%165 = call double @sin(double %164)
%166 = fmul double %160, %165
%167 = load double*, double** %9
%168 = getelementptr inbounds double, double* %167, i64 1
%169 = load double, double* %168
%170 = load double, double* %16
%171 = fsub double %169, %170
%172 = call double @sin(double %171)
%173 = load double, double* %24
%174 = call double @llvm.fmuladd.f64(double %166, double %172, double %173)
store double %174, double* %24
%175 = load double, double* %18
%176 = fmul double 1.650000e-03, %175
%177 = load double, double* %25
%178 = fmul double %176, %177
%179 = load double, double* %25
%180 = fmul double %178, %179
%181 = load double, double* %27
%182 = fmul double %180, %181
%183 = load double, double* %27
%184 = fmul double %182, %183
%185 = load double*, double** %9
%186 = getelementptr inbounds double, double* %185, i64 1
%187 = load double, double* %186
%188 = load double, double* %16
%189 = fsub double %187, %188
%190 = fmul double 2.000000e+00, %189
%191 = call double @sin(double %190)
%192 = load double, double* %24
%193 = call double @llvm.fmuladd.f64(double %184, double %191, double %192)
store double %193, double* %24
%194 = load double, double* %23
%195 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%196 = load double, double* %195
%197 = load double, double* %24
%198 = load double*, double** %6
%199 = getelementptr inbounds double, double* %198, i64 0
%200 = load double, double* %199
%201 = fmul double %197, %200
%202 = call double @llvm.fmuladd.f64(double %194, double %196, double %201)
%203 = load double*, double** %10
%204 = getelementptr inbounds double, double* %203, i64 0
store double %202, double* %204
%205 = load double, double* %23
%206 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 1
%207 = load double, double* %206
%208 = load double, double* %24
%209 = load double*, double** %6
%210 = getelementptr inbounds double, double* %209, i64 1
%211 = load double, double* %210
%212 = fmul double %208, %211
%213 = call double @llvm.fmuladd.f64(double %205, double %207, double %212)
%214 = load double*, double** %10
%215 = getelementptr inbounds double, double* %214, i64 1
store double %213, double* %215
%216 = load double, double* %23
%217 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 2
%218 = load double, double* %217
%219 = load double, double* %24
%220 = load double*, double** %6
%221 = getelementptr inbounds double, double* %220, i64 2
%222 = load double, double* %221
%223 = fmul double %219, %222
%224 = call double @llvm.fmuladd.f64(double %216, double %218, double %223)
%225 = load double*, double** %10
%226 = getelementptr inbounds double, double* %225, i64 2
store double %224, double* %226
%227 = load double*, double** %10
%228 = getelementptr inbounds double, double* %227, i64 0
%229 = load double, double* %228
%230 = load double*, double** %10
%231 = getelementptr inbounds double, double* %230, i64 1
%232 = load double, double* %231
%233 = load double*, double** %10
%234 = getelementptr inbounds double, double* %233, i64 2
%235 = load double, double* %234
%236 = call i32 (i32, i8*, double, double, ...) @trace(i32 5, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), double %229, double %232, double %235)
br label %237
237: ; preds = %60, %41
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"tide_pl : pos=%.3f %.3f\0A\00"
@.str.1 = [29 x i8] c"tide_pl : dr=%.3f %.3f %.3f\0A\00"
define void @tide_pl(double* %0, double* %1, double %2, double* nocapture %3, double* nocapture %4) {
%6 = alloca [3 x double]
%7 = bitcast [3 x double]* %6 to i8*
%8 = load double, double* %3
%9 = fmul double %8, 0x404CA5DC1A63C1F8
%10 = getelementptr inbounds double, double* %3, i64 1
%11 = load double, double* %10
%12 = fmul double %11, 0x404CA5DC1A63C1F8
%13 = tail call i32 (i32, i8*, double, double, ...) @trace(i32 4, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double %9, double %12)
%14 = tail call double @norm(double* %1, i32 3)
%15 = fcmp ugt double %14, 0.000000e+00
br i1 %15, label %16, label %116
16: ; preds = %5
%17 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 0
%18 = bitcast double* %1 to <2 x double>*
%19 = load <2 x double>, <2 x double>* %18
%20 = insertelement <2 x double> poison, double %14, i64 0
%21 = shufflevector <2 x double> %20, <2 x double> poison, <2 x i32> zeroinitializer
%22 = fdiv <2 x double> %19, %21
%23 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 1
%24 = bitcast [3 x double]* %6 to <2 x double>*
store <2 x double> %22, <2 x double>* %24
%25 = getelementptr inbounds double, double* %1, i64 2
%26 = load double, double* %25
%27 = fdiv double %26, %14
%28 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 2
store double %27, double* %28
%29 = fdiv double %2, 0x42F6A8665B911600
%30 = insertelement <2 x double> poison, double %29, i64 0
%31 = insertelement <2 x double> %30, double %14, i64 1
%32 = insertelement <2 x double> <double 0x42C27FD94C2FB880, double poison>, double %14, i64 1
%33 = fmul <2 x double> %31, %32
%34 = fmul <2 x double> %32, %33
%35 = extractelement <2 x double> %34, i64 0
%36 = extractelement <2 x double> %34, i64 1
%37 = fdiv double %35, %36
%38 = fmul double %37, 0x415854A640000000
%39 = fdiv double %38, %14
%40 = tail call double @asin(double %27)
%41 = extractelement <2 x double> %22, i64 0
%42 = extractelement <2 x double> %22, i64 1
%43 = tail call double @atan2(double %42, double %41)
%44 = tail call double @cos(double %40)
%45 = load double, double* %3
%46 = tail call double @sin(double %45)
%47 = load double, double* %3
%48 = tail call double @cos(double %47)
%49 = fmul double %46, 3.000000e+00
%50 = tail call double @llvm.fmuladd.f64(double %49, double %46, double -1.000000e+00)
%51 = fmul double %50, 5.000000e-01
%52 = tail call double @llvm.fmuladd.f64(double %51, double -6.000000e-04, double 6.078000e-01)
%53 = tail call double @llvm.fmuladd.f64(double %51, double 2.000000e-04, double 0x3FB5AEE631F8A090)
%54 = call double @dot(double* %17, double* %0, i32 3)
%55 = fmul double %37, 3.000000e+00
%56 = fmul double %55, %53
%57 = fmul double %54, %56
%58 = fmul double %54, 1.500000e+00
%59 = call double @llvm.fmuladd.f64(double %58, double %54, double -5.000000e-01)
%60 = fmul double %53, -3.000000e+00
%61 = fmul double %54, %60
%62 = fmul double %54, %61
%63 = call double @llvm.fmuladd.f64(double %52, double %59, double %62)
%64 = fmul double %37, %63
%65 = fmul double %39, 1.500000e-02
%66 = fmul double %54, 7.500000e+00
%67 = call double @llvm.fmuladd.f64(double %66, double %54, double -1.500000e+00)
%68 = call double @llvm.fmuladd.f64(double %65, double %67, double %57)
%69 = fmul double %54, 2.500000e+00
%70 = fmul double %54, %69
%71 = fneg double %58
%72 = call double @llvm.fmuladd.f64(double %70, double %54, double %71)
%73 = fmul double %67, -1.500000e-02
%74 = fmul double %54, %73
%75 = call double @llvm.fmuladd.f64(double %72, double 2.920000e-01, double %74)
%76 = call double @llvm.fmuladd.f64(double %39, double %75, double %64)
%77 = fmul double %37, 1.875000e-03
%78 = fmul double %40, 2.000000e+00
%79 = call double @sin(double %78)
%80 = fmul double %77, %79
%81 = load double, double* %3
%82 = fmul double %81, 2.000000e+00
%83 = call double @sin(double %82)
%84 = fmul double %80, %83
%85 = load double, double* %10
%86 = fsub double %85, %43
%87 = call double @sin(double %86)
%88 = call double @llvm.fmuladd.f64(double %84, double %87, double %76)
%89 = fmul double %37, 1.650000e-03
%90 = fmul double %89, %44
%91 = fmul double %44, %90
%92 = fmul double %91, %48
%93 = fmul double %48, %92
%94 = load double, double* %10
%95 = fsub double %94, %43
%96 = fmul double %95, 2.000000e+00
%97 = call double @sin(double %96)
%98 = call double @llvm.fmuladd.f64(double %93, double %97, double %88)
%99 = load double, double* %17
%100 = load double, double* %0
%101 = fmul double %98, %100
%102 = call double @llvm.fmuladd.f64(double %68, double %99, double %101)
store double %102, double* %4
%103 = load double, double* %23
%104 = getelementptr inbounds double, double* %0, i64 1
%105 = load double, double* %104
%106 = fmul double %98, %105
%107 = call double @llvm.fmuladd.f64(double %68, double %103, double %106)
%108 = getelementptr inbounds double, double* %4, i64 1
store double %107, double* %108
%109 = load double, double* %28
%110 = getelementptr inbounds double, double* %0, i64 2
%111 = load double, double* %110
%112 = fmul double %98, %111
%113 = call double @llvm.fmuladd.f64(double %68, double %109, double %112)
%114 = getelementptr inbounds double, double* %4, i64 2
store double %113, double* %114
%115 = call i32 (i32, i8*, double, double, ...) @trace(i32 5, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), double %102, double %107, double %113)
br label %116
116: ; preds = %5, %16
ret void
}