| #include <metal_stdlib> |
| |
| using namespace metal; |
| struct S { |
| int f0; |
| float4x3 f1; |
| }; |
| struct main_out { |
| float4 x_GLF_color_1; |
| }; |
| struct tint_symbol_1 { |
| float4 x_GLF_color_1 [[color(0)]]; |
| }; |
| |
| void main_1(thread float4* const tint_symbol_4, thread float4* const tint_symbol_5) { |
| 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_2 = {.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_2; |
| 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_4)).x; |
| x_51 = select(2, 1, (x_49 == 0.0f)); |
| if ((x_11 < x_51)) { |
| } else { |
| break; |
| } |
| { |
| *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); |
| x_46 = x_45; |
| x_46.f0 = as_type<int>((as_type<uint>(x_45.f0) + as_type<uint>(1))); |
| x_9 = as_type<int>((as_type<uint>(x_11) + as_type<uint>(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_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); |
| x_6 = as_type<int>((as_type<uint>(x_12) + as_type<uint>(1))); |
| x_12_phi = x_6; |
| } |
| } |
| return; |
| } |
| |
| main_out tint_symbol_inner(float4 gl_FragCoord_param, thread float4* const tint_symbol_6, thread float4* const tint_symbol_7) { |
| *(tint_symbol_6) = gl_FragCoord_param; |
| main_1(tint_symbol_6, tint_symbol_7); |
| main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_7)}; |
| return tint_symbol_3; |
| } |
| |
| fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]]) { |
| thread float4 tint_symbol_8 = 0.0f; |
| thread float4 tint_symbol_9 = 0.0f; |
| main_out const inner_result = tint_symbol_inner(gl_FragCoord_param, &(tint_symbol_8), &(tint_symbol_9)); |
| tint_symbol_1 wrapper_result = {}; |
| wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; |
| return wrapper_result; |
| } |
| |