blob: 0972c1e1c14d3851135fc8620b0fa635963ba722 [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[4];
};
struct buf1 {
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_int_values;
};
struct tint_padded_array_element_1 {
/* 0x0000 */ float el;
/* 0x0004 */ int8_t tint_pad_1[12];
};
struct tint_array_wrapper_1 {
/* 0x0000 */ tint_padded_array_element_1 arr[3];
};
struct buf0 {
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_float_values;
};
struct tint_array_wrapper_2 {
float arr[2];
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_symbol_4) {
tint_array_wrapper_2 sums = {};
int a = 0;
int b = 0;
int c = 0;
int d = 0;
float2x2 indexable = float2x2(0.0f);
float2x2 indexable_1 = float2x2(0.0f);
bool x_158 = false;
bool x_159_phi = false;
int const x_16 = x_6.x_GLF_uniform_int_values.arr[1].el;
float const x_85 = x_8.x_GLF_uniform_float_values.arr[0].el;
sums.arr[x_16] = -(x_85);
int const x_18 = x_6.x_GLF_uniform_int_values.arr[2].el;
float const x_90 = x_8.x_GLF_uniform_float_values.arr[0].el;
sums.arr[x_18] = -(x_90);
int const x_19 = x_6.x_GLF_uniform_int_values.arr[1].el;
a = x_19;
while (true) {
int const x_20 = a;
int const x_21 = x_6.x_GLF_uniform_int_values.arr[0].el;
if ((x_20 < x_21)) {
} else {
break;
}
int const x_22 = x_6.x_GLF_uniform_int_values.arr[1].el;
b = x_22;
while (true) {
int const x_23 = b;
int const x_24 = x_6.x_GLF_uniform_int_values.arr[3].el;
if ((x_23 < x_24)) {
} else {
break;
}
int const x_25 = x_6.x_GLF_uniform_int_values.arr[1].el;
c = x_25;
while (true) {
int const x_26 = c;
int const x_27 = a;
if ((x_26 <= x_27)) {
} else {
break;
}
int const x_28 = x_6.x_GLF_uniform_int_values.arr[1].el;
d = x_28;
while (true) {
int const x_29 = d;
int const x_30 = x_6.x_GLF_uniform_int_values.arr[3].el;
if ((x_29 < x_30)) {
} else {
break;
}
int const x_31 = a;
int const x_32 = x_6.x_GLF_uniform_int_values.arr[2].el;
float const x_125 = float(x_32);
int const x_33 = c;
int const x_34 = x_6.x_GLF_uniform_int_values.arr[2].el;
indexable = float2x2(float2(x_125, 0.0f), float2(0.0f, x_125));
float const x_131 = indexable[x_33][x_34];
sums.arr[x_31] = x_131;
int const x_35 = a;
int const x_36 = x_6.x_GLF_uniform_int_values.arr[2].el;
float const x_134 = float(x_36);
int const x_37 = c;
int const x_38 = x_6.x_GLF_uniform_int_values.arr[2].el;
indexable_1 = float2x2(float2(x_134, 0.0f), float2(0.0f, x_134));
float const x_140 = indexable_1[x_37][x_38];
float const x_142 = sums.arr[x_35];
sums.arr[x_35] = (x_142 + x_140);
{
int const x_39 = d;
d = as_type<int>((as_type<uint>(x_39) + as_type<uint>(1)));
}
}
{
int const x_41 = c;
c = as_type<int>((as_type<uint>(x_41) + as_type<uint>(1)));
}
}
{
int const x_43 = b;
b = as_type<int>((as_type<uint>(x_43) + as_type<uint>(1)));
}
}
{
int const x_45 = a;
a = as_type<int>((as_type<uint>(x_45) + as_type<uint>(1)));
}
}
int const x_47 = x_6.x_GLF_uniform_int_values.arr[1].el;
float const x_147 = sums.arr[x_47];
float const x_149 = x_8.x_GLF_uniform_float_values.arr[1].el;
bool const x_150 = (x_147 == x_149);
x_159_phi = x_150;
if (x_150) {
int const x_48 = x_6.x_GLF_uniform_int_values.arr[2].el;
float const x_155 = sums.arr[x_48];
float const x_157 = x_8.x_GLF_uniform_float_values.arr[2].el;
x_158 = (x_155 == x_157);
x_159_phi = x_158;
}
bool const x_159 = x_159_phi;
if (x_159) {
int const x_49 = x_6.x_GLF_uniform_int_values.arr[2].el;
int const x_50 = x_6.x_GLF_uniform_int_values.arr[1].el;
int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el;
int const x_52 = x_6.x_GLF_uniform_int_values.arr[2].el;
*(tint_symbol_4) = float4(float(x_49), float(x_50), float(x_51), float(x_52));
} else {
int const x_53 = x_6.x_GLF_uniform_int_values.arr[1].el;
float const x_173 = float(x_53);
*(tint_symbol_4) = float4(x_173, x_173, x_173, x_173);
}
return;
}
fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_8 [[buffer(0)]]) {
thread float4 tint_symbol_5 = 0.0f;
main_1(x_6, x_8, &(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;
}