79 3, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3,
80 -3, 1, 1, 1, -1, 3, 1, 1, -1, 1, 3, 1, -1, 1, 1, 3,
81 3, -1, 1, 1, 1, -3, 1, 1, 1, -1, 3, 1, 1, -1, 1, 3,
82 -3, -1, 1, 1, -1, -3, 1, 1, -1, -1, 3, 1, -1, -1, 1, 3,
83 3, 1, -1, 1, 1, 3, -1, 1, 1, 1, -3, 1, 1, 1, -1, 3,
84 -3, 1, -1, 1, -1, 3, -1, 1, -1, 1, -3, 1, -1, 1, -1, 3,
85 3, -1, -1, 1, 1, -3, -1, 1, 1, -1, -3, 1, 1, -1, -1, 3,
86 -3, -1, -1, 1, -1, -3, -1, 1, -1, -1, -3, 1, -1, -1, -1, 3,
87 3, 1, 1, -1, 1, 3, 1, -1, 1, 1, 3, -1, 1, 1, 1, -3,
88 -3, 1, 1, -1, -1, 3, 1, -1, -1, 1, 3, -1, -1, 1, 1, -3,
89 3, -1, 1, -1, 1, -3, 1, -1, 1, -1, 3, -1, 1, -1, 1, -3,
90 -3, -1, 1, -1, -1, -3, 1, -1, -1, -1, 3, -1, -1, -1, 1, -3,
91 3, 1, -1, -1, 1, 3, -1, -1, 1, 1, -3, -1, 1, 1, -1, -3,
92 -3, 1, -1, -1, -1, 3, -1, -1, -1, 1, -3, -1, -1, 1, -1, -3,
93 3, -1, -1, -1, 1, -3, -1, -1, 1, -1, -3, -1, 1, -1, -1, -3,
94 -3, -1, -1, -1, -1, -3, -1, -1, -1, -1, -3, -1, -1, -1, -1, -3,
358 double xs = x + stretchOffset;
359 double ys = y + stretchOffset;
360 double zs = z + stretchOffset;
369 double xb = xsb + squishOffset;
370 double yb = ysb + squishOffset;
371 double zb = zsb + squishOffset;
374 double xins = xs - xsb;
375 double yins = ys - ysb;
376 double zins = zs - zsb;
379 double inSum = xins + yins + zins;
387 double dx_ext0, dy_ext0, dz_ext0;
388 double dx_ext1, dy_ext1, dz_ext1;
389 int xsv_ext0, ysv_ext0, zsv_ext0;
390 int xsv_ext1, ysv_ext1, zsv_ext1;
394 int8_t aPoint, bPoint;
395 double aScore, bScore;
400 double attn0, attn1, attn2, attn3, attn4, attn5, attn6;
401 double dx1, dy1, dz1;
402 double dx2, dy2, dz2;
403 double dx3, dy3, dz3;
404 double dx4, dy4, dz4;
405 double dx5, dy5, dz5;
406 double dx6, dy6, dz6;
407 double attn_ext0, attn_ext1;
417 if (aScore >= bScore && zins > bScore) {
420 }
else if (aScore < bScore && zins > aScore) {
428 if (wins > aScore || wins > bScore) {
429 c = (bScore > aScore ? bPoint : aPoint);
431 if ((c & 0x01) == 0) {
437 xsv_ext0 = xsv_ext1 = xsb + 1;
438 dx_ext0 = dx_ext1 = dx0 - 1;
441 if ((c & 0x02) == 0) {
442 ysv_ext0 = ysv_ext1 = ysb;
443 dy_ext0 = dy_ext1 = dy0;
444 if ((c & 0x01) == 0) {
452 ysv_ext0 = ysv_ext1 = ysb + 1;
453 dy_ext0 = dy_ext1 = dy0 - 1;
456 if ((c & 0x04) == 0) {
462 zsv_ext0 = zsv_ext1 = zsb + 1;
463 dz_ext0 = dz_ext1 = dz0 - 1;
466 c = (int8_t)(aPoint | bPoint);
468 if ((c & 0x01) == 0) {
474 xsv_ext0 = xsv_ext1 = xsb + 1;
479 if ((c & 0x02) == 0) {
485 ysv_ext0 = ysv_ext1 = ysb + 1;
490 if ((c & 0x04) == 0) {
496 zsv_ext0 = zsv_ext1 = zsb + 1;
503 attn0 = 2 - dx0 * dx0 - dy0 * dy0 - dz0 * dz0;
506 value += attn0 * attn0 *
extrapolate3(ctx, xsb + 0, ysb + 0, zsb + 0, dx0, dy0, dz0);
513 attn1 = 2 - dx1 * dx1 - dy1 * dy1 - dz1 * dz1;
516 value += attn1 * attn1 *
extrapolate3(ctx, xsb + 1, ysb + 0, zsb + 0, dx1, dy1, dz1);
523 attn2 = 2 - dx2 * dx2 - dy2 * dy2 - dz2 * dz2;
526 value += attn2 * attn2 *
extrapolate3(ctx, xsb + 0, ysb + 1, zsb + 0, dx2, dy2, dz2);
533 attn3 = 2 - dx3 * dx3 - dy3 * dy3 - dz3 * dz3;
536 value += attn3 * attn3 *
extrapolate3(ctx, xsb + 0, ysb + 0, zsb + 1, dx3, dy3, dz3);
538 }
else if (inSum >= 2) {
545 if (aScore <= bScore && zins < bScore) {
548 }
else if (aScore > bScore && zins < aScore) {
556 if (wins < aScore || wins < bScore) {
557 c = (bScore < aScore ? bPoint : aPoint);
559 if ((c & 0x01) != 0) {
565 xsv_ext0 = xsv_ext1 = xsb;
569 if ((c & 0x02) != 0) {
570 ysv_ext0 = ysv_ext1 = ysb + 1;
572 if ((c & 0x01) != 0) {
580 ysv_ext0 = ysv_ext1 = ysb;
584 if ((c & 0x04) != 0) {
590 zsv_ext0 = zsv_ext1 = zsb;
594 c = (int8_t)(aPoint & bPoint);
596 if ((c & 0x01) != 0) {
602 xsv_ext0 = xsv_ext1 = xsb;
607 if ((c & 0x02) != 0) {
613 ysv_ext0 = ysv_ext1 = ysb;
618 if ((c & 0x04) != 0) {
624 zsv_ext0 = zsv_ext1 = zsb;
634 attn3 = 2 - dx3 * dx3 - dy3 * dy3 - dz3 * dz3;
637 value += attn3 * attn3 *
extrapolate3(ctx, xsb + 1, ysb + 1, zsb + 0, dx3, dy3, dz3);
644 attn2 = 2 - dx2 * dx2 - dy2 * dy2 - dz2 * dz2;
647 value += attn2 * attn2 *
extrapolate3(ctx, xsb + 1, ysb + 0, zsb + 1, dx2, dy2, dz2);
654 attn1 = 2 - dx1 * dx1 - dy1 * dy1 - dz1 * dz1;
657 value += attn1 * attn1 *
extrapolate3(ctx, xsb + 0, ysb + 1, zsb + 1, dx1, dy1, dz1);
664 attn0 = 2 - dx0 * dx0 - dy0 * dy0 - dz0 * dz0;
667 value += attn0 * attn0 *
extrapolate3(ctx, xsb + 1, ysb + 1, zsb + 1, dx0, dy0, dz0);
698 if (aScore <= bScore && aScore < score) {
702 }
else if (aScore > bScore && bScore < score) {
709 if (aScore <= bScore && aScore < score) {
713 }
else if (aScore > bScore && bScore < score) {
721 if (aIsFurtherSide == bIsFurtherSide) {
722 if (aIsFurtherSide) {
733 c = (int8_t)(aPoint & bPoint);
734 if ((c & 0x01) != 0) {
741 }
else if ((c & 0x02) != 0) {
767 c = (int8_t)(aPoint | bPoint);
768 if ((c & 0x01) == 0) {
775 }
else if ((c & 0x02) == 0) {
792 if (aIsFurtherSide) {
801 if ((c1 & 0x01) == 0) {
808 }
else if ((c1 & 0x02) == 0) {
831 if ((c2 & 0x01) != 0) {
834 }
else if ((c2 & 0x02) != 0) {
847 attn1 = 2 - dx1 * dx1 - dy1 * dy1 - dz1 * dz1;
850 value += attn1 * attn1 *
extrapolate3(ctx, xsb + 1, ysb + 0, zsb + 0, dx1, dy1, dz1);
857 attn2 = 2 - dx2 * dx2 - dy2 * dy2 - dz2 * dz2;
860 value += attn2 * attn2 *
extrapolate3(ctx, xsb + 0, ysb + 1, zsb + 0, dx2, dy2, dz2);
867 attn3 = 2 - dx3 * dx3 - dy3 * dy3 - dz3 * dz3;
870 value += attn3 * attn3 *
extrapolate3(ctx, xsb + 0, ysb + 0, zsb + 1, dx3, dy3, dz3);
877 attn4 = 2 - dx4 * dx4 - dy4 * dy4 - dz4 * dz4;
880 value += attn4 * attn4 *
extrapolate3(ctx, xsb + 1, ysb + 1, zsb + 0, dx4, dy4, dz4);
887 attn5 = 2 - dx5 * dx5 - dy5 * dy5 - dz5 * dz5;
890 value += attn5 * attn5 *
extrapolate3(ctx, xsb + 1, ysb + 0, zsb + 1, dx5, dy5, dz5);
897 attn6 = 2 - dx6 * dx6 - dy6 * dy6 - dz6 * dz6;
900 value += attn6 * attn6 *
extrapolate3(ctx, xsb + 0, ysb + 1, zsb + 1, dx6, dy6, dz6);
905 attn_ext0 = 2 - dx_ext0 * dx_ext0 - dy_ext0 * dy_ext0 - dz_ext0 * dz_ext0;
908 attn_ext0 *= attn_ext0;
909 value += attn_ext0 * attn_ext0 *
extrapolate3(ctx, xsv_ext0, ysv_ext0, zsv_ext0, dx_ext0, dy_ext0, dz_ext0);
913 attn_ext1 = 2 - dx_ext1 * dx_ext1 - dy_ext1 * dy_ext1 - dz_ext1 * dz_ext1;
916 attn_ext1 *= attn_ext1;
917 value += attn_ext1 * attn_ext1 *
extrapolate3(ctx, xsv_ext1, ysv_ext1, zsv_ext1, dx_ext1, dy_ext1, dz_ext1);
929 double dx1, dy1, dz1, dw1;
930 double dx2, dy2, dz2, dw2;
931 double dx3, dy3, dz3, dw3;
932 double dx4, dy4, dz4, dw4;
933 double dx5, dy5, dz5, dw5;
934 double dx6, dy6, dz6, dw6;
935 double dx7, dy7, dz7, dw7;
936 double dx8, dy8, dz8, dw8;
937 double dx9, dy9, dz9, dw9;
938 double dx10, dy10, dz10, dw10;
939 double attn0, attn1, attn2, attn3, attn4;
940 double attn5, attn6, attn7, attn8, attn9, attn10;
941 double attn_ext0, attn_ext1, attn_ext2;
943 int8_t aPoint, bPoint;
944 double aScore, bScore;
952 double xs = x + stretchOffset;
953 double ys = y + stretchOffset;
954 double zs = z + stretchOffset;
955 double ws = w + stretchOffset;
965 double xb = xsb + squishOffset;
966 double yb = ysb + squishOffset;
967 double zb = zsb + squishOffset;
968 double wb = wsb + squishOffset;
971 double xins = xs - xsb;
972 double yins = ys - ysb;
973 double zins = zs - zsb;
974 double wins = ws - wsb;
977 double inSum = xins + yins + zins + wins;
986 double dx_ext0, dy_ext0, dz_ext0, dw_ext0;
987 double dx_ext1, dy_ext1, dz_ext1, dw_ext1;
988 double dx_ext2, dy_ext2, dz_ext2, dw_ext2;
989 int xsv_ext0, ysv_ext0, zsv_ext0, wsv_ext0;
990 int xsv_ext1, ysv_ext1, zsv_ext1, wsv_ext1;
991 int xsv_ext2, ysv_ext2, zsv_ext2, wsv_ext2;
1001 if (aScore >= bScore && zins > bScore) {
1004 }
else if (aScore < bScore && zins > aScore) {
1008 if (aScore >= bScore && wins > bScore) {
1011 }
else if (aScore < bScore && wins > aScore) {
1019 if (uins > aScore || uins > bScore) {
1020 c = (bScore > aScore ? bPoint : aPoint);
1021 if ((c & 0x01) == 0) {
1023 xsv_ext1 = xsv_ext2 = xsb;
1025 dx_ext1 = dx_ext2 = dx0;
1027 xsv_ext0 = xsv_ext1 = xsv_ext2 = xsb + 1;
1028 dx_ext0 = dx_ext1 = dx_ext2 = dx0 - 1;
1031 if ((c & 0x02) == 0) {
1032 ysv_ext0 = ysv_ext1 = ysv_ext2 = ysb;
1033 dy_ext0 = dy_ext1 = dy_ext2 = dy0;
1034 if ((c & 0x01) == 0x01) {
1042 ysv_ext0 = ysv_ext1 = ysv_ext2 = ysb + 1;
1043 dy_ext0 = dy_ext1 = dy_ext2 = dy0 - 1;
1046 if ((c & 0x04) == 0) {
1047 zsv_ext0 = zsv_ext1 = zsv_ext2 = zsb;
1048 dz_ext0 = dz_ext1 = dz_ext2 = dz0;
1049 if ((c & 0x03) != 0) {
1050 if ((c & 0x03) == 0x03) {
1062 zsv_ext0 = zsv_ext1 = zsv_ext2 = zsb + 1;
1063 dz_ext0 = dz_ext1 = dz_ext2 = dz0 - 1;
1066 if ((c & 0x08) == 0) {
1067 wsv_ext0 = wsv_ext1 = wsb;
1069 dw_ext0 = dw_ext1 = dw0;
1072 wsv_ext0 = wsv_ext1 = wsv_ext2 = wsb + 1;
1073 dw_ext0 = dw_ext1 = dw_ext2 = dw0 - 1;
1076 c = (int8_t)(aPoint | bPoint);
1078 if ((c & 0x01) == 0) {
1079 xsv_ext0 = xsv_ext2 = xsb;
1085 xsv_ext0 = xsv_ext1 = xsv_ext2 = xsb + 1;
1090 if ((c & 0x02) == 0) {
1091 ysv_ext0 = ysv_ext1 = ysv_ext2 = ysb;
1094 if ((c & 0x01) == 0x01) {
1102 ysv_ext0 = ysv_ext1 = ysv_ext2 = ysb + 1;
1107 if ((c & 0x04) == 0) {
1108 zsv_ext0 = zsv_ext1 = zsv_ext2 = zsb;
1111 if ((c & 0x03) == 0x03) {
1119 zsv_ext0 = zsv_ext1 = zsv_ext2 = zsb + 1;
1124 if ((c & 0x08) == 0) {
1125 wsv_ext0 = wsv_ext1 = wsb;
1131 wsv_ext0 = wsv_ext1 = wsv_ext2 = wsb + 1;
1138 attn0 = 2 - dx0 * dx0 - dy0 * dy0 - dz0 * dz0 - dw0 * dw0;
1141 value += attn0 * attn0 *
extrapolate4(ctx, xsb + 0, ysb + 0, zsb + 0, wsb + 0, dx0, dy0, dz0, dw0);
1149 attn1 = 2 - dx1 * dx1 - dy1 * dy1 - dz1 * dz1 - dw1 * dw1;
1152 value += attn1 * attn1 *
extrapolate4(ctx, xsb + 1, ysb + 0, zsb + 0, wsb + 0, dx1, dy1, dz1, dw1);
1160 attn2 = 2 - dx2 * dx2 - dy2 * dy2 - dz2 * dz2 - dw2 * dw2;
1163 value += attn2 * attn2 *
extrapolate4(ctx, xsb + 0, ysb + 1, zsb + 0, wsb + 0, dx2, dy2, dz2, dw2);
1171 attn3 = 2 - dx3 * dx3 - dy3 * dy3 - dz3 * dz3 - dw3 * dw3;
1174 value += attn3 * attn3 *
extrapolate4(ctx, xsb + 0, ysb + 0, zsb + 1, wsb + 0, dx3, dy3, dz3, dw3);
1182 attn4 = 2 - dx4 * dx4 - dy4 * dy4 - dz4 * dz4 - dw4 * dw4;
1185 value += attn4 * attn4 *
extrapolate4(ctx, xsb + 0, ysb + 0, zsb + 0, wsb + 1, dx4, dy4, dz4, dw4);
1187 }
else if (inSum >= 3) {
1193 if (aScore <= bScore && zins < bScore) {
1196 }
else if (aScore > bScore && zins < aScore) {
1200 if (aScore <= bScore && wins < bScore) {
1203 }
else if (aScore > bScore && wins < aScore) {
1211 if (uins < aScore || uins < bScore) {
1212 c = (bScore < aScore ? bPoint : aPoint);
1214 if ((c & 0x01) != 0) {
1216 xsv_ext1 = xsv_ext2 = xsb + 1;
1220 xsv_ext0 = xsv_ext1 = xsv_ext2 = xsb;
1224 if ((c & 0x02) != 0) {
1225 ysv_ext0 = ysv_ext1 = ysv_ext2 = ysb + 1;
1227 if ((c & 0x01) != 0) {
1235 ysv_ext0 = ysv_ext1 = ysv_ext2 = ysb;
1239 if ((c & 0x04) != 0) {
1240 zsv_ext0 = zsv_ext1 = zsv_ext2 = zsb + 1;
1242 if ((c & 0x03) != 0x03) {
1243 if ((c & 0x03) == 0) {
1255 zsv_ext0 = zsv_ext1 = zsv_ext2 = zsb;
1259 if ((c & 0x08) != 0) {
1260 wsv_ext0 = wsv_ext1 = wsb + 1;
1265 wsv_ext0 = wsv_ext1 = wsv_ext2 = wsb;
1269 c = (int8_t)(aPoint & bPoint);
1271 if ((c & 0x01) != 0) {
1272 xsv_ext0 = xsv_ext2 = xsb + 1;
1278 xsv_ext0 = xsv_ext1 = xsv_ext2 = xsb;
1283 if ((c & 0x02) != 0) {
1284 ysv_ext0 = ysv_ext1 = ysv_ext2 = ysb + 1;
1287 if ((c & 0x01) != 0) {
1295 ysv_ext0 = ysv_ext1 = ysv_ext2 = ysb;
1300 if ((c & 0x04) != 0) {
1301 zsv_ext0 = zsv_ext1 = zsv_ext2 = zsb + 1;
1304 if ((c & 0x03) != 0) {
1312 zsv_ext0 = zsv_ext1 = zsv_ext2 = zsb;
1317 if ((c & 0x08) != 0) {
1318 wsv_ext0 = wsv_ext1 = wsb + 1;
1324 wsv_ext0 = wsv_ext1 = wsv_ext2 = wsb;
1335 attn4 = 2 - dx4 * dx4 - dy4 * dy4 - dz4 * dz4 - dw4 * dw4;
1338 value += attn4 * attn4 *
extrapolate4(ctx, xsb + 1, ysb + 1, zsb + 1, wsb + 0, dx4, dy4, dz4, dw4);
1346 attn3 = 2 - dx3 * dx3 - dy3 * dy3 - dz3 * dz3 - dw3 * dw3;
1349 value += attn3 * attn3 *
extrapolate4(ctx, xsb + 1, ysb + 1, zsb + 0, wsb + 1, dx3, dy3, dz3, dw3);
1357 attn2 = 2 - dx2 * dx2 - dy2 * dy2 - dz2 * dz2 - dw2 * dw2;
1360 value += attn2 * attn2 *
extrapolate4(ctx, xsb + 1, ysb + 0, zsb + 1, wsb + 1, dx2, dy2, dz2, dw2);
1368 attn1 = 2 - dx1 * dx1 - dy1 * dy1 - dz1 * dz1 - dw1 * dw1;
1371 value += attn1 * attn1 *
extrapolate4(ctx, xsb + 0, ysb + 1, zsb + 1, wsb + 1, dx1, dy1, dz1, dw1);
1379 attn0 = 2 - dx0 * dx0 - dy0 * dy0 - dz0 * dz0 - dw0 * dw0;
1382 value += attn0 * attn0 *
extrapolate4(ctx, xsb + 1, ysb + 1, zsb + 1, wsb + 1, dx0, dy0, dz0, dw0);
1384 }
else if (inSum <= 2) {
1389 if (xins + yins > zins + wins) {
1390 aScore = xins + yins;
1393 aScore = zins + wins;
1398 if (xins + zins > yins + wins) {
1399 bScore = xins + zins;
1402 bScore = yins + wins;
1407 if (xins + wins > yins + zins) {
1408 score = xins + wins;
1409 if (aScore >= bScore && score > bScore) {
1412 }
else if (aScore < bScore && score > aScore) {
1417 score = yins + zins;
1418 if (aScore >= bScore && score > bScore) {
1421 }
else if (aScore < bScore && score > aScore) {
1428 p1 = 2 - inSum + xins;
1429 if (aScore >= bScore &&
p1 > bScore) {
1433 }
else if (aScore < bScore && p1 > aScore) {
1440 p2 = 2 - inSum + yins;
1441 if (aScore >= bScore &&
p2 > bScore) {
1445 }
else if (aScore < bScore && p2 > aScore) {
1452 p3 = 2 - inSum + zins;
1453 if (aScore >= bScore &&
p3 > bScore) {
1457 }
else if (aScore < bScore && p3 > aScore) {
1464 p4 = 2 - inSum + wins;
1465 if (aScore >= bScore && p4 > bScore) {
1469 }
else if (aScore < bScore && p4 > aScore) {
1476 if (aIsBiggerSide == bIsBiggerSide) {
1477 if (aIsBiggerSide) {
1478 c1 = (int8_t)(aPoint | bPoint);
1479 c2 = (int8_t)(aPoint & bPoint);
1480 if ((c1 & 0x01) == 0) {
1486 xsv_ext0 = xsv_ext1 = xsb + 1;
1491 if ((c1 & 0x02) == 0) {
1497 ysv_ext0 = ysv_ext1 = ysb + 1;
1502 if ((c1 & 0x04) == 0) {
1508 zsv_ext0 = zsv_ext1 = zsb + 1;
1513 if ((c1 & 0x08) == 0) {
1519 wsv_ext0 = wsv_ext1 = wsb + 1;
1533 if ((c2 & 0x01) != 0) {
1536 }
else if ((c2 & 0x02) != 0) {
1539 }
else if ((c2 & 0x04) != 0) {
1559 c = (int8_t)(aPoint | bPoint);
1561 if ((c & 0x01) == 0) {
1567 xsv_ext0 = xsv_ext1 = xsb + 1;
1571 if ((c & 0x02) == 0) {
1572 ysv_ext0 = ysv_ext1 = ysb;
1574 if ((c & 0x01) == 0x01)
1583 ysv_ext0 = ysv_ext1 = ysb + 1;
1587 if ((c & 0x04) == 0) {
1588 zsv_ext0 = zsv_ext1 = zsb;
1590 if ((c & 0x03) == 0x03)
1599 zsv_ext0 = zsv_ext1 = zsb + 1;
1603 if ((c & 0x08) == 0)
1610 wsv_ext0 = wsv_ext1 = wsb + 1;
1616 if (aIsBiggerSide) {
1625 if ((c1 & 0x01) == 0) {
1631 xsv_ext0 = xsv_ext1 = xsb + 1;
1635 if ((c1 & 0x02) == 0) {
1636 ysv_ext0 = ysv_ext1 = ysb;
1638 if ((c1 & 0x01) == 0x01) {
1646 ysv_ext0 = ysv_ext1 = ysb + 1;
1650 if ((c1 & 0x04) == 0) {
1651 zsv_ext0 = zsv_ext1 = zsb;
1653 if ((c1 & 0x03) == 0x03) {
1661 zsv_ext0 = zsv_ext1 = zsb + 1;
1665 if ((c1 & 0x08) == 0) {
1671 wsv_ext0 = wsv_ext1 = wsb + 1;
1684 if ((c2 & 0x01) != 0) {
1687 }
else if ((c2 & 0x02) != 0) {
1690 }
else if ((c2 & 0x04) != 0) {
1704 attn1 = 2 - dx1 * dx1 - dy1 * dy1 - dz1 * dz1 - dw1 * dw1;
1707 value += attn1 * attn1 *
extrapolate4(ctx, xsb + 1, ysb + 0, zsb + 0, wsb + 0, dx1, dy1, dz1, dw1);
1715 attn2 = 2 - dx2 * dx2 - dy2 * dy2 - dz2 * dz2 - dw2 * dw2;
1718 value += attn2 * attn2 *
extrapolate4(ctx, xsb + 0, ysb + 1, zsb + 0, wsb + 0, dx2, dy2, dz2, dw2);
1726 attn3 = 2 - dx3 * dx3 - dy3 * dy3 - dz3 * dz3 - dw3 * dw3;
1729 value += attn3 * attn3 *
extrapolate4(ctx, xsb + 0, ysb + 0, zsb + 1, wsb + 0, dx3, dy3, dz3, dw3);
1737 attn4 = 2 - dx4 * dx4 - dy4 * dy4 - dz4 * dz4 - dw4 * dw4;
1740 value += attn4 * attn4 *
extrapolate4(ctx, xsb + 0, ysb + 0, zsb + 0, wsb + 1, dx4, dy4, dz4, dw4);
1748 attn5 = 2 - dx5 * dx5 - dy5 * dy5 - dz5 * dz5 - dw5 * dw5;
1751 value += attn5 * attn5 *
extrapolate4(ctx, xsb + 1, ysb + 1, zsb + 0, wsb + 0, dx5, dy5, dz5, dw5);
1759 attn6 = 2 - dx6 * dx6 - dy6 * dy6 - dz6 * dz6 - dw6 * dw6;
1762 value += attn6 * attn6 *
extrapolate4(ctx, xsb + 1, ysb + 0, zsb + 1, wsb + 0, dx6, dy6, dz6, dw6);
1770 attn7 = 2 - dx7 * dx7 - dy7 * dy7 - dz7 * dz7 - dw7 * dw7;
1773 value += attn7 * attn7 *
extrapolate4(ctx, xsb + 1, ysb + 0, zsb + 0, wsb + 1, dx7, dy7, dz7, dw7);
1781 attn8 = 2 - dx8 * dx8 - dy8 * dy8 - dz8 * dz8 - dw8 * dw8;
1784 value += attn8 * attn8 *
extrapolate4(ctx, xsb + 0, ysb + 1, zsb + 1, wsb + 0, dx8, dy8, dz8, dw8);
1792 attn9 = 2 - dx9 * dx9 - dy9 * dy9 - dz9 * dz9 - dw9 * dw9;
1795 value += attn9 * attn9 *
extrapolate4(ctx, xsb + 0, ysb + 1, zsb + 0, wsb + 1, dx9, dy9, dz9, dw9);
1803 attn10 = 2 - dx10 * dx10 - dy10 * dy10 - dz10 * dz10 - dw10 * dw10;
1806 value += attn10 * attn10 *
extrapolate4(ctx, xsb + 0, ysb + 0, zsb + 1, wsb + 1, dx10, dy10, dz10, dw10);
1813 if (xins + yins < zins + wins) {
1814 aScore = xins + yins;
1817 aScore = zins + wins;
1822 if (xins + zins < yins + wins) {
1823 bScore = xins + zins;
1826 bScore = yins + wins;
1831 if (xins + wins < yins + zins) {
1832 score = xins + wins;
1833 if (aScore <= bScore && score < bScore) {
1836 }
else if (aScore > bScore && score < aScore) {
1841 score = yins + zins;
1842 if (aScore <= bScore && score < bScore) {
1845 }
else if (aScore > bScore && score < aScore) {
1852 p1 = 3 - inSum + xins;
1853 if (aScore <= bScore &&
p1 < bScore) {
1857 }
else if (aScore > bScore &&
p1 < aScore) {
1864 p2 = 3 - inSum + yins;
1865 if (aScore <= bScore &&
p2 < bScore) {
1869 }
else if (aScore > bScore &&
p2 < aScore) {
1876 p3 = 3 - inSum + zins;
1877 if (aScore <= bScore &&
p3 < bScore) {
1881 }
else if (aScore > bScore &&
p3 < aScore) {
1888 p4 = 3 - inSum + wins;
1889 if (aScore <= bScore && p4 < bScore) {
1893 }
else if (aScore > bScore && p4 < aScore) {
1900 if (aIsBiggerSide == bIsBiggerSide) {
1901 if (aIsBiggerSide) {
1902 c1 = (int8_t)(aPoint & bPoint);
1903 c2 = (int8_t)(aPoint | bPoint);
1906 xsv_ext0 = xsv_ext1 = xsb;
1907 ysv_ext0 = ysv_ext1 = ysb;
1908 zsv_ext0 = zsv_ext1 = zsb;
1909 wsv_ext0 = wsv_ext1 = wsb;
1918 if ((c1 & 0x01) != 0) {
1923 }
else if ((c1 & 0x02) != 0) {
1928 }
else if ((c1 & 0x04) != 0) {
1949 if ((c2 & 0x01) == 0) {
1952 }
else if ((c2 & 0x02) == 0) {
1955 }
else if ((c2 & 0x04) == 0) {
1974 c = (int8_t)(aPoint & bPoint);
1976 if ((c & 0x01) != 0) {
1982 xsv_ext0 = xsv_ext1 = xsb;
1986 if ((c & 0x02) != 0) {
1987 ysv_ext0 = ysv_ext1 = ysb + 1;
1989 if ((c & 0x01) == 0)
1998 ysv_ext0 = ysv_ext1 = ysb;
2002 if ((c & 0x04) != 0) {
2003 zsv_ext0 = zsv_ext1 = zsb + 1;
2005 if ((c & 0x03) == 0)
2014 zsv_ext0 = zsv_ext1 = zsb;
2018 if ((c & 0x08) != 0)
2025 wsv_ext0 = wsv_ext1 = wsb;
2030 if (aIsBiggerSide) {
2039 if ((c1 & 0x01) != 0) {
2045 xsv_ext0 = xsv_ext1 = xsb;
2049 if ((c1 & 0x02) != 0) {
2050 ysv_ext0 = ysv_ext1 = ysb + 1;
2052 if ((c1 & 0x01) == 0) {
2060 ysv_ext0 = ysv_ext1 = ysb;
2064 if ((c1 & 0x04) != 0) {
2065 zsv_ext0 = zsv_ext1 = zsb + 1;
2067 if ((c1 & 0x03) == 0) {
2075 zsv_ext0 = zsv_ext1 = zsb;
2079 if ((c1 & 0x08) != 0) {
2085 wsv_ext0 = wsv_ext1 = wsb;
2098 if ((c2 & 0x01) == 0) {
2101 }
else if ((c2 & 0x02) == 0) {
2104 }
else if ((c2 & 0x04) == 0) {
2118 attn4 = 2 - dx4 * dx4 - dy4 * dy4 - dz4 * dz4 - dw4 * dw4;
2121 value += attn4 * attn4 *
extrapolate4(ctx, xsb + 1, ysb + 1, zsb + 1, wsb + 0, dx4, dy4, dz4, dw4);
2129 attn3 = 2 - dx3 * dx3 - dy3 * dy3 - dz3 * dz3 - dw3 * dw3;
2132 value += attn3 * attn3 *
extrapolate4(ctx, xsb + 1, ysb + 1, zsb + 0, wsb + 1, dx3, dy3, dz3, dw3);
2140 attn2 = 2 - dx2 * dx2 - dy2 * dy2 - dz2 * dz2 - dw2 * dw2;
2143 value += attn2 * attn2 *
extrapolate4(ctx, xsb + 1, ysb + 0, zsb + 1, wsb + 1, dx2, dy2, dz2, dw2);
2151 attn1 = 2 - dx1 * dx1 - dy1 * dy1 - dz1 * dz1 - dw1 * dw1;
2154 value += attn1 * attn1 *
extrapolate4(ctx, xsb + 0, ysb + 1, zsb + 1, wsb + 1, dx1, dy1, dz1, dw1);
2162 attn5 = 2 - dx5 * dx5 - dy5 * dy5 - dz5 * dz5 - dw5 * dw5;
2165 value += attn5 * attn5 *
extrapolate4(ctx, xsb + 1, ysb + 1, zsb + 0, wsb + 0, dx5, dy5, dz5, dw5);
2173 attn6 = 2 - dx6 * dx6 - dy6 * dy6 - dz6 * dz6 - dw6 * dw6;
2176 value += attn6 * attn6 *
extrapolate4(ctx, xsb + 1, ysb + 0, zsb + 1, wsb + 0, dx6, dy6, dz6, dw6);
2184 attn7 = 2 - dx7 * dx7 - dy7 * dy7 - dz7 * dz7 - dw7 * dw7;
2187 value += attn7 * attn7 *
extrapolate4(ctx, xsb + 1, ysb + 0, zsb + 0, wsb + 1, dx7, dy7, dz7, dw7);
2195 attn8 = 2 - dx8 * dx8 - dy8 * dy8 - dz8 * dz8 - dw8 * dw8;
2198 value += attn8 * attn8 *
extrapolate4(ctx, xsb + 0, ysb + 1, zsb + 1, wsb + 0, dx8, dy8, dz8, dw8);
2206 attn9 = 2 - dx9 * dx9 - dy9 * dy9 - dz9 * dz9 - dw9 * dw9;
2209 value += attn9 * attn9 *
extrapolate4(ctx, xsb + 0, ysb + 1, zsb + 0, wsb + 1, dx9, dy9, dz9, dw9);
2217 attn10 = 2 - dx10 * dx10 - dy10 * dy10 - dz10 * dz10 - dw10 * dw10;
2220 value += attn10 * attn10 *
extrapolate4(ctx, xsb + 0, ysb + 0, zsb + 1, wsb + 1, dx10, dy10, dz10, dw10);
2225 attn_ext0 = 2 - dx_ext0 * dx_ext0 - dy_ext0 * dy_ext0 - dz_ext0 * dz_ext0 - dw_ext0 * dw_ext0;
2228 attn_ext0 *= attn_ext0;
2229 value += attn_ext0 * attn_ext0 *
extrapolate4(ctx, xsv_ext0, ysv_ext0, zsv_ext0, wsv_ext0, dx_ext0, dy_ext0, dz_ext0, dw_ext0);
2233 attn_ext1 = 2 - dx_ext1 * dx_ext1 - dy_ext1 * dy_ext1 - dz_ext1 * dz_ext1 - dw_ext1 * dw_ext1;
2236 attn_ext1 *= attn_ext1;
2237 value += attn_ext1 * attn_ext1 *
extrapolate4(ctx, xsv_ext1, ysv_ext1, zsv_ext1, wsv_ext1, dx_ext1, dy_ext1, dz_ext1, dw_ext1);
2241 attn_ext2 = 2 - dx_ext2 * dx_ext2 - dy_ext2 * dy_ext2 - dz_ext2 * dz_ext2 - dw_ext2 * dw_ext2;
2244 attn_ext2 *= attn_ext2;
2245 value += attn_ext2 * attn_ext2 *
extrapolate4(ctx, xsv_ext2, ysv_ext2, zsv_ext2, wsv_ext2, dx_ext2, dy_ext2, dz_ext2, dw_ext2);