blob: 5383bb276f6813ee454cc3d817e2bf94dfd2ac62 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct tint_padded_array_element {
/* 0x0000 */ int el;
/* 0x0004 */ int8_t tint_pad[12];
};
struct tint_array_wrapper {
/* 0x0000 */ tint_padded_array_element arr[5];
};
struct buf0 {
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_int_values;
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
int func_f1_(constant buf0& x_8, thread float* const f) {
int a = 0;
int b = 0;
int i = 0;
int const x_60 = x_8.x_GLF_uniform_int_values.arr[1].el;
a = x_60;
int const x_62 = x_8.x_GLF_uniform_int_values.arr[2].el;
b = x_62;
int const x_64 = x_8.x_GLF_uniform_int_values.arr[2].el;
i = x_64;
while (true) {
int const x_69 = i;
int const x_71 = x_8.x_GLF_uniform_int_values.arr[4].el;
if ((x_69 < x_71)) {
} else {
break;
}
int const x_74 = a;
int const x_76 = x_8.x_GLF_uniform_int_values.arr[3].el;
if ((x_74 > x_76)) {
break;
}
float const x_80 = *(f);
int const x_83 = x_8.x_GLF_uniform_int_values.arr[1].el;
int const x_86 = i;
a = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_80)) - as_type<uint>((x_83 / 2))))) + as_type<uint>(x_86)));
int const x_88 = b;
b = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
{
int const x_90 = i;
i = as_type<int>((as_type<uint>(x_90) + as_type<uint>(1)));
}
}
int const x_92 = b;
int const x_94 = x_8.x_GLF_uniform_int_values.arr[0].el;
if ((x_92 == x_94)) {
int const x_100 = x_8.x_GLF_uniform_int_values.arr[1].el;
return x_100;
} else {
int const x_102 = x_8.x_GLF_uniform_int_values.arr[2].el;
return x_102;
}
return 0;
}
void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
float param = 0.0f;
param = 0.699999988f;
int const x_34 = func_f1_(x_8, &(param));
int const x_36 = x_8.x_GLF_uniform_int_values.arr[1].el;
if ((x_34 == x_36)) {
int const x_42 = x_8.x_GLF_uniform_int_values.arr[1].el;
int const x_45 = x_8.x_GLF_uniform_int_values.arr[2].el;
int const x_48 = x_8.x_GLF_uniform_int_values.arr[2].el;
int const x_51 = x_8.x_GLF_uniform_int_values.arr[1].el;
*(tint_symbol_3) = float4(float(x_42), float(x_45), float(x_48), float(x_51));
} else {
int const x_55 = x_8.x_GLF_uniform_int_values.arr[2].el;
float const x_56 = float(x_55);
*(tint_symbol_3) = float4(x_56, x_56, x_56, x_56);
}
return;
}
main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
main_1(x_8, 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_8 [[buffer(0)]]) {
thread float4 tint_symbol_5 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}