blob: 35fcbc7b53ff1c4878c8589b76b38f58dbae9f52 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct buf0 {
/* 0x0000 */ packed_int4 sequence;
};
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, thread float4* const tint_symbol_3) {
int4 a = 0;
int i = 0;
int sum = 0;
a = int4(0, 0, 0, 0);
i = 0;
while (true) {
int const x_40 = i;
int const x_42 = x_7.sequence.w;
if ((x_40 < as_type<int>((as_type<uint>(x_42) + as_type<uint>(1))))) {
} else {
break;
}
int const x_46 = i;
int const x_48 = x_7.sequence.x;
int const x_49 = i;
int const x_52 = x_7.sequence[clamp(x_46, x_48, x_49)];
if ((x_52 == 1)) {
int const x_57 = i;
a[x_57] = 5;
} else {
int const x_59 = i;
int const x_60 = i;
a[x_59] = x_60;
}
{
int const x_62 = i;
i = as_type<int>((as_type<uint>(x_62) + as_type<uint>(1)));
}
}
int const x_65 = a.x;
int const x_67 = a.y;
int const x_70 = a.z;
int const x_73 = a.w;
sum = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_65) + as_type<uint>(x_67)))) + as_type<uint>(x_70)))) + as_type<uint>(x_73)));
int const x_75 = sum;
if ((x_75 == 10)) {
*(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
}
return;
}
main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
main_1(x_7, tint_symbol_4);
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
return tint_symbol_2;
}
fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
thread float4 tint_symbol_5 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}