blob: 1288d26b9f0d24a6d771ae322e9821e35d75b254 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct buf0 {
/* 0x0000 */ packed_float2 injectionSwitch;
};
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_6, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
while (true) {
float4 x_42 = 0.0f;
bool x_39 = false;
bool x_38_phi = false;
float4 x_41_phi = 0.0f;
float const x_32 = (*(tint_symbol_5)).x;
int const x_34 = int(clamp(x_32, 0.0f, 1.0f));
*(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
x_38_phi = false;
x_41_phi = float4(0.0f, 0.0f, 0.0f, 0.0f);
while (true) {
float4 x_42_phi = 0.0f;
int x_47_phi = 0;
bool x_39_phi = false;
bool const x_38 = x_38_phi;
float4 const x_41 = x_41_phi;
x_42_phi = x_41;
x_47_phi = 0;
while (true) {
float4 x_45 = 0.0f;
int x_48 = 0;
x_42 = x_42_phi;
int const x_47 = x_47_phi;
float const x_50 = x_6.injectionSwitch.y;
x_39_phi = x_38;
if ((x_47 < as_type<int>((as_type<uint>(x_34) + as_type<uint>(int(x_50)))))) {
} else {
break;
}
float4 x_66 = 0.0f;
float4 x_70 = 0.0f;
float4 x_45_phi = 0.0f;
if ((x_34 < 0)) {
x_39_phi = true;
break;
} else {
if ((x_34 == 1)) {
float const x_64 = float(x_34);
float2 const x_65 = float2(x_64, x_64);
x_66 = float4(x_65.x, x_42.y, x_42.z, x_65.y);
x_45_phi = x_66;
} else {
float const x_68 = float(as_type<int>((as_type<uint>(x_34) + as_type<uint>(1))));
float2 const x_69 = float2(x_68, x_68);
x_70 = float4(x_69.x, x_42.y, x_42.z, x_69.y);
x_45_phi = x_70;
}
x_45 = x_45_phi;
}
{
x_48 = as_type<int>((as_type<uint>(x_47) + as_type<uint>(1)));
x_42_phi = x_45;
x_47_phi = x_48;
}
}
x_39 = x_39_phi;
if (x_39) {
break;
}
{
x_38_phi = x_39;
x_41_phi = x_42;
if ((x_34 < 0)) {
} else {
break;
}
}
}
if (x_39) {
break;
}
*(tint_symbol_6) = x_42;
break;
}
return;
}
fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_6 [[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_6, &(tint_symbol_7), &(tint_symbol_8));
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;
}