blob: 119081c18ee6567d1b2921170a4e863306eb8c75 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
template<typename T, size_t N>
struct tint_array {
const constant T& operator[](size_t i) const constant { return elements[i]; }
device T& operator[](size_t i) device { return elements[i]; }
const device T& operator[](size_t i) const device { return elements[i]; }
thread T& operator[](size_t i) thread { return elements[i]; }
const thread T& operator[](size_t i) const thread { return elements[i]; }
threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
T elements[N];
};
struct QuicksortObject {
tint_array<int, 10> numbers;
};
struct buf0 {
/* 0x0000 */ float2 resolution;
};
void swap_i1_i1_(thread int* const i, thread int* const j, thread QuicksortObject* const tint_symbol_81) {
int temp = 0;
int const x_932 = temp;
temp = 0;
temp = x_932;
float3 const x_523 = float3(3.0f, 2.0f, 3.0f);
int const x_933 = *(i);
*(i) = 0;
*(i) = x_933;
int const x_28 = *(i);
int const x_934 = *(j);
*(j) = 0;
*(j) = x_934;
float3 const x_524 = float3(x_523[1], x_523[0], x_523[1]);
int const x_935 = temp;
temp = 0;
temp = x_935;
int const x_30_save = x_28;
int const x_936 = (*(tint_symbol_81)).numbers[x_30_save];
(*(tint_symbol_81)).numbers[x_30_save] = 0;
(*(tint_symbol_81)).numbers[x_30_save] = x_936;
int const x_31 = (*(tint_symbol_81)).numbers[x_30_save];
int const x_937 = temp;
temp = 0;
temp = x_937;
temp = x_31;
int const x_938 = *(j);
*(j) = 0;
*(j) = x_938;
float3 const x_525 = float3(x_523[2], 1.0f, x_523[1]);
int const x_939 = *(i);
*(i) = 0;
*(i) = x_939;
int const x_32 = *(i);
int const x_940 = (*(tint_symbol_81)).numbers[x_30_save];
(*(tint_symbol_81)).numbers[x_30_save] = 0;
(*(tint_symbol_81)).numbers[x_30_save] = x_940;
int const x_33 = *(j);
int const x_941 = *(i);
*(i) = 0;
*(i) = x_941;
float3 const x_526 = float3(x_525[0], x_525[2], x_525[2]);
int const x_942 = (*(tint_symbol_81)).numbers[x_30_save];
(*(tint_symbol_81)).numbers[x_30_save] = 0;
(*(tint_symbol_81)).numbers[x_30_save] = x_942;
int const x_34_save = x_33;
int const x_35 = (*(tint_symbol_81)).numbers[x_34_save];
QuicksortObject const x_943 = *(tint_symbol_81);
tint_array<int, 10> const tint_symbol_2 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_3 = {.numbers=tint_symbol_2};
*(tint_symbol_81) = tint_symbol_3;
*(tint_symbol_81) = x_943;
float2 const x_527 = float2(x_526[0], x_526[0]);
int const x_36_save = x_32;
float3 const x_528 = float3(x_524[0], x_524[2], x_524[0]);
(*(tint_symbol_81)).numbers[x_36_save] = x_35;
QuicksortObject const x_944 = *(tint_symbol_81);
tint_array<int, 10> const tint_symbol_4 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_5 = {.numbers=tint_symbol_4};
*(tint_symbol_81) = tint_symbol_5;
*(tint_symbol_81) = x_944;
float3 const x_529 = float3(x_526[1], x_526[2], x_526[0]);
int const x_945 = *(i);
*(i) = 0;
*(i) = x_945;
int const x_37 = *(j);
int const x_946 = temp;
temp = 0;
temp = x_946;
float2 const x_530 = float2(x_529[2], x_529[1]);
int const x_947 = (*(tint_symbol_81)).numbers[x_34_save];
(*(tint_symbol_81)).numbers[x_34_save] = 0;
(*(tint_symbol_81)).numbers[x_34_save] = x_947;
int const x_38 = temp;
int const x_948 = *(j);
*(j) = 0;
*(j) = x_948;
float3 const x_531 = float3(x_527[0], x_526[1], x_526[0]);
int const x_949 = (*(tint_symbol_81)).numbers[x_36_save];
(*(tint_symbol_81)).numbers[x_36_save] = 0;
(*(tint_symbol_81)).numbers[x_36_save] = x_949;
QuicksortObject const x_950 = *(tint_symbol_81);
tint_array<int, 10> const tint_symbol_6 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_7 = {.numbers=tint_symbol_6};
*(tint_symbol_81) = tint_symbol_7;
*(tint_symbol_81) = x_950;
float3 const x_532 = float3(x_528[0], x_528[1], x_528[0]);
int const x_951 = (*(tint_symbol_81)).numbers[x_34_save];
(*(tint_symbol_81)).numbers[x_34_save] = 0;
(*(tint_symbol_81)).numbers[x_34_save] = x_951;
(*(tint_symbol_81)).numbers[x_37] = x_38;
return;
}
int performPartition_i1_i1_(thread int* const l, thread int* const h, thread QuicksortObject* const tint_symbol_82) {
int param_3 = 0;
int i_1 = 0;
int j_1 = 0;
int param_2 = 0;
int param_1 = 0;
int param = 0;
int pivot = 0;
float2 x_537 = 0.0f;
float3 x_538 = 0.0f;
int const x_952 = *(h);
*(h) = 0;
*(h) = x_952;
int const x_41 = *(h);
int const x_953 = *(l);
*(l) = 0;
*(l) = x_953;
int const x_42_save = x_41;
int const x_954 = (*(tint_symbol_82)).numbers[x_42_save];
(*(tint_symbol_82)).numbers[x_42_save] = 0;
(*(tint_symbol_82)).numbers[x_42_save] = x_954;
int const x_43 = (*(tint_symbol_82)).numbers[x_42_save];
int const x_955 = param_3;
param_3 = 0;
param_3 = x_955;
float3 const x_534 = float3(3.0f, 1.0f, 3.0f);
int const x_956 = param_1;
param_1 = 0;
param_1 = x_956;
pivot = x_43;
int const x_45 = *(l);
int const x_957 = *(h);
*(h) = 0;
*(h) = x_957;
int const x_958 = j_1;
j_1 = 0;
j_1 = x_958;
float3 const x_535 = float3(x_534[1], x_534[2], x_534[1]);
int const x_959 = *(l);
*(l) = 0;
*(l) = x_959;
i_1 = as_type<int>((as_type<uint>(x_45) - as_type<uint>(as_type<int>(1u))));
int const x_49 = *(l);
float3 const x_536 = float3(x_534[0], x_534[2], x_535[0]);
j_1 = 10;
QuicksortObject const x_960 = *(tint_symbol_82);
tint_array<int, 10> const tint_symbol_8 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_9 = {.numbers=tint_symbol_8};
*(tint_symbol_82) = tint_symbol_9;
*(tint_symbol_82) = x_960;
while (true) {
int const x_961 = pivot;
pivot = 0;
pivot = x_961;
int const x_962 = param_1;
param_1 = 0;
param_1 = x_962;
int const x_55 = j_1;
int const x_963 = pivot;
pivot = 0;
pivot = x_963;
x_537 = float2(2.0f, 3.0f);
QuicksortObject const x_964 = *(tint_symbol_82);
tint_array<int, 10> const tint_symbol_10 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_11 = {.numbers=tint_symbol_10};
*(tint_symbol_82) = tint_symbol_11;
*(tint_symbol_82) = x_964;
int const x_56 = *(h);
int const x_965 = *(h);
*(h) = 0;
*(h) = x_965;
int const x_966 = param;
param = 0;
param = x_966;
int const x_967 = j_1;
j_1 = 0;
j_1 = x_967;
x_538 = float3(x_534[0], x_537[1], x_534[2]);
int const x_968 = param;
param = 0;
param = x_968;
if ((x_55 <= as_type<int>((as_type<uint>(x_56) - as_type<uint>(as_type<int>(1u)))))) {
} else {
break;
}
int const x_60 = j_1;
int const x_969 = (*(tint_symbol_82)).numbers[x_42_save];
(*(tint_symbol_82)).numbers[x_42_save] = 0;
(*(tint_symbol_82)).numbers[x_42_save] = x_969;
int const x_61_save = x_60;
int const x_970 = *(h);
*(h) = 0;
*(h) = x_970;
float3 const x_539 = float3(x_537[0], x_535[2], x_537[0]);
int const x_971 = param_1;
param_1 = 0;
param_1 = x_971;
int const x_62 = (*(tint_symbol_82)).numbers[x_61_save];
QuicksortObject const x_972 = *(tint_symbol_82);
tint_array<int, 10> const tint_symbol_12 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_13 = {.numbers=tint_symbol_12};
*(tint_symbol_82) = tint_symbol_13;
*(tint_symbol_82) = x_972;
int const x_63 = pivot;
float2 const x_540 = float2(2.0f, x_534[2]);
int const x_973 = i_1;
i_1 = 0;
i_1 = x_973;
int const x_974 = *(l);
*(l) = 0;
*(l) = x_974;
float3 const x_541 = float3(x_534[1], x_534[0], x_534[1]);
int const x_975 = pivot;
pivot = 0;
pivot = x_975;
if ((x_62 <= x_63)) {
float3 const x_542 = float3(x_541[2], x_541[0], x_541[0]);
int const x_976 = param_3;
param_3 = 0;
param_3 = x_976;
int const x_67 = i_1;
int const x_977 = pivot;
pivot = 0;
pivot = x_977;
float2 const x_543 = float2(x_539[0], x_541[1]);
int const x_978 = i_1;
i_1 = 0;
i_1 = x_978;
int const x_979 = param;
param = 0;
param = x_979;
i_1 = as_type<int>((as_type<uint>(x_67) + as_type<uint>(as_type<int>(1u))));
int const x_980 = *(l);
*(l) = 0;
*(l) = x_980;
float3 const x_544 = float3(3.0f, 2.0f, x_540[0]);
int const x_70 = i_1;
float2 const x_545 = float2(x_537[1], x_538[0]);
int const x_981 = param;
param = 0;
param = x_981;
param = x_70;
int const x_982 = param;
param = 0;
param = x_982;
float2 const x_546 = float2(x_545[0], x_545[0]);
int const x_983 = i_1;
i_1 = 0;
i_1 = x_983;
int const x_72 = j_1;
param_1 = x_72;
int const x_984 = param_3;
param_3 = 0;
param_3 = x_984;
swap_i1_i1_(&(param), &(param_1), tint_symbol_82);
int const x_985 = param_1;
param_1 = 0;
param_1 = x_985;
}
QuicksortObject const x_986 = *(tint_symbol_82);
tint_array<int, 10> const tint_symbol_14 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_15 = {.numbers=tint_symbol_14};
*(tint_symbol_82) = tint_symbol_15;
*(tint_symbol_82) = x_986;
{
int const x_987 = *(h);
*(h) = 0;
*(h) = x_987;
int const x_74 = j_1;
int const x_988 = *(h);
*(h) = 0;
*(h) = x_988;
float3 const x_547 = float3(x_539[0], x_541[2], x_541[2]);
int const x_989 = (*(tint_symbol_82)).numbers[x_61_save];
(*(tint_symbol_82)).numbers[x_61_save] = 0;
(*(tint_symbol_82)).numbers[x_61_save] = x_989;
int const x_990 = param;
param = 0;
param = x_990;
j_1 = as_type<int>((as_type<uint>(1) + as_type<uint>(x_74)));
int const x_991 = param_1;
param_1 = 0;
param_1 = x_991;
float3 const x_548 = float3(x_541[1], x_541[2], x_541[0]);
int const x_992 = (*(tint_symbol_82)).numbers[x_61_save];
(*(tint_symbol_82)).numbers[x_61_save] = 0;
(*(tint_symbol_82)).numbers[x_61_save] = x_992;
}
}
int const x_76 = i_1;
int const x_993 = (*(tint_symbol_82)).numbers[x_42_save];
(*(tint_symbol_82)).numbers[x_42_save] = 0;
(*(tint_symbol_82)).numbers[x_42_save] = x_993;
float2 const x_549 = float2(x_534[0], x_534[1]);
QuicksortObject const x_994 = *(tint_symbol_82);
tint_array<int, 10> const tint_symbol_16 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_17 = {.numbers=tint_symbol_16};
*(tint_symbol_82) = tint_symbol_17;
*(tint_symbol_82) = x_994;
int const x_995 = *(h);
*(h) = 0;
*(h) = x_995;
i_1 = as_type<int>((as_type<uint>(1) + as_type<uint>(x_76)));
int const x_996 = param_1;
param_1 = 0;
param_1 = x_996;
int const x_79 = i_1;
int const x_997 = j_1;
j_1 = 0;
j_1 = x_997;
float2 const x_550 = float2(x_534[0], x_534[0]);
int const x_998 = param_1;
param_1 = 0;
param_1 = x_998;
param_2 = x_79;
float2 const x_551 = float2(x_534[1], x_536[0]);
int const x_999 = pivot;
pivot = 0;
pivot = x_999;
int const x_81 = *(h);
float2 const x_552 = float2(x_550[0], x_549[1]);
int const x_1000 = *(h);
*(h) = 0;
*(h) = x_1000;
param_3 = x_81;
int const x_1001 = i_1;
i_1 = 0;
i_1 = x_1001;
float2 const x_553 = float2(x_549[1], x_552[0]);
int const x_1002 = *(h);
*(h) = 0;
*(h) = x_1002;
swap_i1_i1_(&(param_2), &(param_3), tint_symbol_82);
int const x_1003 = *(l);
*(l) = 0;
*(l) = x_1003;
float2 const x_554 = float2(x_536[2], 2.0f);
int const x_1004 = param_1;
param_1 = 0;
param_1 = x_1004;
int const x_83 = i_1;
int const x_1005 = param;
param = 0;
param = x_1005;
float2 const x_555 = float2(x_534[1], x_534[0]);
int const x_1006 = j_1;
j_1 = 0;
j_1 = x_1006;
return x_83;
}
void quicksort_(thread QuicksortObject* const tint_symbol_83) {
int param_4 = 0;
int h_1 = 0;
int p = 0;
int l_1 = 0;
int top = 0;
tint_array<int, 10> stack = {};
int param_5 = 0;
l_1 = 0;
int const x_1007 = param_5;
param_5 = 0;
param_5 = x_1007;
h_1 = 9;
tint_array<int, 10> const x_1008 = stack;
tint_array<int, 10> const tint_symbol_18 = tint_array<int, 10>{};
stack = tint_symbol_18;
stack = x_1008;
float2 const x_556 = float2(2.0f);
int const x_1009 = param_5;
param_5 = 0;
param_5 = x_1009;
top = -1;
int const x_1010 = p;
p = 0;
p = x_1010;
int const x_93 = top;
float2 const x_557 = float2(1.0f);
int const x_1011 = p;
p = 0;
p = x_1011;
int const x_94 = as_type<int>((as_type<uint>(x_93) + as_type<uint>(as_type<int>(1u))));
int const x_1012 = top;
top = 0;
top = x_1012;
float2 const x_558 = float2(x_556[1], x_557[1]);
int const x_1013 = param_4;
param_4 = 0;
param_4 = x_1013;
top = x_94;
int const x_1014 = h_1;
h_1 = 0;
h_1 = x_1014;
float3 const x_559 = float3(x_557[1], x_557[0], x_557[0]);
int const x_1015 = param_4;
param_4 = 0;
param_4 = x_1015;
int const x_95 = l_1;
QuicksortObject const x_1016 = *(tint_symbol_83);
tint_array<int, 10> const tint_symbol_19 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_20 = {.numbers=tint_symbol_19};
*(tint_symbol_83) = tint_symbol_20;
*(tint_symbol_83) = x_1016;
float3 const x_560 = float3(x_559[1], x_559[0], x_557[0]);
int const x_96_save = x_94;
tint_array<int, 10> const x_1017 = stack;
tint_array<int, 10> const tint_symbol_21 = tint_array<int, 10>{};
stack = tint_symbol_21;
stack = x_1017;
float3 const x_561 = float3(x_556[1], x_556[1], x_556[1]);
int const x_1018 = l_1;
l_1 = 0;
l_1 = 0;
stack[x_96_save] = x_95;
int const x_1019 = param_5;
param_5 = 0;
param_5 = x_1019;
int const x_97 = top;
int const x_1020 = param_4;
param_4 = 0;
param_4 = x_1020;
float3 const x_562 = float3(3.0f, x_558[1], 2.0f);
int const x_1021 = stack[x_96_save];
stack[x_96_save] = 0;
stack[x_96_save] = x_1021;
int const x_98 = as_type<int>((as_type<uint>(x_97) + as_type<uint>(1)));
int const x_1022 = stack[x_96_save];
stack[x_96_save] = 0;
stack[x_96_save] = x_1022;
float3 const x_563 = float3(x_559[0], x_559[2], x_556[1]);
top = x_98;
int const x_1023 = param_4;
param_4 = 0;
param_4 = x_1023;
int const x_99 = h_1;
int const x_1024 = param_4;
param_4 = 0;
param_4 = x_1024;
float3 const x_564 = float3(x_558[0], x_561[0], x_558[1]);
int const x_1025 = l_1;
l_1 = 0;
l_1 = x_1025;
int const x_100_save = x_98;
int const x_1026 = param_5;
param_5 = 0;
param_5 = x_1026;
float2 const x_565 = float2(x_564[2], x_564[2]);
int const x_1027 = p;
p = 0;
p = x_1027;
stack[x_100_save] = x_99;
while (true) {
float3 const x_566 = float3(x_563[0], x_563[0], x_563[0]);
int const x_1028 = h_1;
h_1 = 0;
h_1 = x_1028;
tint_array<int, 10> const x_1029 = stack;
tint_array<int, 10> const tint_symbol_22 = tint_array<int, 10>{};
stack = tint_symbol_22;
stack = x_1029;
int const x_106 = top;
tint_array<int, 10> const x_1030 = stack;
tint_array<int, 10> const tint_symbol_23 = tint_array<int, 10>{};
stack = tint_symbol_23;
stack = x_1030;
float2 const x_567 = float2(x_558[0], x_564[2]);
int const x_1031 = param_4;
param_4 = 0;
param_4 = x_1031;
if ((x_106 >= as_type<int>(0u))) {
} else {
break;
}
QuicksortObject const x_1032 = *(tint_symbol_83);
tint_array<int, 10> const tint_symbol_24 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_25 = {.numbers=tint_symbol_24};
*(tint_symbol_83) = tint_symbol_25;
*(tint_symbol_83) = x_1032;
float3 const x_568 = float3(x_559[1], x_559[0], x_563[1]);
int const x_1033 = param_4;
param_4 = 0;
param_4 = x_1033;
int const x_108 = top;
float3 const x_569 = float3(x_565[0], x_567[1], x_565[0]);
int const x_1034 = h_1;
h_1 = 0;
h_1 = x_1034;
float2 const x_570 = float2(x_556[0], x_556[0]);
int const x_1035 = p;
p = 0;
p = x_1035;
top = as_type<int>((as_type<uint>(x_108) - as_type<uint>(as_type<int>(1u))));
int const x_1036 = p;
p = 0;
p = x_1036;
int const x_110_save = x_108;
int const x_1037 = stack[x_96_save];
stack[x_96_save] = 0;
stack[x_96_save] = x_1037;
int const x_111 = stack[x_110_save];
tint_array<int, 10> const x_1038 = stack;
tint_array<int, 10> const tint_symbol_26 = tint_array<int, 10>{};
stack = tint_symbol_26;
stack = x_1038;
float3 const x_571 = float3(x_559[1], x_559[0], x_564[1]);
int const x_1039 = l_1;
l_1 = 0;
l_1 = x_1039;
h_1 = x_111;
tint_array<int, 10> const x_1040 = stack;
tint_array<int, 10> const tint_symbol_27 = tint_array<int, 10>{};
stack = tint_symbol_27;
stack = x_1040;
float2 const x_572 = float2(x_562[1], x_561[1]);
int const x_1041 = p;
p = 0;
p = x_1041;
int const x_112 = top;
int const x_1042 = param_4;
param_4 = 0;
param_4 = x_1042;
int const x_1043 = stack[x_100_save];
stack[x_100_save] = 0;
stack[x_100_save] = x_1043;
float2 const x_573 = float2(2.0f, 3.0f);
top = as_type<int>((as_type<uint>(x_112) - as_type<uint>(1)));
int const x_1044 = param_5;
param_5 = 0;
param_5 = x_1044;
float3 const x_574 = float3(x_570[1], x_565[0], x_570[1]);
int const x_1045 = h_1;
h_1 = 0;
h_1 = x_1045;
int const x_114_save = x_112;
float2 const x_575 = float2(x_564[1], x_564[2]);
int const x_1046 = stack[x_100_save];
stack[x_100_save] = 0;
stack[x_100_save] = x_1046;
int const x_115 = stack[x_114_save];
int const x_1047 = p;
p = 0;
p = x_1047;
float3 const x_576 = float3(x_573[1], x_573[1], x_565[0]);
int const x_1048 = param_5;
param_5 = 0;
param_5 = x_1048;
l_1 = x_115;
int const x_1049 = top;
top = 0;
top = x_1049;
int const x_118 = l_1;
param_4 = x_118;
int const x_1050 = stack[x_110_save];
stack[x_110_save] = 0;
stack[x_110_save] = x_1050;
float2 const x_577 = float2(x_569[1], x_569[2]);
int const x_120 = h_1;
float2 const x_578 = float2(x_558[0], 2.0f);
param_5 = x_120;
int const x_1051 = stack[x_100_save];
stack[x_100_save] = 0;
stack[x_100_save] = x_1051;
int const x_121 = performPartition_i1_i1_(&(param_4), &(param_5), tint_symbol_83);
float2 const x_579 = float2(x_567[0], x_568[0]);
int const x_1052 = param_5;
param_5 = 0;
param_5 = x_1052;
p = x_121;
int const x_1053 = param_4;
param_4 = 0;
param_4 = x_1053;
int const x_122 = p;
int const x_1054 = h_1;
h_1 = 0;
h_1 = x_1054;
float2 const x_580 = float2(x_568[1], x_568[1]);
int const x_1055 = l_1;
l_1 = 0;
l_1 = x_1055;
int const x_1056 = h_1;
h_1 = 0;
h_1 = x_1056;
int const x_124 = l_1;
int const x_1057 = stack[x_110_save];
stack[x_110_save] = 0;
stack[x_110_save] = x_1057;
int const x_1058 = h_1;
h_1 = 0;
h_1 = x_1058;
float2 const x_582 = float2(x_567[1], x_573[0]);
int const x_1059 = stack[x_100_save];
stack[x_100_save] = 0;
stack[x_100_save] = x_1059;
if ((as_type<int>((as_type<uint>(x_122) - as_type<uint>(as_type<int>(1u)))) > x_124)) {
int const x_1060 = param_4;
param_4 = 0;
param_4 = x_1060;
int const x_128 = top;
float2 const x_583 = float2(x_571[1], x_556[1]);
int const x_1061 = stack[x_100_save];
stack[x_100_save] = 0;
stack[x_100_save] = x_1061;
tint_array<int, 10> const x_1062 = stack;
tint_array<int, 10> const tint_symbol_28 = tint_array<int, 10>{};
stack = tint_symbol_28;
stack = x_1062;
float2 const x_584 = float2(x_569[2], x_569[1]);
float3 const x_585 = float3(x_580[1], x_577[0], x_577[0]);
int const x_130 = l_1;
int const x_1063 = stack[x_114_save];
stack[x_114_save] = 0;
stack[x_114_save] = x_1063;
float2 const x_586 = float2(x_564[0], x_585[0]);
int const x_1064 = param_5;
param_5 = 0;
param_5 = x_1064;
int const x_131_save = as_type<int>((as_type<uint>(1) + as_type<uint>(x_128)));
int const x_1065 = stack[x_110_save];
stack[x_110_save] = 0;
stack[x_110_save] = x_1065;
float3 const x_587 = float3(x_566[1], x_566[1], x_563[0]);
int const x_1066 = param_5;
param_5 = 0;
param_5 = x_1066;
stack[x_131_save] = x_130;
int const x_132 = top;
int const x_1067 = stack[x_100_save];
stack[x_100_save] = 0;
stack[x_100_save] = x_1067;
float2 const x_588 = float2(x_575[1], x_575[0]);
int const x_1068 = stack[x_131_save];
stack[x_131_save] = 0;
stack[x_131_save] = x_1068;
int const x_133 = as_type<int>((1u + as_type<uint>(x_132)));
int const x_1069 = stack[x_100_save];
stack[x_100_save] = 0;
stack[x_100_save] = x_1069;
float3 const x_589 = float3(x_576[2], x_588[1], x_576[2]);
int const x_1070 = h_1;
h_1 = 0;
h_1 = x_1070;
top = x_133;
tint_array<int, 10> const x_1071 = stack;
tint_array<int, 10> const tint_symbol_29 = tint_array<int, 10>{};
stack = tint_symbol_29;
stack = x_1071;
int const x_134 = p;
float2 const x_590 = float2(x_576[0], x_573[1]);
int const x_1072 = stack[x_114_save];
stack[x_114_save] = 0;
stack[x_114_save] = x_1072;
int const x_136_save = x_133;
int const x_1073 = stack[x_114_save];
stack[x_114_save] = 0;
stack[x_114_save] = x_1073;
stack[x_136_save] = as_type<int>((as_type<uint>(x_134) - as_type<uint>(as_type<int>(1u))));
int const x_1074 = stack[x_96_save];
stack[x_96_save] = 0;
stack[x_96_save] = x_1074;
float2 const x_591 = float2(x_569[2], x_569[1]);
int const x_1075 = stack[x_136_save];
stack[x_136_save] = 0;
stack[x_136_save] = x_1075;
}
int const x_1076 = stack[x_96_save];
stack[x_96_save] = 0;
stack[x_96_save] = x_1076;
float2 const x_592 = float2(1.0f, 2.0f);
QuicksortObject const x_1077 = *(tint_symbol_83);
tint_array<int, 10> const tint_symbol_30 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_31 = {.numbers=tint_symbol_30};
*(tint_symbol_83) = tint_symbol_31;
*(tint_symbol_83) = x_1077;
int const x_137 = p;
int const x_1078 = stack[x_114_save];
stack[x_114_save] = 0;
stack[x_114_save] = x_1078;
float3 const x_593 = float3(x_571[2], x_556[0], x_556[1]);
int const x_1079 = p;
p = 0;
p = x_1079;
float3 const x_594 = float3(x_563[2], x_563[0], x_575[0]);
int const x_1080 = stack[x_114_save];
stack[x_114_save] = 0;
stack[x_114_save] = x_1080;
int const x_139 = h_1;
int const x_1081 = top;
top = 0;
top = x_1081;
float3 const x_595 = float3(x_560[2], x_568[0], x_560[0]);
int const x_1082 = stack[x_100_save];
stack[x_100_save] = 0;
stack[x_100_save] = x_1082;
int const x_1083 = p;
p = 0;
p = x_1083;
if ((as_type<int>((1u + as_type<uint>(x_137))) < x_139)) {
int const x_1084 = stack[x_114_save];
stack[x_114_save] = 0;
stack[x_114_save] = x_1084;
float2 const x_596 = float2(x_592[1], x_582[0]);
int const x_1085 = l_1;
l_1 = 0;
l_1 = x_1085;
int const x_143 = top;
int const x_1086 = stack[x_114_save];
stack[x_114_save] = 0;
stack[x_114_save] = x_1086;
float3 const x_597 = float3(x_562[1], x_560[1], x_560[1]);
int const x_144 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(1)));
int const x_1087 = param_5;
param_5 = 0;
param_5 = x_1087;
top = x_144;
int const x_1088 = stack[x_114_save];
stack[x_114_save] = 0;
stack[x_114_save] = x_1088;
int const x_145 = p;
int const x_1089 = param_5;
param_5 = 0;
param_5 = x_1089;
float3 const x_599 = float3(x_560[2], x_560[0], x_568[0]);
int const x_1090 = p;
p = 0;
p = x_1090;
float3 const x_600 = float3(x_556[0], x_580[0], x_580[0]);
int const x_1091 = stack[x_100_save];
stack[x_100_save] = 0;
stack[x_100_save] = x_1091;
int const x_147_save = x_144;
int const x_1092 = stack[x_110_save];
stack[x_110_save] = 0;
stack[x_110_save] = x_1092;
float2 const x_601 = float2(x_563[0], x_563[1]);
stack[x_147_save] = as_type<int>((1u + as_type<uint>(x_145)));
tint_array<int, 10> const x_1093 = stack;
tint_array<int, 10> const tint_symbol_32 = tint_array<int, 10>{};
stack = tint_symbol_32;
stack = x_1093;
int const x_148 = top;
int const x_1094 = stack[x_114_save];
stack[x_114_save] = 0;
stack[x_114_save] = x_1094;
float2 const x_602 = float2(x_565[1], x_599[1]);
tint_array<int, 10> const x_1095 = stack;
tint_array<int, 10> const tint_symbol_33 = tint_array<int, 10>{};
stack = tint_symbol_33;
stack = x_1095;
int const x_149 = as_type<int>((as_type<uint>(x_148) + as_type<uint>(as_type<int>(1u))));
int const x_1096 = stack[x_147_save];
stack[x_147_save] = 0;
stack[x_147_save] = x_1096;
top = x_149;
int const x_1097 = param_4;
param_4 = 0;
param_4 = x_1097;
int const x_150 = h_1;
int const x_1098 = stack[x_100_save];
stack[x_100_save] = 0;
stack[x_100_save] = x_1098;
int const x_1099 = stack[x_96_save];
stack[x_96_save] = 0;
stack[x_96_save] = x_1099;
stack[x_149] = x_150;
int const x_1100 = stack[x_114_save];
stack[x_114_save] = 0;
stack[x_114_save] = x_1100;
float3 const x_603 = float3(x_568[1], x_564[0], x_564[0]);
int const x_1101 = l_1;
l_1 = 0;
l_1 = x_1101;
}
int const x_1102 = stack[x_100_save];
stack[x_100_save] = 0;
stack[x_100_save] = x_1102;
{
int const x_1103 = l_1;
l_1 = 0;
l_1 = x_1103;
float2 const x_604 = float2(x_563[2], x_564[0]);
QuicksortObject const x_1104 = *(tint_symbol_83);
tint_array<int, 10> const tint_symbol_34 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_35 = {.numbers=tint_symbol_34};
*(tint_symbol_83) = tint_symbol_35;
*(tint_symbol_83) = x_1104;
}
}
int const x_1105 = h_1;
h_1 = 0;
h_1 = x_1105;
return;
}
void main_1(thread QuicksortObject* const tint_symbol_84, thread float4* const tint_symbol_85, const constant buf0* const tint_symbol_86, thread float4* const tint_symbol_87) {
float3 color = 0.0f;
int i_2 = 0;
float2 uv = 0.0f;
float2 const x_717 = uv;
uv = float2(0.0f);
uv = x_717;
i_2 = 0;
QuicksortObject const x_721 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_36 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_37 = {.numbers=tint_symbol_36};
*(tint_symbol_84) = tint_symbol_37;
*(tint_symbol_84) = x_721;
if (true) {
QuicksortObject const x_722 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_38 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_39 = {.numbers=tint_symbol_38};
*(tint_symbol_84) = tint_symbol_39;
*(tint_symbol_84) = x_722;
float2 const x_431 = float2(1.0f);
int const x_158 = i_2;
float2 const x_723 = uv;
uv = float2(0.0f);
uv = x_723;
float3 const x_725 = color;
color = float3(0.0f);
color = x_725;
float2 const x_432 = float2(x_431[1], x_431[1]);
QuicksortObject const x_726 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_40 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_41 = {.numbers=tint_symbol_40};
*(tint_symbol_84) = tint_symbol_41;
*(tint_symbol_84) = x_726;
}
QuicksortObject const x_756 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_42 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_43 = {.numbers=tint_symbol_42};
*(tint_symbol_84) = tint_symbol_43;
*(tint_symbol_84) = x_756;
float2 const x_446 = float2(0.0f);
int const x_757 = i_2;
i_2 = 0;
i_2 = x_757;
quicksort_(tint_symbol_84);
QuicksortObject const x_758 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_44 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_45 = {.numbers=tint_symbol_44};
*(tint_symbol_84) = tint_symbol_45;
*(tint_symbol_84) = x_758;
float4 const x_184 = *(tint_symbol_85);
float2 const x_759 = uv;
uv = float2(0.0f);
uv = x_759;
float2 const x_447 = float2(0.0f);
float2 const x_760 = uv;
uv = float2(0.0f);
uv = x_760;
float2 const x_185 = float2(x_184[0], x_184[1]);
float3 const x_448 = float3(x_185[1], x_446[1], x_446[1]);
QuicksortObject const x_761 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_46 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_47 = {.numbers=tint_symbol_46};
*(tint_symbol_84) = tint_symbol_47;
*(tint_symbol_84) = x_761;
float2 const x_762 = uv;
uv = float2(0.0f);
uv = x_762;
float2 const x_191 = (*(tint_symbol_86)).resolution;
QuicksortObject const x_763 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_48 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_49 = {.numbers=tint_symbol_48};
*(tint_symbol_84) = tint_symbol_49;
*(tint_symbol_84) = x_763;
float3 const x_449 = float3(x_184[1], 3.0f, x_184[3]);
float3 const x_764 = color;
color = float3(0.0f);
color = x_764;
float2 const x_192 = (x_185 / x_191);
QuicksortObject const x_765 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_50 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_51 = {.numbers=tint_symbol_50};
*(tint_symbol_84) = tint_symbol_51;
*(tint_symbol_84) = x_765;
float2 const x_450 = float2(x_447[0], x_185[1]);
float3 const x_766 = color;
color = float3(0.0f);
float3 const x_767 = color;
color = float3(0.0f);
color = x_767;
color = x_766;
uv = x_192;
color = float3(1.0f, 2.0f, 3.0f);
float3 const x_768 = color;
color = float3(0.0f);
color = x_768;
float3 const x_451 = float3(x_185[0], x_185[1], x_446[1]);
QuicksortObject const x_769 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_52 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_53 = {.numbers=tint_symbol_52};
*(tint_symbol_84) = tint_symbol_53;
*(tint_symbol_84) = x_769;
int const x_770 = (*(tint_symbol_84)).numbers[0u];
(*(tint_symbol_84)).numbers[0u] = 0;
(*(tint_symbol_84)).numbers[0u] = x_770;
int const x_201 = (*(tint_symbol_84)).numbers[0u];
QuicksortObject const x_771 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_54 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_55 = {.numbers=tint_symbol_54};
*(tint_symbol_84) = tint_symbol_55;
*(tint_symbol_84) = x_771;
int const x_772 = (*(tint_symbol_84)).numbers[0u];
(*(tint_symbol_84)).numbers[0u] = 0;
(*(tint_symbol_84)).numbers[0u] = x_772;
float const x_206 = color[0];
float const x_773 = color[0];
color[0] = 0.0f;
color[0] = x_773;
float2 const x_452 = float2(3.0f, 2.0f);
int const x_774 = i_2;
i_2 = 0;
i_2 = x_774;
QuicksortObject const x_775 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_56 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_57 = {.numbers=tint_symbol_56};
*(tint_symbol_84) = tint_symbol_57;
*(tint_symbol_84) = x_775;
float3 const x_453 = float3(x_451[0], x_450[0], x_450[1]);
color[0] = (x_206 + float(x_201));
float2 const x_776 = uv;
uv = float2(0.0f);
uv = x_776;
float2 const x_777 = uv;
uv = float2(0.0f);
uv = x_777;
float2 const x_454 = float2(x_184[1], x_184[1]);
float const x_210 = uv[0];
float2 const x_455 = float2(x_192[1], x_192[0]);
float const x_778 = uv[0];
uv[0] = 0.0f;
uv[0] = x_778;
QuicksortObject const x_779 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_58 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_59 = {.numbers=tint_symbol_58};
*(tint_symbol_84) = tint_symbol_59;
*(tint_symbol_84) = x_779;
if ((x_210 > 0.25f)) {
int const x_780 = i_2;
i_2 = 0;
i_2 = x_780;
int const x_781 = (*(tint_symbol_84)).numbers[0u];
(*(tint_symbol_84)).numbers[0u] = 0;
(*(tint_symbol_84)).numbers[0u] = x_781;
float3 const x_456 = float3(0.0f, x_448[1], x_448[1]);
float const x_782 = uv[0];
uv[0] = 0.0f;
uv[0] = x_782;
int const x_216 = (*(tint_symbol_84)).numbers[1];
QuicksortObject const x_783 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_60 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_61 = {.numbers=tint_symbol_60};
*(tint_symbol_84) = tint_symbol_61;
*(tint_symbol_84) = x_783;
float2 const x_457 = float2(x_454[0], x_454[0]);
float2 const x_784 = uv;
uv = float2(0.0f);
uv = x_784;
QuicksortObject const x_785 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_62 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_63 = {.numbers=tint_symbol_62};
*(tint_symbol_84) = tint_symbol_63;
*(tint_symbol_84) = x_785;
float2 const x_458 = float2(3.0f, 0.0f);
int const x_786 = i_2;
i_2 = 0;
i_2 = x_786;
float const x_219 = color[0];
float const x_787 = color[0];
color[0] = 0.0f;
color[0] = x_787;
float3 const x_788 = color;
color = float3(0.0f);
color = x_788;
float3 const x_789 = color;
color = float3(0.0f);
color = x_789;
float3 const x_459 = float3(x_454[1], x_454[1], x_447[1]);
float const x_790 = color[0];
color[0] = 0.0f;
color[0] = x_790;
color[0] = (float(x_216) + x_219);
int const x_791 = (*(tint_symbol_84)).numbers[0u];
(*(tint_symbol_84)).numbers[0u] = 0;
(*(tint_symbol_84)).numbers[0u] = x_791;
}
float const x_792 = uv[0];
uv[0] = 0.0f;
uv[0] = x_792;
float const x_793 = uv[0];
uv[0] = 0.0f;
uv[0] = x_793;
float const x_223 = uv[0];
float const x_794 = uv[0];
uv[0] = 0.0f;
uv[0] = x_794;
float3 const x_460 = float3(x_453[2], x_453[1], x_453[1]);
float2 const x_795 = uv;
uv = float2(0.0f);
uv = x_795;
float const x_796 = uv[0];
uv[0] = 0.0f;
uv[0] = x_796;
float2 const x_461 = float2(0.0f);
float const x_797 = uv[0];
uv[0] = 0.0f;
uv[0] = x_797;
if ((x_223 > 0.5f)) {
float const x_798 = uv[0];
uv[0] = 0.0f;
uv[0] = x_798;
float2 const x_462 = float2(x_446[0], x_446[0]);
float const x_799 = color[0];
color[0] = 0.0f;
color[0] = x_799;
float const x_800 = color[0];
color[0] = 0.0f;
color[0] = x_800;
float3 const x_463 = float3(x_453[0], x_453[2], x_461[1]);
float const x_801 = color[0];
color[0] = 0.0f;
color[0] = x_801;
int const x_230 = (*(tint_symbol_84)).numbers[2u];
float const x_802 = uv[0];
uv[0] = 0.0f;
uv[0] = x_802;
float const x_803 = color[0];
color[0] = 0.0f;
color[0] = x_803;
int const x_804 = (*(tint_symbol_84)).numbers[2u];
(*(tint_symbol_84)).numbers[2u] = 0;
(*(tint_symbol_84)).numbers[2u] = x_804;
float2 const x_464 = float2(x_450[1], x_191[0]);
float const x_805 = color[1];
color[1] = 0.0f;
color[1] = x_805;
float const x_234 = color[1];
int const x_806 = (*(tint_symbol_84)).numbers[2u];
(*(tint_symbol_84)).numbers[2u] = 0;
(*(tint_symbol_84)).numbers[2u] = x_806;
float2 const x_465 = float2(x_463[0], x_185[0]);
float const x_807 = color[0];
color[0] = 0.0f;
color[0] = x_807;
int const x_808 = i_2;
i_2 = 0;
i_2 = x_808;
float2 const x_466 = float2(x_455[1], 0.0f);
int const x_809 = i_2;
i_2 = 0;
i_2 = x_809;
color[1] = (float(x_230) + x_234);
float const x_810 = uv[0];
uv[0] = 0.0f;
uv[0] = x_810;
}
int const x_811 = i_2;
i_2 = 0;
i_2 = x_811;
float2 const x_467 = float2(x_191[0], x_191[0]);
float const x_812 = uv[0];
uv[0] = 0.0f;
uv[0] = x_812;
float const x_238 = uv[0];
float3 const x_813 = color;
color = float3(0.0f);
color = x_813;
float const x_814 = color[0];
color[0] = 0.0f;
color[0] = x_814;
if ((x_238 > 0.75f)) {
float const x_815 = color[0];
color[0] = 0.0f;
color[0] = x_815;
int const x_245 = (*(tint_symbol_84)).numbers[3];
float const x_816 = color[0];
color[0] = 0.0f;
color[0] = x_816;
QuicksortObject const x_817 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_64 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_65 = {.numbers=tint_symbol_64};
*(tint_symbol_84) = tint_symbol_65;
*(tint_symbol_84) = x_817;
float3 const x_468 = float3(x_467[0], x_467[0], x_467[0]);
float const x_818 = uv[0];
uv[0] = 0.0f;
uv[0] = x_818;
float const x_819 = uv[0];
uv[0] = 0.0f;
uv[0] = x_819;
float const x_249 = color[2];
float3 const x_820 = color;
color = float3(0.0f);
color = x_820;
float3 const x_469 = float3(x_467[0], x_191[1], x_467[1]);
float const x_821 = color[2];
color[2] = 0.0f;
color[2] = x_821;
int const x_822 = (*(tint_symbol_84)).numbers[0u];
(*(tint_symbol_84)).numbers[0u] = 0;
(*(tint_symbol_84)).numbers[0u] = x_822;
float2 const x_470 = float2(0.0f);
float const x_823 = color[2];
color[2] = 0.0f;
color[2] = x_823;
color[2] = (x_249 + float(x_245));
float2 const x_824 = uv;
uv = float2(0.0f);
uv = x_824;
float2 const x_471 = float2(x_470[1], x_470[1]);
}
float const x_825 = uv[0];
uv[0] = 0.0f;
uv[0] = x_825;
float3 const x_472 = float3(x_454[0], x_454[1], x_454[1]);
int const x_254 = (*(tint_symbol_84)).numbers[4];
float const x_826 = uv[0];
uv[0] = 0.0f;
uv[0] = x_826;
float3 const x_827 = color;
color = float3(0.0f);
color = x_827;
float3 const x_473 = float3(x_446[1], x_453[0], x_453[0]);
int const x_828 = (*(tint_symbol_84)).numbers[4];
(*(tint_symbol_84)).numbers[4] = 0;
(*(tint_symbol_84)).numbers[4] = x_828;
float2 const x_474 = float2(x_191[0], x_184[2]);
float const x_829 = uv[0];
uv[0] = 0.0f;
uv[0] = x_829;
float const x_257 = color[1];
float const x_830 = color[1];
color[1] = 0.0f;
color[1] = x_830;
float2 const x_475 = float2(x_467[0], x_450[0]);
float const x_831 = uv[0];
uv[0] = 0.0f;
uv[0] = x_831;
float const x_832 = color[0];
color[0] = 0.0f;
color[0] = x_832;
float2 const x_476 = float2(x_451[2], x_460[1]);
color[1] = (x_257 + float(x_254));
float3 const x_477 = float3(0.0f, x_472[0], 0.0f);
float const x_833 = uv[0];
uv[0] = 0.0f;
uv[0] = x_833;
float const x_834 = color[0];
color[0] = 0.0f;
color[0] = x_834;
float2 const x_478 = float2(x_472[0], x_472[1]);
float const x_835 = uv[1];
uv[1] = 0.0f;
uv[1] = x_835;
float const x_261 = uv[1];
int const x_836 = i_2;
i_2 = 0;
i_2 = x_836;
float3 const x_479 = float3(0.0f, x_454[1], 0.0f);
int const x_837 = (*(tint_symbol_84)).numbers[0u];
(*(tint_symbol_84)).numbers[0u] = 0;
(*(tint_symbol_84)).numbers[0u] = x_837;
float const x_838 = color[1];
color[1] = 0.0f;
color[1] = x_838;
float3 const x_480 = float3(x_446[0], x_446[0], 0.0f);
float const x_839 = uv[0];
uv[0] = 0.0f;
uv[0] = x_839;
if ((x_261 > 0.25f)) {
float2 const x_481 = float2(x_447[0], x_480[2]);
float3 const x_840 = color;
color = float3(0.0f);
color = x_840;
int const x_267 = (*(tint_symbol_84)).numbers[5u];
float const x_841 = color[0];
color[0] = 0.0f;
color[0] = x_841;
int const x_842 = i_2;
i_2 = 0;
i_2 = x_842;
int const x_843 = i_2;
i_2 = 0;
i_2 = x_843;
float const x_270 = color[0];
float const x_844 = uv[0];
uv[0] = 0.0f;
uv[0] = x_844;
float3 const x_482 = float3(x_455[0], x_475[1], x_455[1]);
QuicksortObject const x_845 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_66 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_67 = {.numbers=tint_symbol_66};
*(tint_symbol_84) = tint_symbol_67;
*(tint_symbol_84) = x_845;
float const x_846 = uv[1];
uv[1] = 0.0f;
uv[1] = x_846;
int const x_847 = i_2;
i_2 = 0;
i_2 = x_847;
float3 const x_483 = float3(x_184[3], x_184[3], x_192[0]);
float const x_848 = uv[0];
uv[0] = 0.0f;
uv[0] = x_848;
color[0] = (float(x_267) + x_270);
float3 const x_484 = float3(x_454[1], x_450[0], x_454[1]);
float const x_849 = uv[0];
uv[0] = 0.0f;
uv[0] = x_849;
}
float const x_850 = color[0];
color[0] = 0.0f;
color[0] = x_850;
float3 const x_485 = float3(x_467[0], x_450[1], x_450[0]);
float const x_851 = uv[1];
uv[1] = 0.0f;
uv[1] = x_851;
int const x_852 = (*(tint_symbol_84)).numbers[4];
(*(tint_symbol_84)).numbers[4] = 0;
(*(tint_symbol_84)).numbers[4] = x_852;
float const x_274 = uv[1];
int const x_853 = (*(tint_symbol_84)).numbers[0u];
(*(tint_symbol_84)).numbers[0u] = 0;
(*(tint_symbol_84)).numbers[0u] = x_853;
if ((x_274 > 0.5f)) {
float const x_854 = uv[0];
uv[0] = 0.0f;
uv[0] = x_854;
float2 const x_486 = float2(x_480[1], x_455[1]);
float const x_855 = color[1];
color[1] = 0.0f;
color[1] = x_855;
float2 const x_487 = float2(x_449[2], x_449[1]);
float const x_856 = uv[1];
uv[1] = 0.0f;
uv[1] = x_856;
int const x_280 = (*(tint_symbol_84)).numbers[6u];
float const x_857 = uv[1];
uv[1] = 0.0f;
uv[1] = x_857;
int const x_858 = i_2;
i_2 = 0;
i_2 = x_858;
int const x_859 = (*(tint_symbol_84)).numbers[4];
(*(tint_symbol_84)).numbers[4] = 0;
(*(tint_symbol_84)).numbers[4] = x_859;
float2 const x_488 = float2(x_473[2], x_473[1]);
float const x_283 = color[1];
float2 const x_860 = uv;
uv = float2(0.0f);
uv = x_860;
float const x_861 = color[0];
color[0] = 0.0f;
color[0] = x_861;
float2 const x_489 = float2(x_475[1], x_475[0]);
int const x_862 = (*(tint_symbol_84)).numbers[6u];
(*(tint_symbol_84)).numbers[6u] = 0;
(*(tint_symbol_84)).numbers[6u] = x_862;
int const x_863 = (*(tint_symbol_84)).numbers[6u];
(*(tint_symbol_84)).numbers[6u] = 0;
(*(tint_symbol_84)).numbers[6u] = x_863;
float2 const x_490 = float2(x_480[2], x_480[2]);
QuicksortObject const x_864 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_68 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_69 = {.numbers=tint_symbol_68};
*(tint_symbol_84) = tint_symbol_69;
*(tint_symbol_84) = x_864;
color[1] = (float(x_280) + x_283);
float const x_865 = color[0];
color[0] = 0.0f;
color[0] = x_865;
float2 const x_491 = float2(2.0f, x_454[0]);
float const x_866 = color[1];
color[1] = 0.0f;
color[1] = x_866;
}
float2 const x_492 = float2(x_455[1], x_455[1]);
float const x_867 = color[0];
color[0] = 0.0f;
color[0] = x_867;
float const x_287 = uv[1];
QuicksortObject const x_868 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_70 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_71 = {.numbers=tint_symbol_70};
*(tint_symbol_84) = tint_symbol_71;
*(tint_symbol_84) = x_868;
float2 const x_493 = float2(x_475[0], x_475[1]);
float const x_869 = uv[0];
uv[0] = 0.0f;
uv[0] = x_869;
float const x_870 = color[1];
color[1] = 0.0f;
color[1] = x_870;
float3 const x_494 = float3(x_191[0], x_191[1], x_191[1]);
int const x_871 = (*(tint_symbol_84)).numbers[4];
(*(tint_symbol_84)).numbers[4] = 0;
(*(tint_symbol_84)).numbers[4] = x_871;
if ((x_287 > 0.75f)) {
float3 const x_872 = color;
color = float3(0.0f);
color = x_872;
float const x_873 = color[0];
color[0] = 0.0f;
color[0] = x_873;
float3 const x_495 = float3(x_192[1], x_192[0], x_192[1]);
float3 const x_874 = color;
color = float3(0.0f);
color = x_874;
int const x_293 = (*(tint_symbol_84)).numbers[7];
float const x_875 = uv[0];
uv[0] = 0.0f;
uv[0] = x_875;
float3 const x_496 = float3(x_475[0], x_467[1], x_467[0]);
float const x_876 = color[1];
color[1] = 0.0f;
color[1] = x_876;
float2 const x_497 = float2(x_477[0], x_461[1]);
int const x_877 = (*(tint_symbol_84)).numbers[0u];
(*(tint_symbol_84)).numbers[0u] = 0;
(*(tint_symbol_84)).numbers[0u] = x_877;
float const x_878 = color[1];
color[1] = 0.0f;
color[1] = x_878;
float3 const x_498 = float3(x_478[0], x_478[1], x_478[0]);
float const x_879 = color[0];
color[0] = 0.0f;
color[0] = x_879;
float const x_296 = color[2];
float const x_880 = uv[1];
uv[1] = 0.0f;
uv[1] = x_880;
float2 const x_499 = float2(x_184[0], x_184[1]);
float const x_881 = uv[0];
uv[0] = 0.0f;
uv[0] = x_881;
float const x_882 = uv[1];
uv[1] = 0.0f;
uv[1] = x_882;
float const x_883 = uv[1];
uv[1] = 0.0f;
uv[1] = x_883;
float3 const x_500 = float3(x_499[1], x_499[1], x_494[2]);
float const x_884 = color[2];
color[2] = 0.0f;
color[2] = x_884;
color[2] = (float(x_293) + x_296);
float const x_885 = color[1];
color[1] = 0.0f;
color[1] = x_885;
float2 const x_501 = float2(x_453[0], x_453[2]);
float const x_886 = color[0];
color[0] = 0.0f;
color[0] = x_886;
}
int const x_887 = i_2;
i_2 = 0;
i_2 = x_887;
float2 const x_502 = float2(x_451[1], x_192[1]);
float2 const x_888 = uv;
uv = float2(0.0f);
uv = x_888;
int const x_301 = (*(tint_symbol_84)).numbers[8];
int const x_889 = i_2;
i_2 = 0;
i_2 = x_889;
float2 const x_503 = float2(x_185[0], x_451[2]);
int const x_890 = (*(tint_symbol_84)).numbers[8];
(*(tint_symbol_84)).numbers[8] = 0;
(*(tint_symbol_84)).numbers[8] = x_890;
float const x_891 = color[1];
color[1] = 0.0f;
color[1] = x_891;
float2 const x_504 = float2(x_453[1], 0.0f);
float const x_892 = color[0];
color[0] = 0.0f;
color[0] = x_892;
float3 const x_505 = float3(x_504[0], x_504[1], x_504[0]);
float const x_893 = color[2];
color[2] = 0.0f;
color[2] = x_893;
float const x_304 = color[2];
float const x_894 = color[0];
color[0] = 0.0f;
color[0] = x_894;
float2 const x_506 = float2(x_493[0], x_492[0]);
int const x_895 = (*(tint_symbol_84)).numbers[4];
(*(tint_symbol_84)).numbers[4] = 0;
(*(tint_symbol_84)).numbers[4] = x_895;
float const x_896 = uv[1];
uv[1] = 0.0f;
uv[1] = x_896;
float2 const x_507 = float2(x_461[0], x_447[0]);
float const x_897 = color[1];
color[1] = 0.0f;
color[1] = x_897;
color[2] = (x_304 + float(x_301));
float2 const x_898 = uv;
uv = float2(0.0f);
uv = x_898;
float const x_899 = uv[0];
uv[0] = 0.0f;
uv[0] = x_899;
float3 const x_508 = float3(x_461[1], x_461[0], x_506[1]);
float const x_900 = uv[0];
uv[0] = 0.0f;
uv[0] = x_900;
float const x_308 = uv[0];
float const x_901 = color[1];
color[1] = 0.0f;
color[1] = x_901;
float3 const x_509 = float3(x_503[1], x_503[0], x_448[2]);
float const x_902 = uv[1];
uv[1] = 0.0f;
uv[1] = x_902;
float const x_310 = uv[1];
float const x_903 = uv[1];
uv[1] = 0.0f;
uv[1] = x_903;
float const x_904 = color[2];
color[2] = 0.0f;
color[2] = x_904;
float3 const x_510 = float3(2.0f, x_485[1], x_485[2]);
float const x_905 = color[2];
color[2] = 0.0f;
color[2] = x_905;
int const x_906 = i_2;
i_2 = 0;
i_2 = x_906;
float2 const x_511 = float2(x_485[2], x_485[1]);
float3 const x_907 = color;
color = float3(0.0f);
color = x_907;
float const x_908 = uv[1];
uv[1] = 0.0f;
uv[1] = x_908;
float3 const x_512 = float3(x_455[1], x_455[1], x_455[1]);
int const x_909 = (*(tint_symbol_84)).numbers[4];
(*(tint_symbol_84)).numbers[4] = 0;
(*(tint_symbol_84)).numbers[4] = x_909;
if ((fabs((x_308 - x_310)) < 0.25f)) {
float const x_910 = uv[0];
uv[0] = 0.0f;
uv[0] = x_910;
QuicksortObject const x_911 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_72 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_73 = {.numbers=tint_symbol_72};
*(tint_symbol_84) = tint_symbol_73;
*(tint_symbol_84) = x_911;
float3 const x_513 = float3(x_505[2], x_505[0], x_448[0]);
int const x_912 = (*(tint_symbol_84)).numbers[8];
(*(tint_symbol_84)).numbers[8] = 0;
(*(tint_symbol_84)).numbers[8] = x_912;
int const x_317 = (*(tint_symbol_84)).numbers[9u];
float3 const x_514 = float3(x_474[1], x_474[1], x_474[1]);
float const x_913 = uv[1];
uv[1] = 0.0f;
uv[1] = x_913;
float const x_320 = color[0];
float const x_914 = uv[1];
uv[1] = 0.0f;
uv[1] = x_914;
float2 const x_515 = float2(x_502[0], x_502[1]);
float const x_915 = color[0];
color[0] = 0.0f;
color[0] = x_915;
float3 const x_916 = color;
color = float3(0.0f);
color = x_916;
float2 const x_516 = float2(x_452[0], x_452[0]);
float2 const x_917 = uv;
uv = float2(0.0f);
uv = x_917;
float const x_918 = uv[0];
uv[0] = 0.0f;
uv[0] = x_918;
float3 const x_517 = float3(0.0f);
color[0] = (float(x_317) + x_320);
float const x_919 = color[0];
color[0] = 0.0f;
color[0] = x_919;
float3 const x_518 = float3(x_480[1], x_508[0], x_480[0]);
float const x_920 = color[0];
color[0] = 0.0f;
color[0] = x_920;
}
float const x_921 = uv[1];
uv[1] = 0.0f;
uv[1] = x_921;
float3 const x_325 = color;
float const x_922 = uv[0];
uv[0] = 0.0f;
uv[0] = x_922;
float3 const x_519 = float3(x_447[0], x_446[0], x_446[1]);
float3 const x_326 = normalize(x_325);
float const x_923 = uv[0];
uv[0] = 0.0f;
uv[0] = x_923;
QuicksortObject const x_924 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_74 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_75 = {.numbers=tint_symbol_74};
*(tint_symbol_84) = tint_symbol_75;
*(tint_symbol_84) = x_924;
QuicksortObject const x_925 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_76 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_77 = {.numbers=tint_symbol_76};
*(tint_symbol_84) = tint_symbol_77;
*(tint_symbol_84) = x_925;
float const x_926 = color[1];
color[1] = 0.0f;
color[1] = x_926;
float2 const x_520 = float2(x_506[1], x_519[1]);
float const x_927 = color[1];
color[1] = 0.0f;
color[1] = x_927;
float4 const x_330 = float4(x_326[0], x_326[1], x_326[2], 1.0f);
float const x_928 = uv[1];
uv[1] = 0.0f;
uv[1] = x_928;
float3 const x_521 = float3(2.0f, 2.0f, x_520[1]);
float const x_929 = uv[0];
uv[0] = 0.0f;
uv[0] = x_929;
*(tint_symbol_87) = x_330;
QuicksortObject const x_930 = *(tint_symbol_84);
tint_array<int, 10> const tint_symbol_78 = tint_array<int, 10>{};
QuicksortObject const tint_symbol_79 = {.numbers=tint_symbol_78};
*(tint_symbol_84) = tint_symbol_79;
*(tint_symbol_84) = x_930;
float3 const x_522 = float3(x_330[3], x_330[1], x_493[0]);
float const x_931 = color[0];
color[0] = 0.0f;
color[0] = x_931;
return;
}
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_88, thread QuicksortObject* const tint_symbol_89, const constant buf0* const tint_symbol_90, thread float4* const tint_symbol_91) {
*(tint_symbol_88) = gl_FragCoord_param;
main_1(tint_symbol_89, tint_symbol_88, tint_symbol_90, tint_symbol_91);
main_out const tint_symbol_80 = {.x_GLF_color_1=*(tint_symbol_91)};
return tint_symbol_80;
}
fragment tint_symbol_1 tint_symbol(const constant buf0* tint_symbol_94 [[buffer(0)]], float4 gl_FragCoord_param [[position]]) {
thread float4 tint_symbol_92 = 0.0f;
thread QuicksortObject tint_symbol_93 = {};
thread float4 tint_symbol_95 = 0.0f;
main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_92), &(tint_symbol_93), tint_symbol_94, &(tint_symbol_95));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}