#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 acos(double);
double atan(double);
double sqrt(double const);
double subsimplex_void_volume(double x0, double y0, double z0, double rC2,
                              double *surf_area) {
  double V = 0, S = 0;
  const double Vc = x0 * y0 * z0 / 6;
  if (x0 != 0 && y0 != 0 && z0 != 0) {
    double x, a11;
    const double theta = atan(z0 / y0);
    const double rE2 = x0 * x0 + y0 * y0;
    const double rV2 = rE2 + z0 * z0;
    const double rE = sqrt(rE2);
    const double rV = sqrt(rV2);
    const double rC = (rC2 > 0) ? sqrt(rC2) : 0;
    a11 = (y0 * y0 * rV2 - z0 * z0 * x0 * x0) / (rE2 * (y0 * y0 + z0 * z0));
    if (a11 > 1.0)
      a11 = 0;
    else if (a11 < -1.0)
      a11 = 3.14159265358979323846 / 2;
    else
      a11 = acos(a11) * 0.5;
    if (rC <= x0) {
      x = rC * rC * (theta - a11);
      S = x;
      V = rC * x / 3;
    } else if (rC <= rE) {
      x = rC2 * a11;
      S = theta * x0 * rC - x;
      V = 0.5 * theta * x0 * (rC2 - x0 * x0 / 3) - rC * x / 3;
    } else if (rC < rV) {
      double a22, a33, y, x2, y2;
      x2 = rC * (x0 / rE);
      y2 = rC * (y0 / rE);
      a22 = y0 / sqrt(rC2 - x0 * x0);
      if (a22 > 1.0)
        a22 = 0;
      else if (a22 < -1.0)
        a22 = 3.14159265358979323846;
      else
        a22 = acos(a22);
      a33 = (x0 * x0 - x2 * x2 + y2 * y2) / (rC2 - x0 * x0);
      if (a33 > 1.0)
        a33 = 0;
      else if (a33 < -1.0)
        a33 = 3.14159265358979323846 / 2;
      else
        a33 = acos(a33) * 0.5;
      y = rC2 * (a33 - a11);
      x = x0 * (theta - a22);
      S = rC * x + y;
      V = x * (0.5 * rC2 - x0 * x0 / 6) + x0 * y0 * sqrt(rC2 - rE2) / 6 +
          rC * y / 3;
    } else {
      S = 0;
      V = Vc;
    }
  }
  if (surf_area != NULL)
    *surf_area = S;
  return (Vc - V);
}


x86 assembly (clang, -O0):
<subsimplex_void_volume>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    %rdi,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xe86(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11a0 <subsimplex_void_volume+0x70>
jp     11a0 <subsimplex_void_volume+0x70>
jmp    17ef <subsimplex_void_volume+0x6bf>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11bd <subsimplex_void_volume+0x8d>
jp     11bd <subsimplex_void_volume+0x8d>
jmp    17ef <subsimplex_void_volume+0x6bf>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11da <subsimplex_void_volume+0xaa>
jp     11da <subsimplex_void_volume+0xaa>
jmp    17ef <subsimplex_void_volume+0x6bf>
movsd  -0x18(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1040 <atan@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x60(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1272 <subsimplex_void_volume+0x142>
movsd  -0x20(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1282 <subsimplex_void_volume+0x152>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1282 <subsimplex_void_volume+0x152>
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm4
movsd  -0x18(%rbp),%xmm3
mulsd  -0x18(%rbp),%xmm3
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xcfc(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1323 <subsimplex_void_volume+0x1f3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1368 <subsimplex_void_volume+0x238>
movsd  0xce5(%rip),%xmm0
ucomisd -0x50(%rbp),%xmm0
jbe    1348 <subsimplex_void_volume+0x218>
movsd  0xce2(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1363 <subsimplex_void_volume+0x233>
movsd  -0x50(%rbp),%xmm0
call   1030 <acos@plt>
movsd  0xcbe(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1368 <subsimplex_void_volume+0x238>
movsd  -0x80(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     13c3 <subsimplex_void_volume+0x293>
movsd  -0x80(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
subsd  -0x50(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x80(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  0xc7b(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    17ea <subsimplex_void_volume+0x6ba>
movsd  -0x80(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     148e <subsimplex_void_volume+0x35e>
movsd  -0x20(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xbf2(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xbe9(%rip),%xmm3
divsd  %xmm3,%xmm1
subsd  %xmm1,%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movsd  0xbcf(%rip),%xmm3
divsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    17e5 <subsimplex_void_volume+0x6b5>
movsd  -0x80(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    17ce <subsimplex_void_volume+0x69e>
movsd  -0x80(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
divsd  -0x70(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
divsd  -0x70(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x20(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  0xac9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1559 <subsimplex_void_volume+0x429>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    159e <subsimplex_void_volume+0x46e>
movsd  0xaaf(%rip),%xmm0
ucomisd -0x88(%rbp),%xmm0
ff
jbe    1584 <subsimplex_void_volume+0x454>
movsd  0xab1(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    1599 <subsimplex_void_volume+0x469>
movsd  -0x88(%rbp),%xmm0
ff
call   1030 <acos@plt>
movsd  %xmm0,-0x88(%rbp)
ff
jmp    159e <subsimplex_void_volume+0x46e>
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xa0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm3
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  0x9cf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1653 <subsimplex_void_volume+0x523>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    16a4 <subsimplex_void_volume+0x574>
movsd  0x9b5(%rip),%xmm0
ucomisd -0x90(%rbp),%xmm0
ff
jbe    167e <subsimplex_void_volume+0x54e>
movsd  0x9af(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    169f <subsimplex_void_volume+0x56f>
movsd  -0x90(%rbp),%xmm0
ff
call   1030 <acos@plt>
movsd  0x985(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    16a4 <subsimplex_void_volume+0x574>
movsd  -0x20(%rbp),%xmm0
movsd  -0x90(%rbp),%xmm1
ff
subsd  -0x50(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
subsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0x8e0(%rip),%xmm2
divsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0x8d5(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  -0xd0(%rbp),%xmm1
ff
movsd  -0xc8(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
movsd  0x865(%rip),%xmm3
divsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x80(%rbp),%xmm1
mulsd  -0x98(%rbp),%xmm1
ff
movsd  0x874(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    17e0 <subsimplex_void_volume+0x6b0>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    17e5 <subsimplex_void_volume+0x6b5>
jmp    17ea <subsimplex_void_volume+0x6ba>
jmp    17ef <subsimplex_void_volume+0x6bf>
cmpq   $0x0,-0x28(%rbp)
je     1807 <subsimplex_void_volume+0x6d7>
movsd  -0x38(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x40(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subsimplex_void_volume>:
push   %rbx
sub    $0x70,%rsp
movapd %xmm0,%xmm4
mulsd  %xmm1,%xmm0
movapd %xmm0,%xmm6
mulsd  %xmm2,%xmm6
divsd  0xeb3(%rip),%xmm6
mov    %rdi,%rbx
xorpd  %xmm7,%xmm7
ucomisd %xmm7,%xmm4
jne    1160 <subsimplex_void_volume+0x30>
jnp    1211 <subsimplex_void_volume+0xe1>
movsd  %xmm0,0x68(%rsp)
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    1176 <subsimplex_void_volume+0x46>
jnp    1211 <subsimplex_void_volume+0xe1>
ucomisd %xmm0,%xmm2
xorpd  %xmm0,%xmm0
jne    1186 <subsimplex_void_volume+0x56>
jnp    1679 <subsimplex_void_volume+0x549>
movsd  %xmm3,0x18(%rsp)
movsd  %xmm6,0x30(%rsp)
movapd %xmm2,%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm4,0x8(%rsp)
movsd  %xmm1,(%rsp)
movsd  %xmm2,0x20(%rsp)
call   1040 <atan@plt>
movsd  0x20(%rsp),%xmm3
movsd  %xmm0,0x50(%rsp)
movsd  (%rsp),%xmm4
mulsd  %xmm4,%xmm4
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm1
movapd %xmm1,%xmm0
addsd  %xmm4,%xmm0
mulsd  %xmm3,%xmm3
movapd %xmm3,%xmm2
addsd  %xmm0,%xmm2
xorpd  %xmm5,%xmm5
ucomisd %xmm5,%xmm0
movsd  %xmm1,0x40(%rsp)
movsd  %xmm0,0x60(%rsp)
movsd  %xmm3,0x20(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm4,0x48(%rsp)
jb     121a <subsimplex_void_volume+0xea>
sqrtsd %xmm0,%xmm0
jmp    1229 <subsimplex_void_volume+0xf9>
xorpd  %xmm0,%xmm0
jmp    1679 <subsimplex_void_volume+0x549>
call   1050 <sqrt@plt>
xorpd  %xmm5,%xmm5
movsd  0x10(%rsp),%xmm2
ucomisd %xmm5,%xmm2
movsd  %xmm0,0x38(%rsp)
jb     123c <subsimplex_void_volume+0x10c>
sqrtsd %xmm2,%xmm11
jmp    1250 <subsimplex_void_volume+0x120>
movapd %xmm2,%xmm0
call   1050 <sqrt@plt>
movsd  0x10(%rsp),%xmm2
movapd %xmm0,%xmm11
movsd  0x30(%rsp),%xmm6
movsd  0x18(%rsp),%xmm10
movsd  0x8(%rsp),%xmm4
movsd  (%rsp),%xmm9
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm10
xorpd  %xmm5,%xmm5
jbe    12cc <subsimplex_void_volume+0x19c>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm10
jb     128d <subsimplex_void_volume+0x15d>
xorps  %xmm5,%xmm5
sqrtsd %xmm10,%xmm5
jmp    12cc <subsimplex_void_volume+0x19c>
movapd %xmm10,%xmm0
movsd  %xmm11,0x58(%rsp)
call   1050 <sqrt@plt>
movsd  0x58(%rsp),%xmm11
movsd  0x10(%rsp),%xmm2
xorpd  %xmm1,%xmm1
movsd  (%rsp),%xmm9
movsd  0x8(%rsp),%xmm4
movsd  0x18(%rsp),%xmm10
movsd  0x30(%rsp),%xmm6
movapd %xmm0,%xmm5
movsd  0x20(%rsp),%xmm7
movapd %xmm7,%xmm0
mulsd  %xmm4,%xmm0
mulsd  %xmm4,%xmm0
movsd  0x48(%rsp),%xmm3
mulsd  %xmm3,%xmm2
subsd  %xmm0,%xmm2
addsd  %xmm7,%xmm3
mulsd  0x60(%rsp),%xmm3
divsd  %xmm3,%xmm2
ucomisd 0xd06(%rip),%xmm2
ja     131a <subsimplex_void_volume+0x1ea>
movsd  0xd0c(%rip),%xmm0
ucomisd %xmm2,%xmm0
jbe    1391 <subsimplex_void_volume+0x261>
movsd  0xcf6(%rip),%xmm1
ucomisd %xmm5,%xmm4
jae    13e3 <subsimplex_void_volume+0x2b3>
movsd  0x38(%rsp),%xmm8
ucomisd %xmm5,%xmm8
jae    140e <subsimplex_void_volume+0x2de>
xorpd  %xmm7,%xmm7
ucomisd %xmm5,%xmm11
movapd %xmm6,%xmm0
jbe    1679 <subsimplex_void_volume+0x549>
movsd  %xmm1,0x20(%rsp)
movapd %xmm4,%xmm7
divsd  %xmm8,%xmm7
movapd %xmm9,%xmm3
divsd  %xmm8,%xmm3
movapd %xmm10,%xmm1
movsd  0x40(%rsp),%xmm6
subsd  %xmm6,%xmm1
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
movsd  %xmm5,0x28(%rsp)
jb     1465 <subsimplex_void_volume+0x335>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    14b5 <subsimplex_void_volume+0x385>
movapd %xmm2,%xmm0
movsd  %xmm5,0x28(%rsp)
movsd  %xmm11,0x58(%rsp)
call   1030 <acos@plt>
movsd  0x58(%rsp),%xmm11
movsd  (%rsp),%xmm9
movsd  0x28(%rsp),%xmm5
movsd  0x8(%rsp),%xmm4
movsd  0x18(%rsp),%xmm10
movsd  0x30(%rsp),%xmm6
movapd %xmm0,%xmm1
mulsd  0xc47(%rip),%xmm1
ucomisd %xmm5,%xmm4
jb     1324 <subsimplex_void_volume+0x1f4>
movapd %xmm5,%xmm0
mulsd  %xmm5,%xmm0
movsd  0x50(%rsp),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm2,%xmm5
divsd  0xc23(%rip),%xmm5
movapd %xmm2,%xmm7
jmp    1675 <subsimplex_void_volume+0x545>
mulsd  %xmm10,%xmm1
movsd  0x50(%rsp),%xmm2
movapd %xmm2,%xmm7
mulsd  %xmm4,%xmm7
mulsd  %xmm5,%xmm7
subsd  %xmm1,%xmm7
mulsd  0xbef(%rip),%xmm2
mulsd  %xmm4,%xmm2
movsd  0xbf3(%rip),%xmm0
movsd  0x40(%rsp),%xmm4
divsd  %xmm0,%xmm4
addsd  %xmm10,%xmm4
mulsd  %xmm2,%xmm4
mulsd  %xmm5,%xmm1
divsd  %xmm0,%xmm1
addsd  %xmm4,%xmm1
movapd %xmm1,%xmm0
jmp    1679 <subsimplex_void_volume+0x549>
movapd %xmm1,%xmm0
movsd  %xmm3,0x10(%rsp)
movsd  %xmm1,0x48(%rsp)
movsd  %xmm7,0x38(%rsp)
call   1050 <sqrt@plt>
movsd  0x38(%rsp),%xmm7
movsd  0x48(%rsp),%xmm1
movsd  0x10(%rsp),%xmm3
xorpd  %xmm2,%xmm2
movsd  (%rsp),%xmm9
movsd  0x28(%rsp),%xmm5
movsd  0x40(%rsp),%xmm6
movsd  0x8(%rsp),%xmm4
movsd  0x18(%rsp),%xmm10
mulsd  %xmm5,%xmm7
mulsd  %xmm5,%xmm3
divsd  %xmm0,%xmm9
ucomisd 0xb3d(%rip),%xmm9
ja     1531 <subsimplex_void_volume+0x401>
movsd  0xb43(%rip),%xmm0
ucomisd %xmm9,%xmm0
jbe    14e6 <subsimplex_void_volume+0x3b6>
movsd  0xb54(%rip),%xmm2
jmp    1531 <subsimplex_void_volume+0x401>
movapd %xmm9,%xmm0
movsd  %xmm3,0x10(%rsp)
movsd  %xmm1,0x48(%rsp)
movsd  %xmm7,0x38(%rsp)
call   1030 <acos@plt>
movsd  0x38(%rsp),%xmm7
movsd  0x48(%rsp),%xmm1
movsd  0x10(%rsp),%xmm3
movsd  0x28(%rsp),%xmm5
movsd  0x40(%rsp),%xmm6
movsd  0x8(%rsp),%xmm4
movsd  0x18(%rsp),%xmm10
movapd %xmm0,%xmm2
mulsd  %xmm7,%xmm7
movapd %xmm6,%xmm0
subsd  %xmm7,%xmm0
mulsd  %xmm3,%xmm3
addsd  %xmm0,%xmm3
divsd  %xmm1,%xmm3
xorpd  %xmm8,%xmm8
ucomisd 0xab2(%rip),%xmm3
xorpd  %xmm1,%xmm1
ja     15b1 <subsimplex_void_volume+0x481>
movsd  0xab4(%rip),%xmm0
ucomisd %xmm3,%xmm0
jbe    1574 <subsimplex_void_volume+0x444>
movsd  0xa9e(%rip),%xmm1
jmp    15b1 <subsimplex_void_volume+0x481>
movapd %xmm3,%xmm0
movsd  %xmm2,(%rsp)
call   1030 <acos@plt>
xorpd  %xmm8,%xmm8
movsd  (%rsp),%xmm2
movsd  0x28(%rsp),%xmm5
movsd  0x40(%rsp),%xmm6
movsd  0x8(%rsp),%xmm4
movsd  0x18(%rsp),%xmm10
movapd %xmm0,%xmm1
mulsd  0xa6f(%rip),%xmm1
subsd  0x20(%rsp),%xmm1
mulsd  %xmm10,%xmm1
movsd  0x50(%rsp),%xmm0
subsd  %xmm2,%xmm0
mulsd  %xmm4,%xmm0
movapd %xmm5,%xmm7
movsd  %xmm0,0x50(%rsp)
mulsd  %xmm0,%xmm7
divsd  0xa60(%rip),%xmm6
movsd  0xa38(%rip),%xmm3
mulsd  %xmm10,%xmm3
addsd  %xmm6,%xmm3
subsd  0x60(%rsp),%xmm10
ucomisd %xmm8,%xmm10
jb     1609 <subsimplex_void_volume+0x4d9>
xorps  %xmm0,%xmm0
sqrtsd %xmm10,%xmm0
jmp    163b <subsimplex_void_volume+0x50b>
movapd %xmm10,%xmm0
movsd  %xmm7,0x20(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm3,(%rsp)
call   1050 <sqrt@plt>
movsd  (%rsp),%xmm3
movsd  0x8(%rsp),%xmm1
movsd  0x20(%rsp),%xmm7
movsd  0x28(%rsp),%xmm5
movsd  0x30(%rsp),%xmm6
addsd  %xmm1,%xmm7
movsd  0x68(%rsp),%xmm2
mulsd  %xmm0,%xmm2
divsd  0x9a9(%rip),%xmm2
movsd  0x50(%rsp),%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm5
divsd  0x9b7(%rip),%xmm5
addsd  %xmm0,%xmm5
movapd %xmm5,%xmm0
test   %rbx,%rbx
je     1682 <subsimplex_void_volume+0x552>
movsd  %xmm7,(%rbx)
subsd  %xmm0,%xmm6
movapd %xmm6,%xmm0
add    $0x70,%rsp
pop    %rbx
ret

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

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