| #include <metal_stdlib> |
| |
| using namespace metal; |
| struct tint_array_wrapper { |
| float3 arr[2]; |
| }; |
| struct main_out { |
| float4 x_GLF_color_1; |
| }; |
| struct tint_symbol_1 { |
| float4 x_GLF_color_1 [[color(0)]]; |
| }; |
| |
| float3 func_() { |
| float2 v = 0.0f; |
| int i = 0; |
| int k = 0; |
| v = float2(1.0f, 1.0f); |
| i = 0; |
| k = 0; |
| while (true) { |
| int const x_90 = k; |
| if ((x_90 < 2)) { |
| } else { |
| break; |
| } |
| float const x_94 = v.y; |
| if (((x_94 + 1.0f) > 4.0f)) { |
| break; |
| } |
| v.y = 1.0f; |
| int const x_100 = i; |
| i = as_type<int>((as_type<uint>(x_100) + as_type<uint>(1))); |
| { |
| int const x_102 = k; |
| k = as_type<int>((as_type<uint>(x_102) + as_type<uint>(1))); |
| } |
| } |
| int const x_104 = i; |
| if ((x_104 < 10)) { |
| return float3(1.0f, 0.0f, 0.0f); |
| } else { |
| return float3(0.0f, 0.0f, 1.0f); |
| } |
| return float3(0.0f, 0.0f, 0.0f); |
| } |
| |
| void main_1(thread float4* const tint_symbol_3) { |
| int j = 0; |
| tint_array_wrapper data = {}; |
| int j_1 = 0; |
| bool x_80 = false; |
| bool x_81_phi = false; |
| j = 0; |
| while (true) { |
| int const x_49 = j; |
| if ((x_49 < 1)) { |
| } else { |
| break; |
| } |
| int const x_52 = j; |
| float3 const x_53 = func_(); |
| data.arr[x_52] = x_53; |
| { |
| int const x_55 = j; |
| j = as_type<int>((as_type<uint>(x_55) + as_type<uint>(1))); |
| } |
| } |
| j_1 = 0; |
| while (true) { |
| int const x_61 = j_1; |
| if ((x_61 < 1)) { |
| } else { |
| break; |
| } |
| int const x_64 = j_1; |
| float3 const x_67 = func_(); |
| data.arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(x_64)))) + as_type<uint>(1)))] = x_67; |
| { |
| int const x_69 = j_1; |
| j_1 = as_type<int>((as_type<uint>(x_69) + as_type<uint>(1))); |
| } |
| } |
| float3 const x_72 = data.arr[0]; |
| bool const x_74 = all((x_72 == float3(1.0f, 0.0f, 0.0f))); |
| x_81_phi = x_74; |
| if (x_74) { |
| float3 const x_78 = data.arr[1]; |
| x_80 = all((x_78 == float3(1.0f, 0.0f, 0.0f))); |
| x_81_phi = x_80; |
| } |
| bool const x_81 = x_81_phi; |
| if (x_81) { |
| *(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f); |
| } else { |
| *(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f); |
| } |
| return; |
| } |
| |
| main_out tint_symbol_inner(thread float4* const tint_symbol_4) { |
| main_1(tint_symbol_4); |
| main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)}; |
| return tint_symbol_2; |
| } |
| |
| fragment tint_symbol_1 tint_symbol() { |
| thread float4 tint_symbol_5 = 0.0f; |
| main_out const inner_result = tint_symbol_inner(&(tint_symbol_5)); |
| tint_symbol_1 wrapper_result = {}; |
| wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; |
| return wrapper_result; |
| } |
| |