blob: c5bf9c843c85d555c6122fa3922f92d88f208c39 [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[6];
};
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)]];
};
void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) {
int x_36 = 0;
bool x_74 = false;
float4 x_33_phi = 0.0f;
int x_36_phi = 0;
int x_38_phi = 0;
bool x_75_phi = false;
int const x_29 = x_5.x_GLF_uniform_int_values.arr[0].el;
int const x_31 = x_5.x_GLF_uniform_int_values.arr[1].el;
x_33_phi = float4(0.0f, 0.0f, 0.0f, 0.0f);
x_36_phi = x_29;
x_38_phi = x_31;
while (true) {
float4 x_53 = 0.0f;
int x_39 = 0;
float4 x_34_phi = 0.0f;
int x_62_phi = 0;
float4 const x_33 = x_33_phi;
x_36 = x_36_phi;
int const x_38 = x_38_phi;
int const x_41 = x_5.x_GLF_uniform_int_values.arr[4].el;
if ((x_38 < x_41)) {
} else {
break;
}
float4 x_53_phi = 0.0f;
int x_56_phi = 0;
switch(0u) {
default: {
int const x_48 = x_5.x_GLF_uniform_int_values.arr[3].el;
if ((x_38 > x_48)) {
x_34_phi = x_33;
x_62_phi = 2;
break;
}
x_53_phi = x_33;
x_56_phi = x_29;
while (true) {
float4 x_54 = 0.0f;
int x_57 = 0;
x_53 = x_53_phi;
int const x_56 = x_56_phi;
if ((x_56 < x_41)) {
} else {
break;
}
{
float const x_61 = float((x_38 + x_56));
x_54 = float4(x_61, x_61, x_61, x_61);
x_57 = (x_56 + 1);
x_53_phi = x_54;
x_56_phi = x_57;
}
}
*(tint_symbol_4) = x_53;
x_34_phi = x_53;
x_62_phi = x_31;
break;
}
}
float4 const x_34 = x_34_phi;
int const x_62 = x_62_phi;
{
x_39 = (x_38 + 1);
x_33_phi = x_34;
x_36_phi = as_type<int>((x_36 + as_type<int>(x_62)));
x_38_phi = x_39;
}
}
float4 const x_63 = *(tint_symbol_4);
int const x_65 = x_5.x_GLF_uniform_int_values.arr[2].el;
float const x_66 = float(x_65);
bool const x_69 = all((x_63 == float4(x_66, x_66, x_66, x_66)));
x_75_phi = x_69;
if (x_69) {
int const x_73 = x_5.x_GLF_uniform_int_values.arr[5].el;
x_74 = (x_36 == as_type<int>(x_73));
x_75_phi = x_74;
}
bool const x_75 = x_75_phi;
if (x_75) {
float const x_79 = float(x_31);
float const x_80 = float(x_29);
*(tint_symbol_4) = float4(x_79, x_80, x_80, x_79);
} else {
float const x_82 = float(x_29);
*(tint_symbol_4) = float4(x_82, x_82, x_82, x_82);
}
return;
}
fragment tint_symbol_1 tint_symbol(constant buf0& x_5 [[buffer(0)]]) {
thread float4 tint_symbol_5 = 0.0f;
main_1(x_5, &(tint_symbol_5));
main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
return tint_symbol_3;
}