| #include <metal_stdlib> |
| |
| using namespace metal; |
| struct buf0 { |
| /* 0x0000 */ float zero; |
| }; |
| struct main_out { |
| float4 x_GLF_color_1; |
| }; |
| struct tint_symbol_1 { |
| float4 x_GLF_color_1 [[color(0)]]; |
| }; |
| |
| float func_i1_(thread int* const b, thread float4* const tint_symbol_3, thread float4* const tint_symbol_4) { |
| int ndx = 0; |
| int i = 0; |
| ndx = 0; |
| while (true) { |
| int const x_100 = ndx; |
| if ((x_100 < 2)) { |
| } else { |
| break; |
| } |
| float const x_104 = (*(tint_symbol_3)).x; |
| if ((x_104 < 0.0f)) { |
| i = 0; |
| while (true) { |
| int const x_112 = i; |
| if ((x_112 < 2)) { |
| } else { |
| break; |
| } |
| if ((int(cosh(float2(1.0f, 800.0f)).x) <= 1)) { |
| discard_fragment(); |
| } |
| { |
| int const x_121 = i; |
| i = as_type<int>((as_type<uint>(x_121) + as_type<uint>(1))); |
| } |
| } |
| } |
| { |
| int const x_123 = ndx; |
| ndx = as_type<int>((as_type<uint>(x_123) + as_type<uint>(1))); |
| } |
| } |
| int const x_125 = *(b); |
| if ((x_125 > 1)) { |
| return 3.0f; |
| } |
| float const x_130 = (*(tint_symbol_3)).x; |
| if ((x_130 < 0.0f)) { |
| *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); |
| } |
| return 5.0f; |
| } |
| |
| void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) { |
| float f = 0.0f; |
| int param = 0; |
| int x_1 = 0; |
| int param_1 = 0; |
| *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); |
| f = 0.0f; |
| while (true) { |
| float const x_54 = (*(tint_symbol_5)).y; |
| if ((int(x_54) < 0)) { |
| discard_fragment(); |
| } else { |
| float const x_61 = x_11.zero; |
| param = int(x_61); |
| float const x_63 = func_i1_(&(param), tint_symbol_6, tint_symbol_5); |
| f = x_63; |
| } |
| float const x_65 = (*(tint_symbol_5)).y; |
| if ((int(x_65) > 65)) { |
| discard_fragment(); |
| } |
| x_1 = 0; |
| while (true) { |
| int const x_74 = x_1; |
| float const x_76 = x_11.zero; |
| if ((x_74 < as_type<int>((as_type<uint>(int(x_76)) + as_type<uint>(1))))) { |
| } else { |
| break; |
| } |
| int const x_81 = x_1; |
| param_1 = as_type<int>((as_type<uint>(x_81) + as_type<uint>(10))); |
| float const x_83 = func_i1_(&(param_1), tint_symbol_6, tint_symbol_5); |
| f = x_83; |
| { |
| int const x_84 = x_1; |
| x_1 = as_type<int>((as_type<uint>(x_84) + as_type<uint>(1))); |
| } |
| } |
| { |
| float const x_87 = x_11.zero; |
| if ((int(x_87) > 1)) { |
| } else { |
| break; |
| } |
| } |
| } |
| float const x_90 = f; |
| if ((x_90 == 3.0f)) { |
| *(tint_symbol_5) = float4(1.0f, 0.0f, 0.0f, 1.0f); |
| } else { |
| *(tint_symbol_5) = float4(0.0f, 0.0f, 0.0f, 0.0f); |
| } |
| return; |
| } |
| |
| main_out tint_symbol_inner(constant buf0& x_11, float4 gl_FragCoord_param, thread float4* const tint_symbol_7, thread float4* const tint_symbol_8) { |
| *(tint_symbol_7) = gl_FragCoord_param; |
| main_1(x_11, tint_symbol_8, tint_symbol_7); |
| main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_8)}; |
| return tint_symbol_2; |
| } |
| |
| fragment tint_symbol_1 tint_symbol(float4 gl_FragCoord_param [[position]], constant buf0& x_11 [[buffer(0)]]) { |
| thread float4 tint_symbol_9 = 0.0f; |
| thread float4 tint_symbol_10 = 0.0f; |
| main_out const inner_result = tint_symbol_inner(x_11, gl_FragCoord_param, &(tint_symbol_9), &(tint_symbol_10)); |
| tint_symbol_1 wrapper_result = {}; |
| wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; |
| return wrapper_result; |
| } |
| |