#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);
int calc_msfast(double *velL, double *velR, double rhoh, double cs2, double w,
                double vi, double b2, double b0, double bi, double al,
                double bei, double igamii, const double *x) {
  double C1 = rhoh * (1.0 - cs2) / cs2 * w * w * w * w;
  double C2 = al * al * igamii;
  double C3 = (rhoh + b2 / cs2) * w * w;
  double C4 = al * al;
  double E = rhoh + b2;
  double viS = (vi + bei) / al;
  double v2 = 1.0 - 1.0 / (w * w);
  double ds =
      sqrt(cs2 * (igamii - viS * viS - cs2 * (igamii * v2 - viS * viS))) / w;
  double vsR = al * (viS * (1 - cs2) + ds) / (1.0 - v2 * cs2) - bei;
  double vsL = al * (viS * (1 - cs2) - ds) / (1.0 - v2 * cs2) - bei;
  double u0 = w / al;
  double ui = u0 * vi;
  double vAp = (ui + bi / sqrt(E)) / (u0 + b0 / sqrt(E));
  double vAm = (ui - bi / sqrt(E)) / (u0 - b0 / sqrt(E));
  double vAR = vAp > vAm ? vAp : vAm;
  double vAL = vAp < vAm ? vAp : vAm;
  double vRR = vsR > vAR ? vsR : vAR;
  double vLL = vsL < vAL ? vsL : vAL;
  double v0, v1, v, vR, vL, dv;
  int err = 1;
  if (err > 0) {
    double va2 = b2 / (rhoh + b2);
    double cf2 = cs2 + va2 - cs2 * va2;
    double dv =
        sqrt(cf2 * (igamii - viS * viS - cf2 * (igamii * v2 - viS * viS))) / w;
    vL = al * (viS * (1.0 - cf2) - dv) / (1.0 - v2 * cf2) - bei;
    vR = al * (viS * (1.0 - cf2) + dv) / (1.0 - v2 * cf2) - bei;
  }
  *velL = vL;
  *velR = vR;
  return err;
}


x86 assembly (clang, -O0):
<calc_msfast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
movsd  %xmm4,-0x38(%rbp)
movsd  %xmm5,-0x40(%rbp)
movsd  %xmm6,-0x48(%rbp)
movsd  %xmm7,-0x50(%rbp)
mov    %rdx,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe98(%rip),%xmm1
subsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x20(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  0x18(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
divsd  -0x20(%rbp),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x18(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x30(%rbp),%xmm0
addsd  0x10(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  0xdf4(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  0xde8(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  0x18(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm2
ff
movsd  -0x88(%rbp),%xmm3
ff
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x20(%rbp),%xmm1
movsd  0x18(%rbp),%xmm3
movsd  -0x90(%rbp),%xmm5
ff
movsd  -0x88(%rbp),%xmm4
ff
mulsd  -0x88(%rbp),%xmm4
ff
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
movsd  0xd18(%rip),%xmm3
subsd  -0x20(%rbp),%xmm3
movsd  -0x98(%rbp),%xmm2
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0x20(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xccf(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
subsd  0x10(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
movsd  0xca5(%rip),%xmm3
subsd  -0x20(%rbp),%xmm3
movsd  -0x98(%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  -0x90(%rbp),%xmm1
ff
movsd  -0x20(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xc45(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
subsd  0x10(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x180(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x188(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  -0x188(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x180(%rbp),%xmm0
ff
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0x170(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x178(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  -0x178(%rbp),%xmm2
ff
movsd  -0x170(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0x168(%rbp),%xmm0
ff
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x158(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  -0x160(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x158(%rbp),%xmm0
ff
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0x148(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x150(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  -0x150(%rbp),%xmm2
ff
movsd  -0x148(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0x140(%rbp),%xmm0
ff
divsd  %xmm3,%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
ucomisd -0xc8(%rbp),%xmm0
ff
jbe    1562 <calc_msfast+0x452>
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x190(%rbp)
ff
jmp    1572 <calc_msfast+0x462>
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0x190(%rbp)
ff
movsd  -0x190(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm1
ff
movsd  -0xc8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    15b1 <calc_msfast+0x4a1>
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x198(%rbp)
ff
jmp    15c1 <calc_msfast+0x4b1>
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0x198(%rbp)
ff
movsd  -0x198(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
ucomisd -0xd0(%rbp),%xmm0
ff
jbe    15fc <calc_msfast+0x4ec>
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x1a0(%rbp)
ff
jmp    160c <calc_msfast+0x4fc>
movsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0x1a0(%rbp)
ff
movsd  -0x1a0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0xd8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    164b <calc_msfast+0x53b>
movsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0x1a8(%rbp)
ff
jmp    165b <calc_msfast+0x54b>
movsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0x1a8(%rbp)
ff
movsd  -0x1a8(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movl   $0x1,-0x11c(%rbp)
cmpl   $0x0,-0x11c(%rbp)
jle    189c <calc_msfast+0x78c>
movsd  -0x38(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
addsd  -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x20(%rbp),%xmm1
addsd  -0x128(%rbp),%xmm1
ff
movsd  -0x20(%rbp),%xmm0
movsd  -0x128(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x130(%rbp),%xmm0
ff
movsd  0x18(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm2
ff
movsd  -0x88(%rbp),%xmm3
ff
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x130(%rbp),%xmm1
ff
movsd  0x18(%rbp),%xmm3
movsd  -0x90(%rbp),%xmm5
ff
movsd  -0x88(%rbp),%xmm4
ff
mulsd  -0x88(%rbp),%xmm4
ff
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
movsd  0x858(%rip),%xmm3
subsd  -0x130(%rbp),%xmm3
ff
movsd  -0x138(%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  -0x90(%rbp),%xmm1
ff
movsd  -0x130(%rbp),%xmm2
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0x7f2(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
subsd  0x10(%rbp),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
movsd  0x7c8(%rip),%xmm3
subsd  -0x130(%rbp),%xmm3
ff
movsd  -0x138(%rbp),%xmm2
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0x130(%rbp),%xmm2
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0x779(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
subsd  0x10(%rbp),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x110(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x108(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x11c(%rbp),%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_msfast>:
push   %r14
push   %rbx
sub    $0x78,%rsp
movapd %xmm2,%xmm8
movapd %xmm0,%xmm12
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  0x90(%rsp),%xmm10
movsd  0x98(%rsp),%xmm11
addsd  %xmm4,%xmm12
addsd  %xmm10,%xmm3
divsd  %xmm7,%xmm3
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movsd  0xea6(%rip),%xmm9
movapd %xmm9,%xmm5
divsd  %xmm0,%xmm5
movapd %xmm9,%xmm6
subsd  %xmm5,%xmm6
movapd %xmm3,%xmm0
mulsd  %xmm3,%xmm0
movapd %xmm11,%xmm13
subsd  %xmm0,%xmm13
mulsd  %xmm6,%xmm11
subsd  %xmm0,%xmm11
movapd 0xe80(%rip),%xmm5
xorpd  %xmm1,%xmm5
movapd %xmm1,%xmm2
mulsd  %xmm11,%xmm2
movapd %xmm13,%xmm0
subsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm2
ja     12b2 <calc_msfast+0x1a2>
ucomisd %xmm12,%xmm2
ja     135d <calc_msfast+0x24d>
xorpd  0xe45(%rip),%xmm6
divsd  %xmm12,%xmm4
addsd  %xmm4,%xmm1
mulsd  %xmm4,%xmm5
addsd  %xmm1,%xmm5
mulsd  %xmm5,%xmm11
subsd  %xmm11,%xmm13
mulsd  %xmm5,%xmm13
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm13
jb     1200 <calc_msfast+0xf0>
xorps  %xmm0,%xmm0
sqrtsd %xmm13,%xmm0
jmp    125b <calc_msfast+0x14b>
movapd %xmm13,%xmm0
movsd  %xmm3,0x18(%rsp)
movsd  %xmm7,0x10(%rsp)
movapd %xmm6,0x50(%rsp)
movsd  %xmm8,0x8(%rsp)
movapd %xmm5,0x40(%rsp)
call   1030 <sqrt@plt>
movapd 0x40(%rsp),%xmm5
movsd  0xdc8(%rip),%xmm9
movsd  0x8(%rsp),%xmm8
movapd 0x50(%rsp),%xmm6
movsd  0x90(%rsp),%xmm10
movsd  0x10(%rsp),%xmm7
movsd  0x18(%rsp),%xmm3
divsd  %xmm8,%xmm0
movapd %xmm9,%xmm1
subsd  %xmm5,%xmm1
mulsd  %xmm5,%xmm6
addsd  %xmm9,%xmm6
mulsd  %xmm1,%xmm3
movapd %xmm3,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm7,%xmm1
divsd  %xmm6,%xmm1
subsd  %xmm10,%xmm1
subsd  %xmm0,%xmm3
mulsd  %xmm7,%xmm3
divsd  %xmm6,%xmm3
subsd  %xmm10,%xmm3
movsd  %xmm3,(%rbx)
movsd  %xmm1,(%r14)
mov    $0x1,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret
ucomisd %xmm2,%xmm0
jae    11b8 <calc_msfast+0xa8>
movsd  %xmm3,0x18(%rsp)
movsd  %xmm7,0x10(%rsp)
movapd %xmm6,0x50(%rsp)
movsd  %xmm8,0x8(%rsp)
movapd %xmm5,0x40(%rsp)
movsd  %xmm4,0x38(%rsp)
movapd %xmm1,0x60(%rsp)
movsd  %xmm11,0x30(%rsp)
movsd  %xmm12,0x28(%rsp)
movsd  %xmm13,0x20(%rsp)
call   1030 <sqrt@plt>
movsd  0x20(%rsp),%xmm13
movsd  0x28(%rsp),%xmm12
movsd  0x30(%rsp),%xmm11
movapd 0x60(%rsp),%xmm1
movsd  0x38(%rsp),%xmm4
movapd 0x40(%rsp),%xmm5
movsd  0xccf(%rip),%xmm9
movsd  0x8(%rsp),%xmm8
movapd 0x50(%rsp),%xmm6
movsd  0x90(%rsp),%xmm10
xorpd  %xmm2,%xmm2
movsd  0x10(%rsp),%xmm7
movsd  0x18(%rsp),%xmm3
jmp    11b8 <calc_msfast+0xa8>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm12
movsd  %xmm3,0x18(%rsp)
movsd  %xmm7,0x10(%rsp)
movapd %xmm6,0x50(%rsp)
movsd  %xmm8,0x8(%rsp)
movapd %xmm5,0x40(%rsp)
movsd  %xmm4,0x38(%rsp)
movapd %xmm1,0x60(%rsp)
movsd  %xmm11,0x30(%rsp)
movsd  %xmm12,0x28(%rsp)
movsd  %xmm13,0x20(%rsp)
jae    1409 <calc_msfast+0x2f9>
movapd %xmm12,%xmm0
call   1030 <sqrt@plt>
xorpd  %xmm0,%xmm0
movsd  0x20(%rsp),%xmm13
movsd  0x28(%rsp),%xmm12
movsd  0x30(%rsp),%xmm11
movapd 0x60(%rsp),%xmm1
movsd  0x38(%rsp),%xmm4
movapd 0x40(%rsp),%xmm5
movsd  0xc1a(%rip),%xmm9
movsd  0x8(%rsp),%xmm8
movapd 0x50(%rsp),%xmm6
movsd  0x90(%rsp),%xmm10
movsd  0x10(%rsp),%xmm7
movsd  0x18(%rsp),%xmm3
ucomisd %xmm0,%xmm12
jae    146d <calc_msfast+0x35d>
movapd %xmm12,%xmm0
call   1030 <sqrt@plt>
movsd  0x20(%rsp),%xmm13
movsd  0x28(%rsp),%xmm12
movsd  0x30(%rsp),%xmm11
movapd 0x60(%rsp),%xmm1
movsd  0x38(%rsp),%xmm4
movapd 0x40(%rsp),%xmm5
movsd  0xbb6(%rip),%xmm9
movsd  0x8(%rsp),%xmm8
movapd 0x50(%rsp),%xmm6
movsd  0x90(%rsp),%xmm10
movsd  0x10(%rsp),%xmm7
movsd  0x18(%rsp),%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm12
jae    14d9 <calc_msfast+0x3c9>
movapd %xmm12,%xmm0
call   1030 <sqrt@plt>
xorpd  %xmm0,%xmm0
movsd  0x20(%rsp),%xmm13
movsd  0x28(%rsp),%xmm12
movsd  0x30(%rsp),%xmm11
movapd 0x60(%rsp),%xmm1
movsd  0x38(%rsp),%xmm4
movapd 0x40(%rsp),%xmm5
movsd  0xb4a(%rip),%xmm9
movsd  0x8(%rsp),%xmm8
movapd 0x50(%rsp),%xmm6
movsd  0x90(%rsp),%xmm10
movsd  0x10(%rsp),%xmm7
movsd  0x18(%rsp),%xmm3
ucomisd %xmm0,%xmm12
jae    11c3 <calc_msfast+0xb3>
movapd %xmm12,%xmm0
call   1030 <sqrt@plt>
movsd  0x20(%rsp),%xmm13
movsd  0x28(%rsp),%xmm12
movsd  0x30(%rsp),%xmm11
movapd 0x60(%rsp),%xmm1
movsd  0x38(%rsp),%xmm4
movapd 0x40(%rsp),%xmm5
movsd  0xae2(%rip),%xmm9
movsd  0x8(%rsp),%xmm8
movapd 0x50(%rsp),%xmm6
movsd  0x90(%rsp),%xmm10
movsd  0x10(%rsp),%xmm7
movsd  0x18(%rsp),%xmm3
jmp    11c3 <calc_msfast+0xb3>

LLVM IR (-O0):
define i32 @calc_msfast(double* %0, double* %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10, double %11, double* %12) {
%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
%35 = alloca double
%36 = alloca double
%37 = alloca double
%38 = alloca double
%39 = alloca double
%40 = alloca double
%41 = alloca double
%42 = alloca double
%43 = alloca double
%44 = alloca double
%45 = alloca double
%46 = alloca double
%47 = alloca double
%48 = alloca double
%49 = alloca double
%50 = alloca double
%51 = alloca i32
%52 = alloca double
%53 = alloca double
%54 = alloca double
store double* %0, double** %14
store double* %1, double** %15
store double %2, double* %16
store double %3, double* %17
store double %4, double* %18
store double %5, double* %19
store double %6, double* %20
store double %7, double* %21
store double %8, double* %22
store double %9, double* %23
store double %10, double* %24
store double %11, double* %25
store double* %12, double** %26
%55 = load double, double* %16
%56 = load double, double* %17
%57 = fsub double 1.000000e+00, %56
%58 = fmul double %55, %57
%59 = load double, double* %17
%60 = fdiv double %58, %59
%61 = load double, double* %18
%62 = fmul double %60, %61
%63 = load double, double* %18
%64 = fmul double %62, %63
%65 = load double, double* %18
%66 = fmul double %64, %65
%67 = load double, double* %18
%68 = fmul double %66, %67
store double %68, double* %27
%69 = load double, double* %23
%70 = load double, double* %23
%71 = fmul double %69, %70
%72 = load double, double* %25
%73 = fmul double %71, %72
store double %73, double* %28
%74 = load double, double* %16
%75 = load double, double* %20
%76 = load double, double* %17
%77 = fdiv double %75, %76
%78 = fadd double %74, %77
%79 = load double, double* %18
%80 = fmul double %78, %79
%81 = load double, double* %18
%82 = fmul double %80, %81
store double %82, double* %29
%83 = load double, double* %23
%84 = load double, double* %23
%85 = fmul double %83, %84
store double %85, double* %30
%86 = load double, double* %16
%87 = load double, double* %20
%88 = fadd double %86, %87
store double %88, double* %31
%89 = load double, double* %19
%90 = load double, double* %24
%91 = fadd double %89, %90
%92 = load double, double* %23
%93 = fdiv double %91, %92
store double %93, double* %32
%94 = load double, double* %18
%95 = load double, double* %18
%96 = fmul double %94, %95
%97 = fdiv double 1.000000e+00, %96
%98 = fsub double 1.000000e+00, %97
store double %98, double* %33
%99 = load double, double* %17
%100 = load double, double* %25
%101 = load double, double* %32
%102 = load double, double* %32
%103 = fneg double %101
%104 = call double @llvm.fmuladd.f64(double %103, double %102, double %100)
%105 = load double, double* %17
%106 = load double, double* %25
%107 = load double, double* %33
%108 = load double, double* %32
%109 = load double, double* %32
%110 = fmul double %108, %109
%111 = fneg double %110
%112 = call double @llvm.fmuladd.f64(double %106, double %107, double %111)
%113 = fneg double %105
%114 = call double @llvm.fmuladd.f64(double %113, double %112, double %104)
%115 = fmul double %99, %114
%116 = call double @sqrt(double %115)
%117 = load double, double* %18
%118 = fdiv double %116, %117
store double %118, double* %34
%119 = load double, double* %23
%120 = load double, double* %32
%121 = load double, double* %17
%122 = fsub double 1.000000e+00, %121
%123 = load double, double* %34
%124 = call double @llvm.fmuladd.f64(double %120, double %122, double %123)
%125 = fmul double %119, %124
%126 = load double, double* %33
%127 = load double, double* %17
%128 = fneg double %126
%129 = call double @llvm.fmuladd.f64(double %128, double %127, double 1.000000e+00)
%130 = fdiv double %125, %129
%131 = load double, double* %24
%132 = fsub double %130, %131
store double %132, double* %35
%133 = load double, double* %23
%134 = load double, double* %32
%135 = load double, double* %17
%136 = fsub double 1.000000e+00, %135
%137 = load double, double* %34
%138 = fneg double %137
%139 = call double @llvm.fmuladd.f64(double %134, double %136, double %138)
%140 = fmul double %133, %139
%141 = load double, double* %33
%142 = load double, double* %17
%143 = fneg double %141
%144 = call double @llvm.fmuladd.f64(double %143, double %142, double 1.000000e+00)
%145 = fdiv double %140, %144
%146 = load double, double* %24
%147 = fsub double %145, %146
store double %147, double* %36
%148 = load double, double* %18
%149 = load double, double* %23
%150 = fdiv double %148, %149
store double %150, double* %37
%151 = load double, double* %37
%152 = load double, double* %19
%153 = fmul double %151, %152
store double %153, double* %38
%154 = load double, double* %38
%155 = load double, double* %22
%156 = load double, double* %31
%157 = call double @sqrt(double %156)
%158 = fdiv double %155, %157
%159 = fadd double %154, %158
%160 = load double, double* %37
%161 = load double, double* %21
%162 = load double, double* %31
%163 = call double @sqrt(double %162)
%164 = fdiv double %161, %163
%165 = fadd double %160, %164
%166 = fdiv double %159, %165
store double %166, double* %39
%167 = load double, double* %38
%168 = load double, double* %22
%169 = load double, double* %31
%170 = call double @sqrt(double %169)
%171 = fdiv double %168, %170
%172 = fsub double %167, %171
%173 = load double, double* %37
%174 = load double, double* %21
%175 = load double, double* %31
%176 = call double @sqrt(double %175)
%177 = fdiv double %174, %176
%178 = fsub double %173, %177
%179 = fdiv double %172, %178
store double %179, double* %40
%180 = load double, double* %39
%181 = load double, double* %40
%182 = fcmp ogt double %180, %181
br i1 %182, label %183, label %185
183: ; preds = %13
%184 = load double, double* %39
br label %187
185: ; preds = %13
%186 = load double, double* %40
br label %187
187: ; preds = %185, %183
%188 = phi double [ %184, %183 ], [ %186, %185 ]
store double %188, double* %41
%189 = load double, double* %39
%190 = load double, double* %40
%191 = fcmp olt double %189, %190
br i1 %191, label %192, label %194
192: ; preds = %187
%193 = load double, double* %39
br label %196
194: ; preds = %187
%195 = load double, double* %40
br label %196
196: ; preds = %194, %192
%197 = phi double [ %193, %192 ], [ %195, %194 ]
store double %197, double* %42
%198 = load double, double* %35
%199 = load double, double* %41
%200 = fcmp ogt double %198, %199
br i1 %200, label %201, label %203
201: ; preds = %196
%202 = load double, double* %35
br label %205
203: ; preds = %196
%204 = load double, double* %41
br label %205
205: ; preds = %203, %201
%206 = phi double [ %202, %201 ], [ %204, %203 ]
store double %206, double* %43
%207 = load double, double* %36
%208 = load double, double* %42
%209 = fcmp olt double %207, %208
br i1 %209, label %210, label %212
210: ; preds = %205
%211 = load double, double* %36
br label %214
212: ; preds = %205
%213 = load double, double* %42
br label %214
214: ; preds = %212, %210
%215 = phi double [ %211, %210 ], [ %213, %212 ]
store double %215, double* %44
store i32 1, i32* %51
%216 = load i32, i32* %51
%217 = icmp sgt i32 %216, 0
br i1 %217, label %218, label %280
218: ; preds = %214
%219 = load double, double* %20
%220 = load double, double* %16
%221 = load double, double* %20
%222 = fadd double %220, %221
%223 = fdiv double %219, %222
store double %223, double* %52
%224 = load double, double* %17
%225 = load double, double* %52
%226 = fadd double %224, %225
%227 = load double, double* %17
%228 = load double, double* %52
%229 = fneg double %227
%230 = call double @llvm.fmuladd.f64(double %229, double %228, double %226)
store double %230, double* %53
%231 = load double, double* %53
%232 = load double, double* %25
%233 = load double, double* %32
%234 = load double, double* %32
%235 = fneg double %233
%236 = call double @llvm.fmuladd.f64(double %235, double %234, double %232)
%237 = load double, double* %53
%238 = load double, double* %25
%239 = load double, double* %33
%240 = load double, double* %32
%241 = load double, double* %32
%242 = fmul double %240, %241
%243 = fneg double %242
%244 = call double @llvm.fmuladd.f64(double %238, double %239, double %243)
%245 = fneg double %237
%246 = call double @llvm.fmuladd.f64(double %245, double %244, double %236)
%247 = fmul double %231, %246
%248 = call double @sqrt(double %247)
%249 = load double, double* %18
%250 = fdiv double %248, %249
store double %250, double* %54
%251 = load double, double* %23
%252 = load double, double* %32
%253 = load double, double* %53
%254 = fsub double 1.000000e+00, %253
%255 = load double, double* %54
%256 = fneg double %255
%257 = call double @llvm.fmuladd.f64(double %252, double %254, double %256)
%258 = fmul double %251, %257
%259 = load double, double* %33
%260 = load double, double* %53
%261 = fneg double %259
%262 = call double @llvm.fmuladd.f64(double %261, double %260, double 1.000000e+00)
%263 = fdiv double %258, %262
%264 = load double, double* %24
%265 = fsub double %263, %264
store double %265, double* %49
%266 = load double, double* %23
%267 = load double, double* %32
%268 = load double, double* %53
%269 = fsub double 1.000000e+00, %268
%270 = load double, double* %54
%271 = call double @llvm.fmuladd.f64(double %267, double %269, double %270)
%272 = fmul double %266, %271
%273 = load double, double* %33
%274 = load double, double* %53
%275 = fneg double %273
%276 = call double @llvm.fmuladd.f64(double %275, double %274, double 1.000000e+00)
%277 = fdiv double %272, %276
%278 = load double, double* %24
%279 = fsub double %277, %278
store double %279, double* %48
br label %280
280: ; preds = %218, %214
%281 = load double, double* %49
%282 = load double*, double** %14
store double %281, double* %282
%283 = load double, double* %48
%284 = load double*, double** %15
store double %283, double* %284
%285 = load i32, i32* %51
ret i32 %285
}

LLVM IR (-O2):
define i32 @calc_msfast(double* nocapture writeonly %0, double* nocapture writeonly %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10, double %11, double* nocapture readnone %12) {
%14 = fadd double %2, %6
%15 = fadd double %5, %10
%16 = fdiv double %15, %9
%17 = fmul double %4, %4
%18 = fdiv double 1.000000e+00, %17
%19 = fsub double 1.000000e+00, %18
%20 = fneg double %16
%21 = tail call double @llvm.fmuladd.f64(double %20, double %16, double %11)
%22 = fmul double %16, %20
%23 = tail call double @llvm.fmuladd.f64(double %11, double %19, double %22)
%24 = fneg double %3
%25 = tail call double @llvm.fmuladd.f64(double %24, double %23, double %21)
%26 = fmul double %25, %3
%27 = fcmp olt double %26, 0.000000e+00
br i1 %27, label %28, label %30
28: ; preds = %13
%29 = tail call double @sqrt(double %26)
br label %30
30: ; preds = %13, %28
%31 = fcmp olt double %14, 0.000000e+00
br i1 %31, label %32, label %37
32: ; preds = %30
%33 = tail call double @sqrt(double %14)
%34 = tail call double @sqrt(double %14)
%35 = tail call double @sqrt(double %14)
%36 = tail call double @sqrt(double %14)
br label %37
37: ; preds = %30, %32
%38 = fneg double %19
%39 = fdiv double %6, %14
%40 = fadd double %39, %3
%41 = tail call double @llvm.fmuladd.f64(double %24, double %39, double %40)
%42 = fneg double %41
%43 = tail call double @llvm.fmuladd.f64(double %42, double %23, double %21)
%44 = fmul double %41, %43
%45 = tail call double @sqrt(double %44)
%46 = fdiv double %45, %4
%47 = fsub double 1.000000e+00, %41
%48 = tail call double @llvm.fmuladd.f64(double %38, double %41, double 1.000000e+00)
%49 = tail call double @llvm.fmuladd.f64(double %16, double %47, double %46)
%50 = fmul double %49, %9
%51 = fdiv double %50, %48
%52 = fsub double %51, %10
%53 = fneg double %46
%54 = tail call double @llvm.fmuladd.f64(double %16, double %47, double %53)
%55 = fmul double %54, %9
%56 = fdiv double %55, %48
%57 = fsub double %56, %10
store double %57, double* %0
store double %52, double* %1
ret i32 1
}