blob: cbab4dbd15e4ffa0ce51b76032a6b4fedb4d5d7e [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct tint_padded_array_element {
/* 0x0000 */ float el;
/* 0x0004 */ int8_t tint_pad[12];
};
struct tint_array_wrapper {
/* 0x0000 */ tint_padded_array_element arr[1];
};
struct buf0 {
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_float_values;
};
struct tint_padded_array_element_1 {
/* 0x0000 */ int el;
/* 0x0004 */ int8_t tint_pad_1[12];
};
struct tint_array_wrapper_1 {
/* 0x0000 */ tint_padded_array_element_1 arr[3];
};
struct buf1 {
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_int_values;
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_2 {
float4 x_GLF_color_1 [[color(0)]];
};
int f1_(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_5) {
int a = 0;
int i = 0;
a = 256;
float const x_65 = (*(tint_symbol_5)).y;
float const x_67 = x_8.x_GLF_uniform_float_values.arr[0].el;
if ((x_65 > x_67)) {
int const x_71 = a;
a = (x_71 + 1);
}
int const x_73 = a;
i = popcount(x_73);
int const x_75 = i;
int const x_77 = x_11.x_GLF_uniform_int_values.arr[0].el;
if ((x_75 < x_77)) {
int const x_82 = x_11.x_GLF_uniform_int_values.arr[0].el;
return x_82;
}
int const x_83 = i;
return x_83;
}
void main_1(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
int a_1 = 0;
int const x_38 = f1_(x_8, x_11, tint_symbol_6);
a_1 = x_38;
int const x_39 = a_1;
int const x_41 = x_11.x_GLF_uniform_int_values.arr[2].el;
if ((x_39 == x_41)) {
int const x_47 = x_11.x_GLF_uniform_int_values.arr[0].el;
int const x_50 = x_11.x_GLF_uniform_int_values.arr[1].el;
int const x_53 = x_11.x_GLF_uniform_int_values.arr[1].el;
int const x_56 = x_11.x_GLF_uniform_int_values.arr[0].el;
*(tint_symbol_7) = float4(float(x_47), float(x_50), float(x_53), float(x_56));
} else {
int const x_60 = x_11.x_GLF_uniform_int_values.arr[1].el;
float const x_61 = float(x_60);
*(tint_symbol_7) = float4(x_61, x_61, x_61, x_61);
}
return;
}
fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]], constant buf1& x_11 [[buffer(1)]]) {
thread float4 tint_symbol_8 = 0.0f;
thread float4 tint_symbol_9 = 0.0f;
tint_symbol_8 = gl_FragCoord_param;
main_1(x_8, x_11, &(tint_symbol_8), &(tint_symbol_9));
main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_9};
tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
return tint_symbol_4;
}