2021-07-23 13:10:12 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
|
|
|
|
using namespace metal;
|
|
|
|
struct tint_padded_array_element {
|
|
|
|
/* 0x0000 */ int el;
|
|
|
|
/* 0x0004 */ int8_t tint_pad[12];
|
|
|
|
};
|
|
|
|
struct tint_array_wrapper {
|
|
|
|
/* 0x0000 */ tint_padded_array_element arr[20];
|
|
|
|
};
|
|
|
|
struct buf0 {
|
|
|
|
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_int_values;
|
|
|
|
};
|
|
|
|
struct buf1 {
|
|
|
|
/* 0x0000 */ int one;
|
|
|
|
};
|
|
|
|
struct tint_array_wrapper_1 {
|
|
|
|
int arr[10];
|
|
|
|
};
|
|
|
|
struct main_out {
|
|
|
|
float4 x_GLF_color_1;
|
|
|
|
};
|
|
|
|
struct tint_symbol_1 {
|
|
|
|
float4 x_GLF_color_1 [[color(0)]];
|
|
|
|
};
|
|
|
|
|
2021-08-04 22:15:28 +00:00
|
|
|
void main_1(constant buf0& x_6, thread float4* const tint_symbol_7) {
|
2021-07-23 13:10:12 +00:00
|
|
|
tint_array_wrapper_1 arr0 = {};
|
|
|
|
tint_array_wrapper_1 arr1 = {};
|
|
|
|
int a = 0;
|
|
|
|
int limiter0 = 0;
|
|
|
|
int limiter1 = 0;
|
|
|
|
int b = 0;
|
|
|
|
int limiter2 = 0;
|
|
|
|
int limiter3 = 0;
|
|
|
|
int d = 0;
|
|
|
|
tint_array_wrapper_1 ref0 = {};
|
|
|
|
tint_array_wrapper_1 ref1 = {};
|
|
|
|
int i = 0;
|
|
|
|
int const x_59 = x_6.x_GLF_uniform_int_values.arr[3].el;
|
|
|
|
int const x_61 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
|
|
|
int const x_63 = x_6.x_GLF_uniform_int_values.arr[4].el;
|
|
|
|
int const x_65 = x_6.x_GLF_uniform_int_values.arr[5].el;
|
|
|
|
int const x_67 = x_6.x_GLF_uniform_int_values.arr[6].el;
|
|
|
|
int const x_69 = x_6.x_GLF_uniform_int_values.arr[7].el;
|
|
|
|
int const x_71 = x_6.x_GLF_uniform_int_values.arr[8].el;
|
|
|
|
int const x_73 = x_6.x_GLF_uniform_int_values.arr[9].el;
|
|
|
|
int const x_75 = x_6.x_GLF_uniform_int_values.arr[0].el;
|
|
|
|
int const x_77 = x_6.x_GLF_uniform_int_values.arr[10].el;
|
2021-08-04 22:15:28 +00:00
|
|
|
tint_array_wrapper_1 const tint_symbol_2 = {.arr={x_59, x_61, x_63, x_65, x_67, x_69, x_71, x_73, x_75, x_77}};
|
|
|
|
arr0 = tint_symbol_2;
|
2021-07-23 13:10:12 +00:00
|
|
|
int const x_80 = x_6.x_GLF_uniform_int_values.arr[1].el;
|
|
|
|
int const x_82 = x_6.x_GLF_uniform_int_values.arr[12].el;
|
|
|
|
int const x_84 = x_6.x_GLF_uniform_int_values.arr[15].el;
|
|
|
|
int const x_86 = x_6.x_GLF_uniform_int_values.arr[16].el;
|
|
|
|
int const x_88 = x_6.x_GLF_uniform_int_values.arr[17].el;
|
|
|
|
int const x_90 = x_6.x_GLF_uniform_int_values.arr[13].el;
|
|
|
|
int const x_92 = x_6.x_GLF_uniform_int_values.arr[14].el;
|
|
|
|
int const x_94 = x_6.x_GLF_uniform_int_values.arr[11].el;
|
|
|
|
int const x_96 = x_6.x_GLF_uniform_int_values.arr[18].el;
|
|
|
|
int const x_98 = x_6.x_GLF_uniform_int_values.arr[19].el;
|
2021-08-04 22:15:28 +00:00
|
|
|
tint_array_wrapper_1 const tint_symbol_3 = {.arr={x_80, x_82, x_84, x_86, x_88, x_90, x_92, x_94, x_96, x_98}};
|
|
|
|
arr1 = tint_symbol_3;
|
2021-07-23 13:10:12 +00:00
|
|
|
int const x_101 = x_6.x_GLF_uniform_int_values.arr[8].el;
|
|
|
|
a = x_101;
|
|
|
|
while (true) {
|
|
|
|
int const x_106 = a;
|
|
|
|
int const x_108 = x_6.x_GLF_uniform_int_values.arr[0].el;
|
|
|
|
if ((x_106 < x_108)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
int const x_112 = x_6.x_GLF_uniform_int_values.arr[3].el;
|
|
|
|
limiter0 = x_112;
|
|
|
|
while (true) {
|
|
|
|
int const x_117 = limiter0;
|
|
|
|
int const x_119 = x_6.x_GLF_uniform_int_values.arr[4].el;
|
|
|
|
if ((x_117 < x_119)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
int const x_122 = limiter0;
|
2021-07-30 18:59:06 +00:00
|
|
|
limiter0 = as_type<int>((as_type<uint>(x_122) + as_type<uint>(1)));
|
2021-07-23 13:10:12 +00:00
|
|
|
int const x_125 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
|
|
|
limiter1 = x_125;
|
|
|
|
int const x_127 = x_6.x_GLF_uniform_int_values.arr[3].el;
|
|
|
|
b = x_127;
|
|
|
|
while (true) {
|
|
|
|
int const x_132 = b;
|
|
|
|
int const x_134 = x_6.x_GLF_uniform_int_values.arr[1].el;
|
|
|
|
if ((x_132 < x_134)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
int const x_137 = limiter1;
|
|
|
|
int const x_139 = x_6.x_GLF_uniform_int_values.arr[5].el;
|
|
|
|
if ((x_137 > x_139)) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
int const x_143 = limiter1;
|
2021-07-30 18:59:06 +00:00
|
|
|
limiter1 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(1)));
|
2021-07-23 13:10:12 +00:00
|
|
|
int const x_145 = b;
|
|
|
|
int const x_146 = a;
|
|
|
|
int const x_148 = arr1.arr[x_146];
|
|
|
|
arr0.arr[x_145] = x_148;
|
|
|
|
{
|
|
|
|
int const x_150 = b;
|
2021-07-30 18:59:06 +00:00
|
|
|
b = as_type<int>((as_type<uint>(x_150) + as_type<uint>(1)));
|
2021-07-23 13:10:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
limiter2 = 0;
|
|
|
|
while (true) {
|
|
|
|
int const x_156 = limiter2;
|
|
|
|
if ((x_156 < 5)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
int const x_159 = limiter2;
|
2021-07-30 18:59:06 +00:00
|
|
|
limiter2 = as_type<int>((as_type<uint>(x_159) + as_type<uint>(1)));
|
2021-07-23 13:10:12 +00:00
|
|
|
int const x_162 = arr1.arr[1];
|
|
|
|
arr0.arr[1] = x_162;
|
|
|
|
}
|
|
|
|
while (true) {
|
|
|
|
limiter3 = 0;
|
|
|
|
d = 0;
|
|
|
|
while (true) {
|
|
|
|
int const x_172 = d;
|
|
|
|
if ((x_172 < 10)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
int const x_175 = limiter3;
|
|
|
|
if ((x_175 > 4)) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
int const x_179 = limiter3;
|
2021-07-30 18:59:06 +00:00
|
|
|
limiter3 = as_type<int>((as_type<uint>(x_179) + as_type<uint>(1)));
|
2021-07-23 13:10:12 +00:00
|
|
|
int const x_181 = d;
|
|
|
|
int const x_182 = d;
|
|
|
|
int const x_184 = arr0.arr[x_182];
|
|
|
|
arr1.arr[x_181] = x_184;
|
|
|
|
{
|
|
|
|
int const x_186 = d;
|
2021-07-30 18:59:06 +00:00
|
|
|
d = as_type<int>((as_type<uint>(x_186) + as_type<uint>(1)));
|
2021-07-23 13:10:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
int const x_189 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
|
|
|
int const x_191 = x_6.x_GLF_uniform_int_values.arr[3].el;
|
|
|
|
if ((x_189 == x_191)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
int const x_193 = a;
|
2021-07-30 18:59:06 +00:00
|
|
|
a = as_type<int>((as_type<uint>(x_193) + as_type<uint>(1)));
|
2021-07-23 13:10:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
int const x_196 = x_6.x_GLF_uniform_int_values.arr[11].el;
|
|
|
|
int const x_198 = x_6.x_GLF_uniform_int_values.arr[12].el;
|
|
|
|
int const x_200 = x_6.x_GLF_uniform_int_values.arr[11].el;
|
|
|
|
int const x_202 = x_6.x_GLF_uniform_int_values.arr[5].el;
|
|
|
|
int const x_204 = x_6.x_GLF_uniform_int_values.arr[6].el;
|
|
|
|
int const x_206 = x_6.x_GLF_uniform_int_values.arr[7].el;
|
|
|
|
int const x_208 = x_6.x_GLF_uniform_int_values.arr[8].el;
|
|
|
|
int const x_210 = x_6.x_GLF_uniform_int_values.arr[9].el;
|
|
|
|
int const x_212 = x_6.x_GLF_uniform_int_values.arr[0].el;
|
|
|
|
int const x_214 = x_6.x_GLF_uniform_int_values.arr[10].el;
|
2021-08-04 22:15:28 +00:00
|
|
|
tint_array_wrapper_1 const tint_symbol_4 = {.arr={x_196, x_198, x_200, x_202, x_204, x_206, x_208, x_210, x_212, x_214}};
|
|
|
|
ref0 = tint_symbol_4;
|
2021-07-23 13:10:12 +00:00
|
|
|
int const x_217 = x_6.x_GLF_uniform_int_values.arr[11].el;
|
|
|
|
int const x_219 = x_6.x_GLF_uniform_int_values.arr[12].el;
|
|
|
|
int const x_221 = x_6.x_GLF_uniform_int_values.arr[11].el;
|
|
|
|
int const x_223 = x_6.x_GLF_uniform_int_values.arr[5].el;
|
|
|
|
int const x_225 = x_6.x_GLF_uniform_int_values.arr[6].el;
|
|
|
|
int const x_227 = x_6.x_GLF_uniform_int_values.arr[13].el;
|
|
|
|
int const x_229 = x_6.x_GLF_uniform_int_values.arr[14].el;
|
|
|
|
int const x_231 = x_6.x_GLF_uniform_int_values.arr[11].el;
|
|
|
|
int const x_233 = x_6.x_GLF_uniform_int_values.arr[18].el;
|
|
|
|
int const x_235 = x_6.x_GLF_uniform_int_values.arr[19].el;
|
2021-08-04 22:15:28 +00:00
|
|
|
tint_array_wrapper_1 const tint_symbol_5 = {.arr={x_217, x_219, x_221, x_223, x_225, x_227, x_229, x_231, x_233, x_235}};
|
|
|
|
ref1 = tint_symbol_5;
|
2021-07-23 13:10:12 +00:00
|
|
|
int const x_238 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
|
|
|
int const x_241 = x_6.x_GLF_uniform_int_values.arr[3].el;
|
|
|
|
int const x_244 = x_6.x_GLF_uniform_int_values.arr[3].el;
|
|
|
|
int const x_247 = x_6.x_GLF_uniform_int_values.arr[2].el;
|
2021-08-04 22:15:28 +00:00
|
|
|
*(tint_symbol_7) = float4(float(x_238), float(x_241), float(x_244), float(x_247));
|
2021-07-23 13:10:12 +00:00
|
|
|
int const x_251 = x_6.x_GLF_uniform_int_values.arr[3].el;
|
|
|
|
i = x_251;
|
|
|
|
while (true) {
|
|
|
|
bool x_277 = false;
|
|
|
|
bool x_278_phi = false;
|
|
|
|
int const x_256 = i;
|
|
|
|
int const x_258 = x_6.x_GLF_uniform_int_values.arr[1].el;
|
|
|
|
if ((x_256 < x_258)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
int const x_261 = i;
|
|
|
|
int const x_263 = arr0.arr[x_261];
|
|
|
|
int const x_264 = i;
|
|
|
|
int const x_266 = ref0.arr[x_264];
|
|
|
|
bool const x_267 = (x_263 != x_266);
|
|
|
|
x_278_phi = x_267;
|
|
|
|
if (!(x_267)) {
|
|
|
|
int const x_271 = i;
|
|
|
|
int const x_273 = arr1.arr[x_271];
|
|
|
|
int const x_274 = i;
|
|
|
|
int const x_276 = ref1.arr[x_274];
|
|
|
|
x_277 = (x_273 != x_276);
|
|
|
|
x_278_phi = x_277;
|
|
|
|
}
|
|
|
|
bool const x_278 = x_278_phi;
|
|
|
|
if (x_278) {
|
|
|
|
int const x_282 = x_6.x_GLF_uniform_int_values.arr[3].el;
|
|
|
|
float const x_283 = float(x_282);
|
2021-08-04 22:15:28 +00:00
|
|
|
*(tint_symbol_7) = float4(x_283, x_283, x_283, x_283);
|
2021-07-23 13:10:12 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
int const x_285 = i;
|
2021-07-30 18:59:06 +00:00
|
|
|
i = as_type<int>((as_type<uint>(x_285) + as_type<uint>(1)));
|
2021-07-23 13:10:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2021-08-04 22:15:28 +00:00
|
|
|
main_out tint_symbol_inner(constant buf0& x_6, thread float4* const tint_symbol_8) {
|
|
|
|
main_1(x_6, tint_symbol_8);
|
|
|
|
main_out const tint_symbol_6 = {.x_GLF_color_1=*(tint_symbol_8)};
|
|
|
|
return tint_symbol_6;
|
|
|
|
}
|
|
|
|
|
2021-07-23 13:10:12 +00:00
|
|
|
fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]]) {
|
|
|
|
thread float4 tint_symbol_9 = 0.0f;
|
2021-08-04 22:15:28 +00:00
|
|
|
main_out const inner_result = tint_symbol_inner(x_6, &(tint_symbol_9));
|
|
|
|
tint_symbol_1 wrapper_result = {};
|
|
|
|
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
|
|
|
return wrapper_result;
|
2021-07-23 13:10:12 +00:00
|
|
|
}
|
|
|
|
|