blob: 9126868f0c42a82475de1f6d155ef7058e6db71a [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct tint_array_wrapper {
float3 arr[2];
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
float3 func_() {
float2 v = 0.0f;
int i = 0;
int k = 0;
v = float2(1.0f, 1.0f);
i = 0;
k = 0;
while (true) {
int const x_79 = k;
if ((x_79 < 2)) {
} else {
break;
}
float const x_83 = v.y;
if (((x_83 + 1.0f) > 4.0f)) {
break;
}
v.y = 1.0f;
int const x_89 = i;
i = as_type<int>((as_type<uint>(x_89) + as_type<uint>(1)));
{
int const x_91 = k;
k = as_type<int>((as_type<uint>(x_91) + as_type<uint>(1)));
}
}
int const x_93 = i;
if ((x_93 < 10)) {
return float3(1.0f, 0.0f, 0.0f);
} else {
return float3(0.0f, 0.0f, 1.0f);
}
return float3(0.0f, 0.0f, 0.0f);
}
void main_1(thread float4* const tint_symbol_3) {
int j = 0;
tint_array_wrapper data = {};
int j_1 = 0;
j = 0;
while (true) {
int const x_46 = j;
if ((x_46 < 1)) {
} else {
break;
}
int const x_49 = j;
float3 const x_50 = func_();
data.arr[x_49] = x_50;
{
int const x_52 = j;
j = as_type<int>((as_type<uint>(x_52) + as_type<uint>(1)));
}
}
j_1 = 0;
while (true) {
int const x_58 = j_1;
if ((x_58 < 1)) {
} else {
break;
}
int const x_61 = j_1;
float3 const x_64 = func_();
data.arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(x_61)))) + as_type<uint>(1)))] = x_64;
{
int const x_66 = j_1;
j_1 = as_type<int>((as_type<uint>(x_66) + as_type<uint>(1)));
}
}
float3 const x_69 = data.arr[0];
*(tint_symbol_3) = float4(x_69.x, x_69.y, x_69.z, 1.0f);
return;
}
main_out tint_symbol_inner(thread float4* const tint_symbol_4) {
main_1(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() {
thread float4 tint_symbol_5 = 0.0f;
main_out const inner_result = tint_symbol_inner(&(tint_symbol_5));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}