| #include <metal_stdlib> |
| |
| using namespace metal; |
| struct tint_padded_array_element { |
| /* 0x0000 */ float el; |
| /* 0x0004 */ int8_t tint_pad[12]; |
| }; |
| struct tint_array_wrapper { |
| /* 0x0000 */ tint_padded_array_element arr[2]; |
| }; |
| struct buf0 { |
| /* 0x0000 */ tint_array_wrapper x_GLF_uniform_float_values; |
| }; |
| struct tint_padded_array_element_1 { |
| /* 0x0000 */ int el; |
| /* 0x0004 */ int8_t tint_pad_1[12]; |
| }; |
| struct tint_array_wrapper_1 { |
| /* 0x0000 */ tint_padded_array_element_1 arr[2]; |
| }; |
| struct buf1 { |
| /* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_int_values; |
| }; |
| struct tint_array_wrapper_2 { |
| float arr[5]; |
| }; |
| struct main_out { |
| float4 x_GLF_color_1; |
| }; |
| struct tint_symbol_1 { |
| float4 x_GLF_color_1 [[color(0)]]; |
| }; |
| |
| void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_4) { |
| tint_array_wrapper_2 arr = {}; |
| int i = 0; |
| int j = 0; |
| float const x_38 = x_6.x_GLF_uniform_float_values.arr[0].el; |
| float const x_40 = x_6.x_GLF_uniform_float_values.arr[0].el; |
| float const x_42 = x_6.x_GLF_uniform_float_values.arr[0].el; |
| float const x_44 = x_6.x_GLF_uniform_float_values.arr[0].el; |
| float const x_46 = x_6.x_GLF_uniform_float_values.arr[0].el; |
| tint_array_wrapper_2 const tint_symbol_2 = {.arr={x_38, x_40, x_42, x_44, x_46}}; |
| arr = tint_symbol_2; |
| int const x_49 = x_9.x_GLF_uniform_int_values.arr[1].el; |
| i = x_49; |
| j = 0; |
| while (true) { |
| int const x_54 = i; |
| int const x_56 = x_9.x_GLF_uniform_int_values.arr[0].el; |
| if ((x_54 < x_56)) { |
| } else { |
| break; |
| } |
| int const x_59 = j; |
| if ((x_59 < -1)) { |
| break; |
| } |
| int const x_63 = j; |
| float const x_65 = arr.arr[x_63]; |
| arr.arr[x_63] = (x_65 + 1.0f); |
| { |
| int const x_68 = i; |
| i = as_type<int>((as_type<uint>(x_68) + as_type<uint>(1))); |
| int const x_70 = j; |
| j = as_type<int>((as_type<uint>(x_70) + as_type<uint>(1))); |
| } |
| } |
| float const x_73 = x_6.x_GLF_uniform_float_values.arr[0].el; |
| float const x_75 = x_6.x_GLF_uniform_float_values.arr[1].el; |
| float const x_77 = x_6.x_GLF_uniform_float_values.arr[1].el; |
| float const x_79 = x_6.x_GLF_uniform_float_values.arr[0].el; |
| *(tint_symbol_4) = float4(x_73, x_75, x_77, x_79); |
| int const x_82 = x_9.x_GLF_uniform_int_values.arr[1].el; |
| i = x_82; |
| while (true) { |
| int const x_87 = i; |
| int const x_89 = x_9.x_GLF_uniform_int_values.arr[0].el; |
| if ((x_87 < x_89)) { |
| } else { |
| break; |
| } |
| int const x_92 = i; |
| float const x_94 = arr.arr[x_92]; |
| if (!((x_94 == 2.0f))) { |
| float const x_99 = x_6.x_GLF_uniform_float_values.arr[1].el; |
| *(tint_symbol_4) = float4(x_99, x_99, x_99, x_99); |
| } |
| { |
| int const x_101 = i; |
| i = as_type<int>((as_type<uint>(x_101) + as_type<uint>(1))); |
| } |
| } |
| return; |
| } |
| |
| main_out tint_symbol_inner(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_symbol_5) { |
| main_1(x_6, x_9, tint_symbol_5); |
| main_out const tint_symbol_3 = {.x_GLF_color_1=*(tint_symbol_5)}; |
| return tint_symbol_3; |
| } |
| |
| fragment tint_symbol_1 tint_symbol(constant buf0& x_6 [[buffer(0)]], constant buf1& x_9 [[buffer(1)]]) { |
| thread float4 tint_symbol_6 = 0.0f; |
| main_out const inner_result = tint_symbol_inner(x_6, x_9, &(tint_symbol_6)); |
| tint_symbol_1 wrapper_result = {}; |
| wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1; |
| return wrapper_result; |
| } |
| |