2021-07-23 13:10:12 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
|
|
|
|
using namespace metal;
|
|
|
|
struct buf0 {
|
2021-08-23 21:45:23 +00:00
|
|
|
/* 0x0000 */ int4 sequence;
|
2021-07-23 13:10:12 +00:00
|
|
|
};
|
|
|
|
struct main_out {
|
|
|
|
float4 x_GLF_color_1;
|
|
|
|
};
|
|
|
|
struct tint_symbol_1 {
|
|
|
|
float4 x_GLF_color_1 [[color(0)]];
|
|
|
|
};
|
|
|
|
|
2021-08-04 22:15:28 +00:00
|
|
|
void main_1(constant buf0& x_7, thread float4* const tint_symbol_3) {
|
2021-07-23 13:10:12 +00:00
|
|
|
int4 a = 0;
|
|
|
|
int i = 0;
|
|
|
|
int sum = 0;
|
|
|
|
a = int4(0, 0, 0, 0);
|
|
|
|
i = 0;
|
|
|
|
while (true) {
|
|
|
|
int const x_40 = i;
|
|
|
|
int const x_42 = x_7.sequence.w;
|
2021-07-30 18:59:06 +00:00
|
|
|
if ((x_40 < as_type<int>((as_type<uint>(x_42) + as_type<uint>(1))))) {
|
2021-07-23 13:10:12 +00:00
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
int const x_46 = i;
|
|
|
|
int const x_48 = x_7.sequence.x;
|
|
|
|
int const x_49 = i;
|
|
|
|
int const x_52 = x_7.sequence[clamp(x_46, x_48, x_49)];
|
|
|
|
if ((x_52 == 1)) {
|
|
|
|
int const x_57 = i;
|
|
|
|
a[x_57] = 5;
|
|
|
|
} else {
|
|
|
|
int const x_59 = i;
|
|
|
|
int const x_60 = i;
|
|
|
|
a[x_59] = x_60;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
int const x_62 = i;
|
2021-07-30 18:59:06 +00:00
|
|
|
i = as_type<int>((as_type<uint>(x_62) + as_type<uint>(1)));
|
2021-07-23 13:10:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
int const x_65 = a.x;
|
|
|
|
int const x_67 = a.y;
|
|
|
|
int const x_70 = a.z;
|
|
|
|
int const x_73 = a.w;
|
2021-07-30 18:59:06 +00:00
|
|
|
sum = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_65) + as_type<uint>(x_67)))) + as_type<uint>(x_70)))) + as_type<uint>(x_73)));
|
2021-07-23 13:10:12 +00:00
|
|
|
int const x_75 = sum;
|
|
|
|
if ((x_75 == 10)) {
|
2021-08-04 22:15:28 +00:00
|
|
|
*(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
2021-07-23 13:10:12 +00:00
|
|
|
} else {
|
2021-08-04 22:15:28 +00:00
|
|
|
*(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
2021-07-23 13:10:12 +00:00
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2021-08-04 22:15:28 +00:00
|
|
|
main_out tint_symbol_inner(constant buf0& x_7, thread float4* const tint_symbol_4) {
|
|
|
|
main_1(x_7, tint_symbol_4);
|
|
|
|
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
|
|
|
|
return tint_symbol_2;
|
|
|
|
}
|
|
|
|
|
2021-07-23 13:10:12 +00:00
|
|
|
fragment tint_symbol_1 tint_symbol(constant buf0& x_7 [[buffer(0)]]) {
|
|
|
|
thread float4 tint_symbol_5 = 0.0f;
|
2021-08-04 22:15:28 +00:00
|
|
|
main_out const inner_result = tint_symbol_inner(x_7, &(tint_symbol_5));
|
|
|
|
tint_symbol_1 wrapper_result = {};
|
|
|
|
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
|
|
|
return wrapper_result;
|
2021-07-23 13:10:12 +00:00
|
|
|
}
|
|
|
|
|