352 lines
9.0 KiB
Plaintext
352 lines
9.0 KiB
Plaintext
#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_5, thread float4* const tint_symbol_6) {
|
|
tint_array_wrapper temp = {};
|
|
tint_array_wrapper data = {};
|
|
float x_180 = 0.0f;
|
|
float x_279 = 0.0f;
|
|
int x_65_phi = 0;
|
|
int x_93_phi = 0;
|
|
int x_102_phi = 0;
|
|
float x_280_phi = 0.0f;
|
|
float const x_62 = x_8.injectionSwitch.x;
|
|
int const x_63 = int(x_62);
|
|
x_65_phi = x_63;
|
|
while (true) {
|
|
int const x_65 = x_65_phi;
|
|
switch(x_65) {
|
|
case 9: {
|
|
data.arr[x_65] = -5;
|
|
break;
|
|
}
|
|
case 8: {
|
|
data.arr[x_65] = -4;
|
|
break;
|
|
}
|
|
case 7: {
|
|
data.arr[x_65] = -3;
|
|
break;
|
|
}
|
|
case 6: {
|
|
data.arr[x_65] = -2;
|
|
break;
|
|
}
|
|
case 5: {
|
|
data.arr[x_65] = -1;
|
|
break;
|
|
}
|
|
case 4: {
|
|
data.arr[x_65] = 0;
|
|
break;
|
|
}
|
|
case 3: {
|
|
data.arr[x_65] = 1;
|
|
break;
|
|
}
|
|
case 2: {
|
|
data.arr[x_65] = 2;
|
|
break;
|
|
}
|
|
case 1: {
|
|
data.arr[x_65] = 3;
|
|
break;
|
|
}
|
|
case 0: {
|
|
data.arr[x_65] = 4;
|
|
break;
|
|
}
|
|
default: {
|
|
break;
|
|
}
|
|
}
|
|
int const x_66 = (x_65 + 1);
|
|
{
|
|
x_65_phi = x_66;
|
|
if ((x_66 < 10)) {
|
|
} else {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
x_93_phi = 0;
|
|
while (true) {
|
|
int x_94 = 0;
|
|
int const x_93 = x_93_phi;
|
|
if ((x_93 < 10)) {
|
|
} else {
|
|
break;
|
|
}
|
|
{
|
|
int const x_99 = data.arr[x_93];
|
|
temp.arr[x_93] = x_99;
|
|
x_94 = (x_93 + 1);
|
|
x_93_phi = x_94;
|
|
}
|
|
}
|
|
x_102_phi = 1;
|
|
while (true) {
|
|
int x_103 = 0;
|
|
int x_109_phi = 0;
|
|
int const x_102 = x_102_phi;
|
|
if ((x_102 <= 9)) {
|
|
} else {
|
|
break;
|
|
}
|
|
x_109_phi = 0;
|
|
while (true) {
|
|
int x_121 = 0;
|
|
int x_126 = 0;
|
|
int x_121_phi = 0;
|
|
int x_124_phi = 0;
|
|
int x_126_phi = 0;
|
|
int x_148_phi = 0;
|
|
int x_151_phi = 0;
|
|
int x_161_phi = 0;
|
|
int const x_109 = x_109_phi;
|
|
if ((x_109 < 9)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_115 = (x_109 + x_102);
|
|
int const x_116 = (x_115 - 1);
|
|
int const x_110 = (x_109 + (2 * x_102));
|
|
int const x_119 = min((x_110 - 1), 9);
|
|
x_121_phi = x_109;
|
|
x_124_phi = x_115;
|
|
x_126_phi = x_109;
|
|
while (true) {
|
|
int x_141 = 0;
|
|
int x_144 = 0;
|
|
int x_125_phi = 0;
|
|
int x_127_phi = 0;
|
|
x_121 = x_121_phi;
|
|
int const x_124 = x_124_phi;
|
|
x_126 = x_126_phi;
|
|
if (((x_126 <= x_116) && (x_124 <= x_119))) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_133_save = x_126;
|
|
int const x_134 = data.arr[x_133_save];
|
|
int const x_135_save = x_124;
|
|
int const x_136 = data.arr[x_135_save];
|
|
int const x_122 = as_type<int>((x_121 + as_type<int>(1)));
|
|
if ((x_134 < x_136)) {
|
|
x_141 = as_type<int>((x_126 + as_type<int>(1)));
|
|
int const x_142 = data.arr[x_133_save];
|
|
temp.arr[x_121] = x_142;
|
|
x_125_phi = x_124;
|
|
x_127_phi = x_141;
|
|
} else {
|
|
x_144 = (x_124 + 1);
|
|
int const x_145 = data.arr[x_135_save];
|
|
temp.arr[x_121] = x_145;
|
|
x_125_phi = x_144;
|
|
x_127_phi = x_126;
|
|
}
|
|
int const x_125 = x_125_phi;
|
|
int const x_127 = x_127_phi;
|
|
{
|
|
x_121_phi = x_122;
|
|
x_124_phi = x_125;
|
|
x_126_phi = x_127;
|
|
}
|
|
}
|
|
x_148_phi = x_121;
|
|
x_151_phi = x_126;
|
|
while (true) {
|
|
int x_149 = 0;
|
|
int x_152 = 0;
|
|
int const x_148 = x_148_phi;
|
|
int const x_151 = x_151_phi;
|
|
if (((x_151 < 10) && (x_151 <= x_116))) {
|
|
} else {
|
|
break;
|
|
}
|
|
{
|
|
x_149 = (x_148 + 1);
|
|
x_152 = (x_151 + 1);
|
|
int const x_158 = data.arr[x_151];
|
|
temp.arr[x_148] = x_158;
|
|
x_148_phi = x_149;
|
|
x_151_phi = x_152;
|
|
}
|
|
}
|
|
x_161_phi = x_109;
|
|
while (true) {
|
|
int x_162 = 0;
|
|
int const x_161 = x_161_phi;
|
|
if ((x_161 <= x_119)) {
|
|
} else {
|
|
break;
|
|
}
|
|
{
|
|
int const x_167 = temp.arr[x_161];
|
|
data.arr[x_161] = x_167;
|
|
x_162 = (x_161 + 1);
|
|
x_161_phi = x_162;
|
|
}
|
|
}
|
|
{
|
|
x_109_phi = x_110;
|
|
}
|
|
}
|
|
{
|
|
x_103 = (2 * x_102);
|
|
x_102_phi = x_103;
|
|
}
|
|
}
|
|
int x_171 = 0;
|
|
float x_189 = 0.0f;
|
|
float x_278 = 0.0f;
|
|
float x_279_phi = 0.0f;
|
|
float const x_170 = (*(tint_symbol_5)).y;
|
|
x_171 = int(x_170);
|
|
if ((x_171 < 30)) {
|
|
int const x_177 = data.arr[0];
|
|
x_180 = (0.5f + (float(x_177) * 0.100000001f));
|
|
x_280_phi = x_180;
|
|
} else {
|
|
float x_198 = 0.0f;
|
|
float x_277 = 0.0f;
|
|
float x_278_phi = 0.0f;
|
|
if ((x_171 < 60)) {
|
|
int const x_186 = data.arr[1];
|
|
x_189 = (0.5f + (float(x_186) * 0.100000001f));
|
|
x_279_phi = x_189;
|
|
} else {
|
|
float x_207 = 0.0f;
|
|
float x_249 = 0.0f;
|
|
float x_277_phi = 0.0f;
|
|
if ((x_171 < 90)) {
|
|
int const x_195 = data.arr[2];
|
|
x_198 = (0.5f + (float(x_195) * 0.100000001f));
|
|
x_278_phi = x_198;
|
|
} else {
|
|
if ((x_171 < 120)) {
|
|
int const x_204 = data.arr[3];
|
|
x_207 = (0.5f + (float(x_204) * 0.100000001f));
|
|
x_277_phi = x_207;
|
|
} else {
|
|
float x_220 = 0.0f;
|
|
float x_248 = 0.0f;
|
|
float x_249_phi = 0.0f;
|
|
float2 x_256_phi = 0.0f;
|
|
int x_259_phi = 0;
|
|
if ((x_171 < 150)) {
|
|
discard_fragment();
|
|
} else {
|
|
float x_229 = 0.0f;
|
|
float x_247 = 0.0f;
|
|
float x_248_phi = 0.0f;
|
|
if ((x_171 < 180)) {
|
|
int const x_217 = data.arr[5];
|
|
x_220 = (0.5f + (float(x_217) * 0.100000001f));
|
|
x_249_phi = x_220;
|
|
} else {
|
|
float x_238 = 0.0f;
|
|
float x_246 = 0.0f;
|
|
float x_247_phi = 0.0f;
|
|
if ((x_171 < 210)) {
|
|
int const x_226 = data.arr[6];
|
|
x_229 = (0.5f + (float(x_226) * 0.100000001f));
|
|
x_248_phi = x_229;
|
|
} else {
|
|
if ((x_171 < 240)) {
|
|
int const x_235 = data.arr[7];
|
|
x_238 = (0.5f + (float(x_235) * 0.100000001f));
|
|
x_247_phi = x_238;
|
|
} else {
|
|
if ((x_171 < 270)) {
|
|
} else {
|
|
discard_fragment();
|
|
}
|
|
int const x_243 = data.arr[8];
|
|
x_246 = (0.5f + (float(x_243) * 0.100000001f));
|
|
x_247_phi = x_246;
|
|
}
|
|
x_247 = x_247_phi;
|
|
x_248_phi = x_247;
|
|
}
|
|
x_248 = x_248_phi;
|
|
x_249_phi = x_248;
|
|
}
|
|
x_249 = x_249_phi;
|
|
float const x_251 = x_8.injectionSwitch.y;
|
|
bool const x_252 = (x_62 > x_251);
|
|
if (x_252) {
|
|
*(tint_symbol_6) = float4(1.0f, 1.0f, 1.0f, 1.0f);
|
|
}
|
|
x_256_phi = float2(1.0f, 1.0f);
|
|
x_259_phi = 0;
|
|
while (true) {
|
|
float2 x_272 = 0.0f;
|
|
int x_260 = 0;
|
|
float2 x_273_phi = 0.0f;
|
|
float2 const x_256 = x_256_phi;
|
|
int const x_259 = x_259_phi;
|
|
if ((x_259 <= 32)) {
|
|
} else {
|
|
break;
|
|
}
|
|
x_273_phi = x_256;
|
|
if ((x_256.x < 0.0f)) {
|
|
if (x_252) {
|
|
discard_fragment();
|
|
}
|
|
x_272 = x_256;
|
|
x_272.y = (x_256.y + 1.0f);
|
|
x_273_phi = x_272;
|
|
}
|
|
float2 const x_273 = x_273_phi;
|
|
float2 x_257_1 = x_273;
|
|
x_257_1.x = (x_273.x + x_273.y);
|
|
float2 const x_257 = x_257_1;
|
|
{
|
|
x_260 = (x_259 + 1);
|
|
x_256_phi = x_257;
|
|
x_259_phi = x_260;
|
|
}
|
|
}
|
|
}
|
|
x_277_phi = x_249;
|
|
}
|
|
x_277 = x_277_phi;
|
|
x_278_phi = x_277;
|
|
}
|
|
x_278 = x_278_phi;
|
|
x_279_phi = x_278;
|
|
}
|
|
x_279 = x_279_phi;
|
|
x_280_phi = x_279;
|
|
}
|
|
float const x_280 = x_280_phi;
|
|
*(tint_symbol_6) = float4(x_280, x_280, x_280, 1.0f);
|
|
return;
|
|
}
|
|
|
|
fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_8 [[buffer(0)]]) {
|
|
thread float4 tint_symbol_7 = 0.0f;
|
|
thread float4 tint_symbol_8 = 0.0f;
|
|
tint_symbol_7 = gl_FragCoord_param;
|
|
main_1(x_8, &(tint_symbol_7), &(tint_symbol_8));
|
|
main_out const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_8};
|
|
tint_symbol_2 const tint_symbol_4 = {.x_GLF_color_1=tint_symbol_3.x_GLF_color_1};
|
|
return tint_symbol_4;
|
|
}
|
|
|