| #include <metal_stdlib> |
| |
| using namespace metal; |
| struct S { |
| int f0; |
| float4x3 f1; |
| }; |
| struct main_out { |
| float4 x_GLF_color_1; |
| }; |
| struct tint_symbol_2 { |
| float4 x_GLF_color_1 [[color(0)]]; |
| }; |
| |
| void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { |
| int x_51 = 0; |
| int x_12_phi = 0; |
| while (true) { |
| S x_45 = {}; |
| S x_45_phi = {}; |
| int x_11_phi = 0; |
| S const tint_symbol_4 = {.f0=0, .f1=float4x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f), float3(0.0f, 0.0f, 0.0f))}; |
| x_45_phi = tint_symbol_4; |
| x_11_phi = 0; |
| while (true) { |
| S x_46 = {}; |
| int x_9 = 0; |
| x_45 = x_45_phi; |
| int const x_11 = x_11_phi; |
| float const x_49 = (*(tint_symbol_6)).x; |
| x_51 = select(2, 1, (x_49 == 0.0f)); |
| if ((x_11 < x_51)) { |
| } else { |
| break; |
| } |
| { |
| *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f); |
| x_46 = x_45; |
| x_46.f0 = (x_45.f0 + 1); |
| x_9 = (x_11 + 1); |
| x_45_phi = x_46; |
| x_11_phi = x_9; |
| } |
| } |
| if ((x_45.f0 < 1000)) { |
| break; |
| } |
| break; |
| } |
| x_12_phi = 0; |
| while (true) { |
| int x_6 = 0; |
| int const x_12 = x_12_phi; |
| if ((x_12 < x_51)) { |
| } else { |
| break; |
| } |
| { |
| *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); |
| x_6 = (x_12 + 1); |
| x_12_phi = x_6; |
| } |
| } |
| return; |
| } |
| |
| fragment tint_symbol_2 tint_symbol(float4 gl_FragCoord_param [[position]]) { |
| thread float4 tint_symbol_8 = 0.0f; |
| thread float4 tint_symbol_9 = 0.0f; |
| tint_symbol_8 = gl_FragCoord_param; |
| main_1(&(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; |
| } |
| |