   {
     return make_float2(__fmaf_rn(float(1 << 4), z1.x, z0.x),
                        __fmaf_rn(float(1 << 4), z1.y, z0.y));
+  }
+  __device__ __forceinline__ uint32_t piercingAxesFromCase(uint32_t c)
+  {
+    return ((((c & 1) << 1) |
+             ((c & 1) << 2) |
+             ((c & 1) << 4) ) ^ c ) & 0b10110;
   }
 
   __device__ __forceinline__ uint32_t axisCountFromCase(const uint32_t c)

                            field_slice_stride,
                            i1);

    float t = (threshold - f0.w) / (f1.w - f0.w);

    float nx = scale.x * ((1.f - t) * f0.x + t * f1.x - threshold);
    float ny = scale.y * ((1.f - t) * f0.y + t * f1.y - threshold);

        "  popc.b32 %0, t3;\n"          // Count number of 1's (should be 0..3).
        "}"
        : "=r"(n) :"r"(c));

    unsigned q = piercingAxesFromCase(c);
    assert(((q >> 1) & 1) + ((q >> 2) & 1) + ((q >> 4) & 1) == n);

    unsigned m =
      ((c & 1) ^ ((c >> 1) & 1)) +
