blob: 348e88d3d33a99b7c9782db7946f3b7b61ec2a71 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct buf0 {
/* 0x0000 */ packed_float2 injectionSwitch;
};
struct tint_array_wrapper {
float arr[9];
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_2 {
float4 x_GLF_color_1 [[color(0)]];
};
void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
float2 v = 0.0f;
tint_array_wrapper floats = {};
int one = 0;
int i = 0;
bool alwaysFalse = false;
v = float2(0.0f, 0.0f);
floats.arr[1] = 0.0f;
float const x_46 = x_9.injectionSwitch.y;
one = int(x_46);
while (true) {
i = 0;
while (true) {
int const x_56 = i;
int const x_57 = one;
if ((x_56 < x_57)) {
} else {
break;
}
int const x_60 = i;
if ((x_60 == 0)) {
float const x_65 = x_9.injectionSwitch.x;
float const x_67 = x_9.injectionSwitch.y;
alwaysFalse = (x_65 > x_67);
bool const x_69 = alwaysFalse;
if (!(x_69)) {
int const x_73 = one;
floats.arr[x_73] = 1.0f;
*(tint_symbol_5) = float4(1.0f, 1.0f, 0.0f, 1.0f);
}
int const x_75 = one;
v[x_75] = 1.0f;
bool const x_77 = alwaysFalse;
if (x_77) {
discard_fragment();
}
float const x_81 = x_9.injectionSwitch.y;
if ((x_81 < 0.0f)) {
*(tint_symbol_5) = float4(0.0f, 1.0f, 0.0f, 1.0f);
}
}
{
int const x_85 = i;
i = as_type<int>((as_type<uint>(x_85) + as_type<uint>(1)));
}
}
{
int const x_87 = one;
if ((x_87 < 0)) {
} else {
break;
}
}
}
bool x_102 = false;
bool x_103_phi = false;
float const x_90 = (*(tint_symbol_6)).y;
if ((x_90 >= 0.0f)) {
float const x_96 = v.y;
bool const x_97 = (x_96 == 1.0f);
x_103_phi = x_97;
if (x_97) {
float const x_101 = floats.arr[1];
x_102 = (x_101 == 1.0f);
x_103_phi = x_102;
}
bool const x_103 = x_103_phi;
if (x_103) {
*(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f);
}
} else {
*(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f);
}
return;
}
fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_9 [[buffer(0)]]) {
thread float4 tint_symbol_7 = 0.0f;
thread float4 tint_symbol_8 = 0.0f;
tint_symbol_7 = gl_FragCoord_param;
main_1(x_9, &(tint_symbol_8), &(tint_symbol_7));
main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
return tint_symbol_4;
}