2021-07-23 13:10:12 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
|
|
|
|
using namespace metal;
|
|
|
|
struct buf0 {
|
|
|
|
/* 0x0000 */ packed_float2 injectionSwitch;
|
|
|
|
};
|
|
|
|
struct tint_array_wrapper {
|
|
|
|
int arr[10];
|
|
|
|
};
|
|
|
|
struct main_out {
|
|
|
|
float4 x_GLF_color_1;
|
|
|
|
};
|
|
|
|
struct tint_symbol_2 {
|
|
|
|
float4 x_GLF_color_1 [[color(0)]];
|
|
|
|
};
|
|
|
|
|
|
|
|
void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) {
|
|
|
|
tint_array_wrapper temp = {};
|
|
|
|
tint_array_wrapper data = {};
|
|
|
|
float x_190 = 0.0f;
|
|
|
|
float x_262 = 0.0f;
|
|
|
|
int x_63_phi = 0;
|
|
|
|
int x_103_phi = 0;
|
|
|
|
int x_112_phi = 0;
|
|
|
|
float x_263_phi = 0.0f;
|
|
|
|
float const x_60 = x_8.injectionSwitch.x;
|
|
|
|
int const x_61 = int(x_60);
|
|
|
|
x_63_phi = x_61;
|
|
|
|
while (true) {
|
|
|
|
int x_100 = 0;
|
|
|
|
int x_98 = 0;
|
|
|
|
int x_96 = 0;
|
|
|
|
int x_94 = 0;
|
|
|
|
int x_92 = 0;
|
|
|
|
int x_90 = 0;
|
|
|
|
int x_88 = 0;
|
|
|
|
int x_86 = 0;
|
|
|
|
int x_84 = 0;
|
|
|
|
int x_82 = 0;
|
|
|
|
int x_64_phi = 0;
|
|
|
|
int const x_63 = x_63_phi;
|
|
|
|
tint_array_wrapper const x_68 = data;
|
|
|
|
tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
|
|
|
|
data = tint_symbol_4;
|
|
|
|
data = x_68;
|
2021-07-30 08:22:58 +00:00
|
|
|
int const x_69 = (x_63 + 1);
|
2021-07-23 13:10:12 +00:00
|
|
|
x_64_phi = x_69;
|
|
|
|
switch(x_63) {
|
|
|
|
case 9: {
|
|
|
|
data.arr[x_63] = -5;
|
2021-07-30 08:22:58 +00:00
|
|
|
x_100 = (x_63 + 1);
|
2021-07-23 13:10:12 +00:00
|
|
|
x_64_phi = x_100;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 8: {
|
|
|
|
data.arr[x_63] = -4;
|
2021-07-30 08:22:58 +00:00
|
|
|
x_98 = (x_63 + 1);
|
2021-07-23 13:10:12 +00:00
|
|
|
x_64_phi = x_98;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 7: {
|
|
|
|
data.arr[x_63] = -3;
|
2021-07-30 08:22:58 +00:00
|
|
|
x_96 = (x_63 + 1);
|
2021-07-23 13:10:12 +00:00
|
|
|
x_64_phi = x_96;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 6: {
|
|
|
|
data.arr[x_63] = -2;
|
2021-07-30 08:22:58 +00:00
|
|
|
x_94 = (x_63 + 1);
|
2021-07-23 13:10:12 +00:00
|
|
|
x_64_phi = x_94;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 5: {
|
|
|
|
data.arr[x_63] = -1;
|
2021-07-30 08:22:58 +00:00
|
|
|
x_92 = (x_63 + 1);
|
2021-07-23 13:10:12 +00:00
|
|
|
x_64_phi = x_92;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 4: {
|
|
|
|
data.arr[x_63] = 0;
|
2021-07-30 08:22:58 +00:00
|
|
|
x_90 = (x_63 + 1);
|
2021-07-23 13:10:12 +00:00
|
|
|
x_64_phi = x_90;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 3: {
|
|
|
|
data.arr[x_63] = 1;
|
2021-07-30 08:22:58 +00:00
|
|
|
x_88 = (x_63 + 1);
|
2021-07-23 13:10:12 +00:00
|
|
|
x_64_phi = x_88;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 2: {
|
|
|
|
data.arr[x_63] = 2;
|
2021-07-30 08:22:58 +00:00
|
|
|
x_86 = (x_63 + 1);
|
2021-07-23 13:10:12 +00:00
|
|
|
x_64_phi = x_86;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 1: {
|
|
|
|
data.arr[x_63] = 3;
|
2021-07-30 08:22:58 +00:00
|
|
|
x_84 = (x_63 + 1);
|
2021-07-23 13:10:12 +00:00
|
|
|
x_64_phi = x_84;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 0: {
|
|
|
|
data.arr[x_63] = 4;
|
2021-07-30 08:22:58 +00:00
|
|
|
x_82 = (x_63 + 1);
|
2021-07-23 13:10:12 +00:00
|
|
|
x_64_phi = x_82;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default: {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int const x_64 = x_64_phi;
|
|
|
|
{
|
|
|
|
x_63_phi = x_64;
|
|
|
|
if ((x_64 < 10)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
x_103_phi = 0;
|
|
|
|
while (true) {
|
|
|
|
int x_104 = 0;
|
|
|
|
int const x_103 = x_103_phi;
|
|
|
|
if ((x_103 < 10)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
int const x_109 = data.arr[x_103];
|
|
|
|
temp.arr[x_103] = x_109;
|
2021-07-30 08:22:58 +00:00
|
|
|
x_104 = (x_103 + 1);
|
2021-07-23 13:10:12 +00:00
|
|
|
x_103_phi = x_104;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
x_112_phi = 1;
|
|
|
|
while (true) {
|
|
|
|
int x_113 = 0;
|
|
|
|
int x_119_phi = 0;
|
|
|
|
int const x_112 = x_112_phi;
|
|
|
|
if ((x_112 <= 9)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
x_119_phi = 0;
|
|
|
|
while (true) {
|
|
|
|
int x_131 = 0;
|
|
|
|
int x_136 = 0;
|
|
|
|
int x_131_phi = 0;
|
|
|
|
int x_134_phi = 0;
|
|
|
|
int x_136_phi = 0;
|
|
|
|
int x_158_phi = 0;
|
|
|
|
int x_161_phi = 0;
|
|
|
|
int x_171_phi = 0;
|
|
|
|
int const x_119 = x_119_phi;
|
|
|
|
if ((x_119 < 9)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
2021-07-30 08:22:58 +00:00
|
|
|
int const x_125 = (x_119 + x_112);
|
|
|
|
int const x_126 = (x_125 - 1);
|
|
|
|
int const x_120 = (x_119 + (2 * x_112));
|
|
|
|
int const x_129 = min((x_120 - 1), 9);
|
2021-07-23 13:10:12 +00:00
|
|
|
x_131_phi = x_119;
|
|
|
|
x_134_phi = x_125;
|
|
|
|
x_136_phi = x_119;
|
|
|
|
while (true) {
|
|
|
|
int x_151 = 0;
|
|
|
|
int x_154 = 0;
|
|
|
|
int x_135_phi = 0;
|
|
|
|
int x_137_phi = 0;
|
|
|
|
x_131 = x_131_phi;
|
|
|
|
int const x_134 = x_134_phi;
|
|
|
|
x_136 = x_136_phi;
|
|
|
|
if (((x_136 <= x_126) && (x_134 <= x_129))) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
int const x_143_save = x_136;
|
|
|
|
int const x_144 = data.arr[x_143_save];
|
|
|
|
int const x_145_save = x_134;
|
|
|
|
int const x_146 = data.arr[x_145_save];
|
2021-07-30 08:22:58 +00:00
|
|
|
int const x_132 = as_type<int>((x_131 + as_type<int>(1)));
|
2021-07-23 13:10:12 +00:00
|
|
|
if ((x_144 < x_146)) {
|
2021-07-30 08:22:58 +00:00
|
|
|
x_151 = as_type<int>((x_136 + as_type<int>(1)));
|
2021-07-23 13:10:12 +00:00
|
|
|
int const x_152 = data.arr[x_143_save];
|
|
|
|
temp.arr[x_131] = x_152;
|
|
|
|
x_135_phi = x_134;
|
|
|
|
x_137_phi = x_151;
|
|
|
|
} else {
|
2021-07-30 08:22:58 +00:00
|
|
|
x_154 = (x_134 + 1);
|
2021-07-23 13:10:12 +00:00
|
|
|
int const x_155 = data.arr[x_145_save];
|
|
|
|
temp.arr[x_131] = x_155;
|
|
|
|
x_135_phi = x_154;
|
|
|
|
x_137_phi = x_136;
|
|
|
|
}
|
|
|
|
int const x_135 = x_135_phi;
|
|
|
|
int const x_137 = x_137_phi;
|
|
|
|
{
|
|
|
|
x_131_phi = x_132;
|
|
|
|
x_134_phi = x_135;
|
|
|
|
x_136_phi = x_137;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
x_158_phi = x_131;
|
|
|
|
x_161_phi = x_136;
|
|
|
|
while (true) {
|
|
|
|
int x_159 = 0;
|
|
|
|
int x_162 = 0;
|
|
|
|
int const x_158 = x_158_phi;
|
|
|
|
int const x_161 = x_161_phi;
|
|
|
|
if (((x_161 < 10) && (x_161 <= x_126))) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
{
|
2021-07-30 08:22:58 +00:00
|
|
|
x_159 = (x_158 + 1);
|
|
|
|
x_162 = (x_161 + 1);
|
2021-07-23 13:10:12 +00:00
|
|
|
int const x_168 = data.arr[x_161];
|
|
|
|
temp.arr[x_158] = x_168;
|
|
|
|
x_158_phi = x_159;
|
|
|
|
x_161_phi = x_162;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
x_171_phi = x_119;
|
|
|
|
while (true) {
|
|
|
|
int x_172 = 0;
|
|
|
|
int const x_171 = x_171_phi;
|
|
|
|
if ((x_171 <= x_129)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
int const x_177 = temp.arr[x_171];
|
|
|
|
data.arr[x_171] = x_177;
|
2021-07-30 08:22:58 +00:00
|
|
|
x_172 = (x_171 + 1);
|
2021-07-23 13:10:12 +00:00
|
|
|
x_171_phi = x_172;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
x_119_phi = x_120;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
2021-07-30 08:22:58 +00:00
|
|
|
x_113 = (2 * x_112);
|
2021-07-23 13:10:12 +00:00
|
|
|
x_112_phi = x_113;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int x_181 = 0;
|
|
|
|
float x_199 = 0.0f;
|
|
|
|
float x_261 = 0.0f;
|
|
|
|
float x_262_phi = 0.0f;
|
|
|
|
float const x_180 = (*(tint_symbol_6)).y;
|
|
|
|
x_181 = int(x_180);
|
|
|
|
if ((x_181 < 30)) {
|
|
|
|
int const x_187 = data.arr[0];
|
|
|
|
x_190 = (0.5f + (float(x_187) * 0.100000001f));
|
|
|
|
x_263_phi = x_190;
|
|
|
|
} else {
|
|
|
|
float x_208 = 0.0f;
|
|
|
|
float x_260 = 0.0f;
|
|
|
|
float x_261_phi = 0.0f;
|
|
|
|
if ((x_181 < 60)) {
|
|
|
|
int const x_196 = data.arr[1];
|
|
|
|
x_199 = (0.5f + (float(x_196) * 0.100000001f));
|
|
|
|
x_262_phi = x_199;
|
|
|
|
} else {
|
|
|
|
float x_217 = 0.0f;
|
|
|
|
float x_259 = 0.0f;
|
|
|
|
float x_260_phi = 0.0f;
|
|
|
|
if ((x_181 < 90)) {
|
|
|
|
int const x_205 = data.arr[2];
|
|
|
|
x_208 = (0.5f + (float(x_205) * 0.100000001f));
|
|
|
|
x_261_phi = x_208;
|
|
|
|
} else {
|
|
|
|
if ((x_181 < 120)) {
|
|
|
|
int const x_214 = data.arr[3];
|
|
|
|
x_217 = (0.5f + (float(x_214) * 0.100000001f));
|
|
|
|
x_260_phi = x_217;
|
|
|
|
} else {
|
|
|
|
float x_230 = 0.0f;
|
|
|
|
float x_258 = 0.0f;
|
|
|
|
float x_259_phi = 0.0f;
|
|
|
|
if ((x_181 < 150)) {
|
|
|
|
discard_fragment();
|
|
|
|
} else {
|
|
|
|
float x_239 = 0.0f;
|
|
|
|
float x_257 = 0.0f;
|
|
|
|
float x_258_phi = 0.0f;
|
|
|
|
if ((x_181 < 180)) {
|
|
|
|
int const x_227 = data.arr[5];
|
|
|
|
x_230 = (0.5f + (float(x_227) * 0.100000001f));
|
|
|
|
x_259_phi = x_230;
|
|
|
|
} else {
|
|
|
|
float x_248 = 0.0f;
|
|
|
|
float x_256 = 0.0f;
|
|
|
|
float x_257_phi = 0.0f;
|
|
|
|
if ((x_181 < 210)) {
|
|
|
|
int const x_236 = data.arr[6];
|
|
|
|
x_239 = (0.5f + (float(x_236) * 0.100000001f));
|
|
|
|
x_258_phi = x_239;
|
|
|
|
} else {
|
|
|
|
if ((x_181 < 240)) {
|
|
|
|
int const x_245 = data.arr[7];
|
|
|
|
x_248 = (0.5f + (float(x_245) * 0.100000001f));
|
|
|
|
x_257_phi = x_248;
|
|
|
|
} else {
|
|
|
|
if ((x_181 < 270)) {
|
|
|
|
} else {
|
|
|
|
discard_fragment();
|
|
|
|
}
|
|
|
|
int const x_253 = data.arr[8];
|
|
|
|
x_256 = (0.5f + (float(x_253) * 0.100000001f));
|
|
|
|
x_257_phi = x_256;
|
|
|
|
}
|
|
|
|
x_257 = x_257_phi;
|
|
|
|
x_258_phi = x_257;
|
|
|
|
}
|
|
|
|
x_258 = x_258_phi;
|
|
|
|
x_259_phi = x_258;
|
|
|
|
}
|
|
|
|
x_259 = x_259_phi;
|
|
|
|
}
|
|
|
|
x_260_phi = x_259;
|
|
|
|
}
|
|
|
|
x_260 = x_260_phi;
|
|
|
|
x_261_phi = x_260;
|
|
|
|
}
|
|
|
|
x_261 = x_261_phi;
|
|
|
|
x_262_phi = x_261;
|
|
|
|
}
|
|
|
|
x_262 = x_262_phi;
|
|
|
|
x_263_phi = x_262;
|
|
|
|
}
|
|
|
|
float const x_263 = x_263_phi;
|
|
|
|
*(tint_symbol_7) = float4(x_263, x_263, x_263, 1.0f);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
|
|
|
|
thread float4 tint_symbol_8 = 0.0f;
|
|
|
|
thread float4 tint_symbol_9 = 0.0f;
|
|
|
|
tint_symbol_8 = gl_FragCoord_param;
|
|
|
|
main_1(x_8, &(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_5 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
|
|
|
|
return tint_symbol_5;
|
|
|
|
}
|
|
|
|
|