blob: fcf1e30a2eb106a7cbd65413d0e633872157400b [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct buf0 {
/* 0x0000 */ int five;
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
float func_f1_(thread float* const x, thread float4* const tint_symbol_3) {
float const x_56 = *(x);
if ((x_56 > 5.0f)) {
float const x_61 = (*(tint_symbol_3)).x;
if ((x_61 < 0.5f)) {
discard_fragment();
} else {
float const x_67 = (*(tint_symbol_3)).y;
if ((x_67 < 0.5f)) {
discard_fragment();
}
}
}
float const x_71 = *(x);
return (x_71 + 1.0f);
}
void main_1(constant buf0& x_10, thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) {
float f = 0.0f;
int i = 0;
float param = 0.0f;
f = 0.0f;
i = 0;
while (true) {
int const x_39 = i;
int const x_41 = x_10.five;
if ((x_39 < x_41)) {
} else {
break;
}
{
int const x_45 = i;
param = float(x_45);
float const x_47 = func_f1_(&(param), tint_symbol_4);
f = x_47;
int const x_48 = i;
i = as_type<int>((as_type<uint>(x_48) + as_type<uint>(1)));
}
}
float const x_50 = f;
if ((x_50 == 5.0f)) {
*(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;
}
main_out tint_symbol_inner(constant buf0& x_10, float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
*(tint_symbol_6) = gl_FragCoord_param;
main_1(x_10, tint_symbol_6, tint_symbol_7);
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_7)};
return tint_symbol_2;
}
fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_10 [[buffer(0)]]) {
thread float4 tint_symbol_8 = 0.0f;
thread float4 tint_symbol_9 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_10, gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}