323 lines
12 KiB
Plaintext
323 lines
12 KiB
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
struct tint_padded_array_element {
|
|
/* 0x0000 */ float el;
|
|
/* 0x0004 */ int8_t tint_pad[12];
|
|
};
|
|
struct tint_array_wrapper {
|
|
/* 0x0000 */ tint_padded_array_element arr[3];
|
|
};
|
|
struct buf0 {
|
|
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_float_values;
|
|
};
|
|
struct tint_padded_array_element_1 {
|
|
/* 0x0000 */ int el;
|
|
/* 0x0004 */ int8_t tint_pad_1[12];
|
|
};
|
|
struct tint_array_wrapper_1 {
|
|
/* 0x0000 */ tint_padded_array_element_1 arr[4];
|
|
};
|
|
struct buf1 {
|
|
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_int_values;
|
|
};
|
|
struct main_out {
|
|
float4 x_GLF_color_1;
|
|
};
|
|
struct tint_symbol_1 {
|
|
float4 x_GLF_color_1 [[color(0)]];
|
|
};
|
|
|
|
void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symbol_4, thread float4* const tint_symbol_5) {
|
|
float f = 0.0f;
|
|
int i = 0;
|
|
int i_1 = 0;
|
|
int i_2 = 0;
|
|
int i_3 = 0;
|
|
int i_4 = 0;
|
|
int i_5 = 0;
|
|
int i_6 = 0;
|
|
int i_7 = 0;
|
|
int i_8 = 0;
|
|
int i_9 = 0;
|
|
int i_10 = 0;
|
|
int i_11 = 0;
|
|
int i_12 = 0;
|
|
int i_13 = 0;
|
|
int i_14 = 0;
|
|
float sum = 0.0f;
|
|
int r = 0;
|
|
*(tint_symbol_4) = 0;
|
|
float const x_53 = x_7.x_GLF_uniform_float_values.arr[1].el;
|
|
f = x_53;
|
|
int const x_55 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
i = x_55;
|
|
while (true) {
|
|
int const x_60 = i;
|
|
int const x_62 = x_10.x_GLF_uniform_int_values.arr[0].el;
|
|
if ((x_60 < x_62)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_66 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
i_1 = x_66;
|
|
while (true) {
|
|
int const x_71 = i_1;
|
|
int const x_73 = x_10.x_GLF_uniform_int_values.arr[0].el;
|
|
if ((x_71 < x_73)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_77 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
i_2 = x_77;
|
|
while (true) {
|
|
int const x_82 = i_2;
|
|
int const x_84 = x_10.x_GLF_uniform_int_values.arr[0].el;
|
|
if ((x_82 < x_84)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_88 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
i_3 = x_88;
|
|
while (true) {
|
|
int const x_93 = i_3;
|
|
int const x_95 = x_10.x_GLF_uniform_int_values.arr[0].el;
|
|
if ((x_93 < x_95)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_99 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
i_4 = x_99;
|
|
while (true) {
|
|
int const x_104 = i_4;
|
|
int const x_106 = x_10.x_GLF_uniform_int_values.arr[0].el;
|
|
if ((x_104 < x_106)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_110 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
i_5 = x_110;
|
|
while (true) {
|
|
int const x_115 = i_5;
|
|
int const x_117 = x_10.x_GLF_uniform_int_values.arr[0].el;
|
|
if ((x_115 < x_117)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_121 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
i_6 = x_121;
|
|
while (true) {
|
|
int const x_126 = i_6;
|
|
int const x_128 = x_10.x_GLF_uniform_int_values.arr[0].el;
|
|
if ((x_126 < x_128)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_132 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
i_7 = x_132;
|
|
while (true) {
|
|
int const x_137 = i_7;
|
|
int const x_139 = x_10.x_GLF_uniform_int_values.arr[0].el;
|
|
if ((x_137 < x_139)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_143 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
i_8 = x_143;
|
|
while (true) {
|
|
int const x_148 = i_8;
|
|
int const x_150 = x_10.x_GLF_uniform_int_values.arr[0].el;
|
|
if ((x_148 < x_150)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_154 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
i_9 = x_154;
|
|
while (true) {
|
|
int const x_159 = i_9;
|
|
int const x_161 = x_10.x_GLF_uniform_int_values.arr[0].el;
|
|
if ((x_159 < x_161)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_165 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
i_10 = x_165;
|
|
while (true) {
|
|
int const x_170 = i_10;
|
|
int const x_172 = x_10.x_GLF_uniform_int_values.arr[0].el;
|
|
if ((x_170 < x_172)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_176 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
i_11 = x_176;
|
|
while (true) {
|
|
int const x_181 = i_11;
|
|
int const x_183 = x_10.x_GLF_uniform_int_values.arr[2].el;
|
|
if ((x_181 < x_183)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_187 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
i_12 = x_187;
|
|
while (true) {
|
|
int const x_192 = i_12;
|
|
int const x_194 = x_10.x_GLF_uniform_int_values.arr[0].el;
|
|
if ((x_192 < x_194)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_198 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
i_13 = x_198;
|
|
while (true) {
|
|
int const x_203 = i_13;
|
|
int const x_205 = x_10.x_GLF_uniform_int_values.arr[0].el;
|
|
if ((x_203 < x_205)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_209 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
i_14 = x_209;
|
|
while (true) {
|
|
int const x_214 = i_14;
|
|
int const x_216 = x_10.x_GLF_uniform_int_values.arr[2].el;
|
|
if ((x_214 < x_216)) {
|
|
} else {
|
|
break;
|
|
}
|
|
while (true) {
|
|
int const x_223 = *(tint_symbol_4);
|
|
*(tint_symbol_4) = as_type<int>((as_type<uint>(x_223) + as_type<uint>(1)));
|
|
{
|
|
int const x_225 = *(tint_symbol_4);
|
|
int const x_227 = x_10.x_GLF_uniform_int_values.arr[3].el;
|
|
if ((x_225 < as_type<int>((as_type<uint>(100) - as_type<uint>(x_227))))) {
|
|
} else {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
float const x_231 = x_7.x_GLF_uniform_float_values.arr[0].el;
|
|
float const x_232 = f;
|
|
f = (x_232 + x_231);
|
|
{
|
|
int const x_234 = i_14;
|
|
i_14 = as_type<int>((as_type<uint>(x_234) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
{
|
|
int const x_236 = i_13;
|
|
i_13 = as_type<int>((as_type<uint>(x_236) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
{
|
|
int const x_238 = i_12;
|
|
i_12 = as_type<int>((as_type<uint>(x_238) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
{
|
|
int const x_240 = i_11;
|
|
i_11 = as_type<int>((as_type<uint>(x_240) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
{
|
|
int const x_242 = i_10;
|
|
i_10 = as_type<int>((as_type<uint>(x_242) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
{
|
|
int const x_244 = i_9;
|
|
i_9 = as_type<int>((as_type<uint>(x_244) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
{
|
|
int const x_246 = i_8;
|
|
i_8 = as_type<int>((as_type<uint>(x_246) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
{
|
|
int const x_248 = i_7;
|
|
i_7 = as_type<int>((as_type<uint>(x_248) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
{
|
|
int const x_250 = i_6;
|
|
i_6 = as_type<int>((as_type<uint>(x_250) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
{
|
|
int const x_252 = i_5;
|
|
i_5 = as_type<int>((as_type<uint>(x_252) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
{
|
|
int const x_254 = i_4;
|
|
i_4 = as_type<int>((as_type<uint>(x_254) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
{
|
|
int const x_256 = i_3;
|
|
i_3 = as_type<int>((as_type<uint>(x_256) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
{
|
|
int const x_258 = i_2;
|
|
i_2 = as_type<int>((as_type<uint>(x_258) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
{
|
|
int const x_260 = i_1;
|
|
i_1 = as_type<int>((as_type<uint>(x_260) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
{
|
|
int const x_262 = i;
|
|
i = as_type<int>((as_type<uint>(x_262) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
float const x_265 = x_7.x_GLF_uniform_float_values.arr[1].el;
|
|
sum = x_265;
|
|
int const x_267 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
r = x_267;
|
|
while (true) {
|
|
int const x_272 = *(tint_symbol_4);
|
|
if ((x_272 < 100)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_275 = *(tint_symbol_4);
|
|
*(tint_symbol_4) = as_type<int>((as_type<uint>(x_275) + as_type<uint>(1)));
|
|
float const x_277 = f;
|
|
float const x_278 = sum;
|
|
sum = (x_278 + x_277);
|
|
{
|
|
int const x_280 = r;
|
|
r = as_type<int>((as_type<uint>(x_280) + as_type<uint>(1)));
|
|
}
|
|
}
|
|
float const x_282 = sum;
|
|
float const x_284 = x_7.x_GLF_uniform_float_values.arr[2].el;
|
|
if ((x_282 == x_284)) {
|
|
int const x_290 = x_10.x_GLF_uniform_int_values.arr[0].el;
|
|
int const x_293 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
int const x_296 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
int const x_299 = x_10.x_GLF_uniform_int_values.arr[0].el;
|
|
*(tint_symbol_5) = float4(float(x_290), float(x_293), float(x_296), float(x_299));
|
|
} else {
|
|
int const x_303 = x_10.x_GLF_uniform_int_values.arr[1].el;
|
|
float const x_304 = float(x_303);
|
|
*(tint_symbol_5) = float4(x_304, x_304, x_304, x_304);
|
|
}
|
|
return;
|
|
}
|
|
|
|
fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]], constant buf1& x_10 [[buffer(1)]]) {
|
|
thread int tint_symbol_6 = 0;
|
|
thread float4 tint_symbol_7 = 0.0f;
|
|
main_1(x_7, x_10, &(tint_symbol_6), &(tint_symbol_7));
|
|
main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
|
|
tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
|
|
return tint_symbol_3;
|
|
}
|
|
|