#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 DBL_EPSILON;
double sqrt(double);
void Posneg2A(double fpu, double fmu, double gpv, double gmv, double a,
              double height, double *xc, double *p0, double *q0) {
  double x1, x2, y0, y1, y2, m0, m1, m2, m9, xcap, ycap;
  double d, p, q, r, s, t, u;
  d = 1.0 - a * a;
  if (d < DBL_EPSILON)
    d = DBL_EPSILON;
  x1 = -gpv / a;
  y1 = x1 * (fpu - 0.5 * x1);
  m1 = fpu - x1;
  x2 = -gmv / a;
  y2 = x2 * (fpu - 0.5 * x2);
  m2 = fpu - x2;
  y0 = 0.5 * gmv * gmv;
  m9 = fpu + a * gmv;
  m0 = fmu + a * gmv;
  if (m0 <= 0.0) {
    xcap = 0.0;
    ycap = height + y0;
    if (ycap <= y2 - m2 * x2)
      p = m9 + sqrt(2.0 * d * height);
    else {
      r = (ycap - y1) + m1 * x1;
      if (r <= 0.0)
        p = fpu + sqrt(2.0 * ycap);
      else
        p = (fpu + a * gpv) + sqrt(2.0 * d * (d * ycap + a * a * r));
    }
    q = m0 - sqrt(2.0 * d * height);
  } else {
    xcap = m0 / d;
    ycap = height + 0.5 * (d * xcap * xcap + gmv * gmv);
    if (ycap - y0 <= m0 * xcap)
      p = sqrt(2.0 * d * height);
    else {
      r = (ycap - y0) - m9 * xcap;
      if (r <= 0.0)
        p = (ycap - y0) / xcap;
      else {
        s = (ycap - y2) - m2 * (xcap - x2);
        if (s <= 0.0)
          p = (fpu - fmu) + sqrt(d * (2.0 * r + d * xcap * xcap));
        else {
          t = (ycap - y1) - m1 * (xcap - x1);
          if (t <= 0.0) {
            u = 2.0 * s - 2.0 * xcap * x2 + x2 * x2;
            p = fpu + u / (xcap + sqrt(u + xcap * xcap));
          } else {
            u = fmu + a * gmv + d * gpv / a;
            p = ((fpu - fmu) + a * (gpv - gmv)) + sqrt(2.0 * d * t + u * u);
          }
        }
      }
    }
    q = -sqrt(2.0 * d * height);
  }
  *xc = xcap;
  *p0 = p;
  *q0 = q;
}


x86 assembly (clang, -O0):
<Posneg2A>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
mov    %rdi,-0x38(%rbp)
mov    %rsi,-0x40(%rbp)
mov    %rdx,-0x48(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe8e(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm1
ff
mov    0x2e5b(%rip),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    11ae <Posneg2A+0x9e>
mov    0x2e46(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
movsd  0xe25(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
movsd  0xdc8(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xd95(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x10(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x78(%rbp),%xmm0
jb     14a8 <Posneg2A+0x398>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0x70(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x58(%rbp),%xmm3
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     1371 <Posneg2A+0x261>
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  0xcd5(%rip),%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0x30(%rbp),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1465 <Posneg2A+0x355>
movsd  -0xa0(%rbp),%xmm1
ff
subsd  -0x68(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0xc0(%rbp),%xmm0
ff
jb     13e7 <Posneg2A+0x2d7>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  0xc5a(%rip),%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1460 <Posneg2A+0x350>
movsd  -0x8(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0xc0a(%rip),%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm3
ff
movsd  -0x28(%rbp),%xmm2
mulsd  -0x28(%rbp),%xmm2
mulsd  -0xc0(%rbp),%xmm2
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1465 <Posneg2A+0x355>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  0xb9e(%rip),%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0x30(%rbp),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xf8(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    18ac <Posneg2A+0x79c>
movsd  -0x78(%rbp),%xmm0
divsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x30(%rbp),%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm3
ff
movsd  -0x20(%rbp),%xmm2
mulsd  -0x20(%rbp),%xmm2
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
movsd  0xb14(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm1
ff
subsd  -0x60(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     154f <Posneg2A+0x43f>
movsd  0xae8(%rip),%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0x30(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1873 <Posneg2A+0x763>
movsd  -0xa0(%rbp),%xmm1
ff
subsd  -0x60(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0xc0(%rbp),%xmm0
ff
jb     15c6 <Posneg2A+0x4b6>
movsd  -0xa0(%rbp),%xmm0
ff
subsd  -0x60(%rbp),%xmm0
divsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    186e <Posneg2A+0x75e>
movsd  -0xa0(%rbp),%xmm1
ff
subsd  -0x70(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
subsd  -0x58(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0xc8(%rbp),%xmm0
ff
jb     1687 <Posneg2A+0x577>
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xc0(%rbp),%xmm1
ff
movsd  -0xa8(%rbp),%xmm2
ff
mulsd  -0x98(%rbp),%xmm2
ff
mulsd  -0x98(%rbp),%xmm2
ff
addsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x100(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1869 <Posneg2A+0x759>
movsd  -0xa0(%rbp),%xmm1
ff
subsd  -0x68(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm2
ff
subsd  -0x50(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0xd0(%rbp),%xmm0
ff
jb     17ba <Posneg2A+0x6aa>
movsd  -0xc8(%rbp),%xmm1
ff
movsd  0x92a(%rip),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0xd8(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  -0x118(%rbp),%xmm2
ff
movsd  -0x110(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0x108(%rbp),%xmm0
ff
addsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1864 <Posneg2A+0x754>
movsd  -0x10(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  -0x18(%rbp),%xmm1
divsd  -0x28(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
subsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  0x7f8(%rip),%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xd0(%rbp),%xmm2
ff
movsd  -0xd8(%rbp),%xmm1
ff
mulsd  -0xd8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x120(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1869 <Posneg2A+0x759>
jmp    186e <Posneg2A+0x75e>
jmp    1873 <Posneg2A+0x763>
movsd  0x79d(%rip),%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0x30(%rbp),%xmm0
call   1030 <sqrt@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xb0(%rbp),%xmm0
ff
mov    -0x40(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xb8(%rbp),%xmm0
ff
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Posneg2A>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
movsd  %xmm5,0x30(%rsp)
movapd %xmm2,%xmm11
movapd %xmm0,%xmm12
movapd %xmm4,%xmm9
mulsd  %xmm4,%xmm9
movsd  0xebc(%rip),%xmm0
subsd  %xmm9,%xmm0
mov    0x2e98(%rip),%rax
movsd  (%rax),%xmm2
maxsd  %xmm0,%xmm2
movapd 0xec0(%rip),%xmm5
movapd %xmm11,%xmm13
xorpd  %xmm5,%xmm13
divsd  %xmm4,%xmm13
movsd  0xe91(%rip),%xmm7
movapd %xmm13,%xmm15
mulsd  %xmm7,%xmm15
addsd  %xmm12,%xmm15
mulsd  %xmm13,%xmm15
movapd %xmm12,%xmm8
subsd  %xmm13,%xmm8
xorpd  %xmm3,%xmm5
divsd  %xmm4,%xmm5
mulsd  %xmm5,%xmm7
addsd  %xmm12,%xmm7
mulsd  %xmm5,%xmm7
movapd %xmm4,%xmm6
mulsd  %xmm3,%xmm6
movapd %xmm6,%xmm10
addsd  %xmm1,%xmm6
xorpd  %xmm0,%xmm0
ucomisd %xmm6,%xmm0
movapd %xmm12,%xmm14
subsd  %xmm5,%xmm14
movsd  0xe3b(%rip),%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm12,%xmm10
jae    1331 <Posneg2A+0x221>
movsd  %xmm1,0x38(%rsp)
movapd %xmm5,0x20(%rsp)
movapd %xmm10,%xmm1
movapd %xmm11,%xmm5
movsd  %xmm4,(%rsp)
movapd %xmm6,%xmm4
divsd  %xmm2,%xmm4
movapd %xmm2,%xmm9
mulsd  %xmm4,%xmm9
movapd %xmm3,%xmm11
mulsd  %xmm3,%xmm11
mulsd  %xmm4,%xmm9
addsd  %xmm9,%xmm11
mulsd  0xdde(%rip),%xmm11
addsd  0x30(%rsp),%xmm11
movapd %xmm11,%xmm10
subsd  %xmm0,%xmm10
movapd %xmm6,%xmm0
mulsd  %xmm4,%xmm0
ucomisd %xmm10,%xmm0
jae    13a6 <Posneg2A+0x296>
movsd  %xmm12,0x8(%rsp)
mulsd  %xmm4,%xmm1
movapd %xmm10,%xmm0
subsd  %xmm1,%xmm0
xorpd  %xmm12,%xmm12
ucomisd %xmm0,%xmm12
jae    13f2 <Posneg2A+0x2e2>
movapd %xmm6,0x10(%rsp)
movapd %xmm11,%xmm10
subsd  %xmm7,%xmm10
movapd %xmm4,%xmm6
movapd 0x20(%rsp),%xmm1
subsd  %xmm1,%xmm6
mulsd  %xmm6,%xmm14
subsd  %xmm14,%xmm10
ucomisd %xmm10,%xmm12
jae    1464 <Posneg2A+0x354>
subsd  %xmm15,%xmm11
movapd %xmm4,%xmm0
subsd  %xmm13,%xmm0
mulsd  %xmm0,%xmm8
subsd  %xmm8,%xmm11
xorpd  %xmm8,%xmm8
ucomisd %xmm11,%xmm8
jae    152c <Posneg2A+0x41c>
movapd %xmm2,%xmm0
mulsd  %xmm5,%xmm0
movsd  (%rsp),%xmm6
divsd  %xmm6,%xmm0
movapd 0x10(%rsp),%xmm7
addsd  %xmm0,%xmm7
movsd  0x8(%rsp),%xmm0
subsd  0x38(%rsp),%xmm0
subsd  %xmm3,%xmm5
mulsd  %xmm6,%xmm5
addsd  %xmm0,%xmm5
movapd %xmm2,%xmm0
addsd  %xmm2,%xmm0
mulsd  %xmm7,%xmm7
mulsd  %xmm11,%xmm0
addsd  %xmm7,%xmm0
ucomisd %xmm8,%xmm0
jb     159d <Posneg2A+0x48d>
sqrtsd %xmm0,%xmm0
jmp    15c4 <Posneg2A+0x4b4>
addsd  0x30(%rsp),%xmm0
mulsd  %xmm5,%xmm14
subsd  %xmm14,%xmm7
ucomisd %xmm0,%xmm7
movapd %xmm6,0x10(%rsp)
jae    13cc <Posneg2A+0x2bc>
movapd %xmm0,%xmm1
subsd  %xmm15,%xmm1
mulsd  %xmm13,%xmm8
addsd  %xmm1,%xmm8
xorpd  %xmm1,%xmm1
ucomisd %xmm8,%xmm1
jae    13fc <Posneg2A+0x2ec>
mulsd  %xmm11,%xmm4
addsd  %xmm12,%xmm4
movapd %xmm2,%xmm3
addsd  %xmm2,%xmm3
mulsd  %xmm8,%xmm9
mulsd  %xmm2,%xmm0
addsd  %xmm9,%xmm0
mulsd  %xmm3,%xmm0
ucomisd %xmm1,%xmm0
jb     1494 <Posneg2A+0x384>
sqrtsd %xmm0,%xmm0
jmp    14af <Posneg2A+0x39f>
movapd %xmm2,%xmm0
addsd  %xmm2,%xmm0
mulsd  0x30(%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1418 <Posneg2A+0x308>
xorps  %xmm10,%xmm10
sqrtsd %xmm0,%xmm10
jmp    1609 <Posneg2A+0x4f9>
addsd  %xmm2,%xmm2
movapd %xmm2,%xmm0
mulsd  0x30(%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     143d <Posneg2A+0x32d>
sqrtsd %xmm0,%xmm0
addsd  %xmm0,%xmm10
jmp    14e9 <Posneg2A+0x3d9>
divsd  %xmm4,%xmm10
jmp    1609 <Posneg2A+0x4f9>
addsd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jb     14be <Posneg2A+0x3ae>
xorps  %xmm10,%xmm10
sqrtsd %xmm0,%xmm10
jmp    14e0 <Posneg2A+0x3d0>
movsd  %xmm2,(%rsp)
movsd  %xmm4,0x10(%rsp)
call   1030 <sqrt@plt>
movsd  0x10(%rsp),%xmm4
movsd  (%rsp),%xmm2
movapd %xmm0,%xmm10
jmp    1609 <Posneg2A+0x4f9>
movsd  %xmm2,(%rsp)
movsd  %xmm10,0x20(%rsp)
call   1030 <sqrt@plt>
movsd  0x20(%rsp),%xmm10
movsd  (%rsp),%xmm2
addsd  %xmm0,%xmm10
jmp    14e9 <Posneg2A+0x3d9>
movsd  0x8(%rsp),%xmm3
subsd  0x38(%rsp),%xmm3
addsd  %xmm0,%xmm0
addsd  %xmm9,%xmm0
mulsd  %xmm2,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     156b <Posneg2A+0x45b>
sqrtsd %xmm0,%xmm0
jmp    1592 <Posneg2A+0x482>
movsd  %xmm4,(%rsp)
movsd  %xmm3,0x20(%rsp)
call   1030 <sqrt@plt>
movsd  0x20(%rsp),%xmm3
movsd  (%rsp),%xmm4
addsd  %xmm0,%xmm4
movapd %xmm3,%xmm2
movapd %xmm4,%xmm10
jmp    14e9 <Posneg2A+0x3d9>
movsd  %xmm2,(%rsp)
movsd  %xmm12,0x8(%rsp)
call   1030 <sqrt@plt>
movsd  0x8(%rsp),%xmm12
movsd  (%rsp),%xmm2
movapd %xmm0,%xmm10
addsd  %xmm12,%xmm10
addsd  %xmm2,%xmm2
mulsd  0x30(%rsp),%xmm2
xorpd  %xmm4,%xmm4
ucomisd %xmm4,%xmm2
jb     1502 <Posneg2A+0x3f2>
xorps  %xmm0,%xmm0
sqrtsd %xmm2,%xmm0
jmp    151d <Posneg2A+0x40d>
movapd %xmm2,%xmm0
movsd  %xmm10,0x20(%rsp)
call   1030 <sqrt@plt>
movsd  0x20(%rsp),%xmm10
xorpd  %xmm4,%xmm4
movapd 0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
jmp    1655 <Posneg2A+0x545>
movsd  0xae4(%rip),%xmm0
mulsd  %xmm4,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm10,%xmm10
addsd  %xmm0,%xmm10
mulsd  %xmm1,%xmm1
addsd  %xmm10,%xmm1
movapd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm8,%xmm0
jb     15cf <Posneg2A+0x4bf>
sqrtsd %xmm0,%xmm0
jmp    15f6 <Posneg2A+0x4e6>
movsd  %xmm2,(%rsp)
movsd  %xmm4,0x10(%rsp)
movsd  %xmm3,0x8(%rsp)
call   1030 <sqrt@plt>
movsd  0x8(%rsp),%xmm3
movsd  0x10(%rsp),%xmm4
movsd  (%rsp),%xmm2
addsd  %xmm0,%xmm3
movapd %xmm3,%xmm10
jmp    1609 <Posneg2A+0x4f9>
movsd  %xmm2,(%rsp)
movsd  %xmm4,0x10(%rsp)
movapd %xmm5,0x20(%rsp)
call   1030 <sqrt@plt>
movapd 0x20(%rsp),%xmm5
movsd  0x10(%rsp),%xmm4
movsd  (%rsp),%xmm2
addsd  %xmm0,%xmm5
movapd %xmm5,%xmm10
jmp    1609 <Posneg2A+0x4f9>
movsd  %xmm2,(%rsp)
movsd  %xmm4,0x10(%rsp)
movapd %xmm1,0x20(%rsp)
call   1030 <sqrt@plt>
movapd 0x20(%rsp),%xmm1
movsd  0x10(%rsp),%xmm4
movsd  (%rsp),%xmm2
addsd  %xmm4,%xmm0
divsd  %xmm0,%xmm1
addsd  0x8(%rsp),%xmm1
movapd %xmm1,%xmm10
addsd  %xmm2,%xmm2
mulsd  0x30(%rsp),%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jb     1626 <Posneg2A+0x516>
xorps  %xmm1,%xmm1
sqrtsd %xmm2,%xmm1
jmp    164d <Posneg2A+0x53d>
movapd %xmm2,%xmm0
movsd  %xmm4,0x10(%rsp)
movsd  %xmm10,0x20(%rsp)
call   1030 <sqrt@plt>
movsd  0x20(%rsp),%xmm10
movsd  0x10(%rsp),%xmm4
movapd %xmm0,%xmm1
xorpd  0x9cb(%rip),%xmm1
movsd  %xmm4,(%rbx)
movsd  %xmm10,(%r15)
movsd  %xmm1,(%r14)
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@DBL_EPSILON = global double 0.000000e+00
define void @Posneg2A(double %0, double %1, double %2, double %3, double %4, double %5, double* nocapture writeonly %6, double* nocapture writeonly %7, double* nocapture writeonly %8) {
%10 = fneg double %4
%11 = tail call double @llvm.fmuladd.f64(double %10, double %4, double 1.000000e+00)
%12 = load double, double* @DBL_EPSILON
%13 = fcmp olt double %11, %12
%14 = select i1 %13, double %12, double %11
%15 = fneg double %2
%16 = fdiv double %15, %4
%17 = tail call double @llvm.fmuladd.f64(double %16, double -5.000000e-01, double %0)
%18 = fmul double %16, %17
%19 = fsub double %0, %16
%20 = fneg double %3
%21 = fdiv double %20, %4
%22 = tail call double @llvm.fmuladd.f64(double %21, double -5.000000e-01, double %0)
%23 = fmul double %21, %22
%24 = fsub double %0, %21
%25 = fmul double %3, 5.000000e-01
%26 = fmul double %25, %3
%27 = tail call double @llvm.fmuladd.f64(double %4, double %3, double %0)
%28 = tail call double @llvm.fmuladd.f64(double %4, double %3, double %1)
%29 = fcmp ugt double %28, 0.000000e+00
br i1 %29, label %64, label %30
30: ; preds = %9
%31 = fadd double %26, %5
%32 = fneg double %24
%33 = tail call double @llvm.fmuladd.f64(double %32, double %21, double %23)
%34 = fcmp ugt double %31, %33
br i1 %34, label %40, label %35
35: ; preds = %30
%36 = fmul double %14, 2.000000e+00
%37 = fmul double %36, %5
%38 = tail call double @sqrt(double %37)
%39 = fadd double %27, %38
br label %58
40: ; preds = %30
%41 = fsub double %31, %18
%42 = tail call double @llvm.fmuladd.f64(double %19, double %16, double %41)
%43 = fcmp ugt double %42, 0.000000e+00
br i1 %43, label %49, label %44
44: ; preds = %40
%45 = fmul double %31, 2.000000e+00
%46 = tail call double @sqrt(double %45)
%47 = fadd double %46, %0
%48 = fmul double %14, 2.000000e+00
br label %58
49: ; preds = %40
%50 = tail call double @llvm.fmuladd.f64(double %4, double %2, double %0)
%51 = fmul double %14, 2.000000e+00
%52 = fmul double %4, %4
%53 = fmul double %52, %42
%54 = tail call double @llvm.fmuladd.f64(double %14, double %31, double %53)
%55 = fmul double %51, %54
%56 = tail call double @sqrt(double %55)
%57 = fadd double %50, %56
br label %58
58: ; preds = %44, %49, %35
%59 = phi double [ %48, %44 ], [ %51, %49 ], [ %36, %35 ]
%60 = phi double [ %47, %44 ], [ %57, %49 ], [ %39, %35 ]
%61 = fmul double %59, %5
%62 = tail call double @sqrt(double %61)
%63 = fsub double %28, %62
br label %130
64: ; preds = %9
%65 = fdiv double %28, %14
%66 = fmul double %14, %65
%67 = fmul double %3, %3
%68 = tail call double @llvm.fmuladd.f64(double %66, double %65, double %67)
%69 = tail call double @llvm.fmuladd.f64(double %68, double 5.000000e-01, double %5)
%70 = fsub double %69, %26
%71 = fmul double %28, %65
%72 = fcmp ugt double %70, %71
br i1 %72, label %77, label %73
73: ; preds = %64
%74 = fmul double %14, 2.000000e+00
%75 = fmul double %74, %5
%76 = tail call double @sqrt(double %75)
br label %124
77: ; preds = %64
%78 = fneg double %27
%79 = tail call double @llvm.fmuladd.f64(double %78, double %65, double %70)
%80 = fcmp ugt double %79, 0.000000e+00
br i1 %80, label %83, label %81
81: ; preds = %77
%82 = fdiv double %70, %65
br label %124
83: ; preds = %77
%84 = fsub double %69, %23
%85 = fsub double %65, %21
%86 = fneg double %24
%87 = tail call double @llvm.fmuladd.f64(double %86, double %85, double %84)
%88 = fcmp ugt double %87, 0.000000e+00
br i1 %88, label %96, label %89
89: ; preds = %83
%90 = fsub double %0, %1
%91 = fmul double %65, %66
%92 = tail call double @llvm.fmuladd.f64(double %79, double 2.000000e+00, double %91)
%93 = fmul double %14, %92
%94 = tail call double @sqrt(double %93)
%95 = fadd double %90, %94
br label %124
96: ; preds = %83
%97 = fsub double %69, %18
%98 = fsub double %65, %16
%99 = fneg double %19
%100 = tail call double @llvm.fmuladd.f64(double %99, double %98, double %97)
%101 = fcmp ugt double %100, 0.000000e+00
br i1 %101, label %112, label %102
102: ; preds = %96
%103 = fmul double %65, -2.000000e+00
%104 = fmul double %21, %103
%105 = tail call double @llvm.fmuladd.f64(double %87, double 2.000000e+00, double %104)
%106 = tail call double @llvm.fmuladd.f64(double %21, double %21, double %105)
%107 = tail call double @llvm.fmuladd.f64(double %65, double %65, double %106)
%108 = tail call double @sqrt(double %107)
%109 = fadd double %65, %108
%110 = fdiv double %106, %109
%111 = fadd double %110, %0
br label %124
112: ; preds = %96
%113 = fmul double %14, %2
%114 = fdiv double %113, %4
%115 = fadd double %28, %114
%116 = fsub double %0, %1
%117 = fsub double %2, %3
%118 = tail call double @llvm.fmuladd.f64(double %4, double %117, double %116)
%119 = fmul double %14, 2.000000e+00
%120 = fmul double %115, %115
%121 = tail call double @llvm.fmuladd.f64(double %119, double %100, double %120)
%122 = tail call double @sqrt(double %121)
%123 = fadd double %118, %122
br label %124
124: ; preds = %81, %102, %112, %89, %73
%125 = phi double [ %76, %73 ], [ %82, %81 ], [ %95, %89 ], [ %111, %102 ], [ %123, %112 ]
%126 = fmul double %14, 2.000000e+00
%127 = fmul double %126, %5
%128 = tail call double @sqrt(double %127)
%129 = fneg double %128
br label %130
130: ; preds = %124, %58
%131 = phi double [ %60, %58 ], [ %125, %124 ]
%132 = phi double [ %63, %58 ], [ %129, %124 ]
%133 = phi double [ 0.000000e+00, %58 ], [ %65, %124 ]
store double %133, double* %6
store double %131, double* %7
store double %132, double* %8
ret void
}