| #include <metal_stdlib> |
| |
| using namespace metal; |
| |
| template<typename T, size_t N> |
| struct tint_array { |
| const constant T& operator[](size_t i) const constant { return elements[i]; } |
| device T& operator[](size_t i) device { return elements[i]; } |
| const device T& operator[](size_t i) const device { return elements[i]; } |
| thread T& operator[](size_t i) thread { return elements[i]; } |
| const thread T& operator[](size_t i) const thread { return elements[i]; } |
| threadgroup T& operator[](size_t i) threadgroup { return elements[i]; } |
| const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; } |
| T elements[N]; |
| }; |
| |
| constant static volatile bool tint_preserve_loop = true; |
| |
| struct tint_private_vars_struct { |
| uint v; |
| }; |
| |
| struct S { |
| /* 0x0000 */ tint_array<int4, 4> a; |
| }; |
| |
| int idx1(thread tint_private_vars_struct* const tint_private_vars) { |
| (*(tint_private_vars)).v = ((*(tint_private_vars)).v - 1u); |
| return 1; |
| } |
| |
| int idx2(thread tint_private_vars_struct* const tint_private_vars) { |
| (*(tint_private_vars)).v = ((*(tint_private_vars)).v - 1u); |
| return 2; |
| } |
| |
| int idx3(thread tint_private_vars_struct* const tint_private_vars) { |
| (*(tint_private_vars)).v = ((*(tint_private_vars)).v - 1u); |
| return 3; |
| } |
| |
| int idx4(thread tint_private_vars_struct* const tint_private_vars) { |
| (*(tint_private_vars)).v = ((*(tint_private_vars)).v - 1u); |
| return 4; |
| } |
| |
| int idx5(thread tint_private_vars_struct* const tint_private_vars) { |
| (*(tint_private_vars)).v = ((*(tint_private_vars)).v - 1u); |
| return 0; |
| } |
| |
| int idx6(thread tint_private_vars_struct* const tint_private_vars) { |
| (*(tint_private_vars)).v = ((*(tint_private_vars)).v - 1u); |
| return 2; |
| } |
| |
| void tint_symbol_1(thread tint_private_vars_struct* const tint_private_vars, device tint_array<S, 1>* const tint_symbol_10) { |
| { |
| int const tint_symbol_6 = idx1(tint_private_vars); |
| int const tint_symbol_7 = idx2(tint_private_vars); |
| int const tint_symbol_2_save = tint_symbol_6; |
| int const tint_symbol_2_save_1 = tint_symbol_7; |
| int const tint_symbol_3 = idx3(tint_private_vars); |
| (*(tint_symbol_10))[tint_symbol_2_save].a[tint_symbol_2_save_1][tint_symbol_3] = as_type<int>((as_type<uint>((*(tint_symbol_10))[tint_symbol_2_save].a[tint_symbol_2_save_1][tint_symbol_3]) - as_type<uint>(1))); |
| while (tint_preserve_loop) { |
| if (!(((*(tint_private_vars)).v < 10u))) { |
| break; |
| } |
| { |
| } |
| { |
| int const tint_symbol_8 = idx4(tint_private_vars); |
| int const tint_symbol_9 = idx5(tint_private_vars); |
| int const tint_symbol_4_save = tint_symbol_8; |
| int const tint_symbol_4_save_1 = tint_symbol_9; |
| int const tint_symbol_5 = idx6(tint_private_vars); |
| (*(tint_symbol_10))[tint_symbol_4_save].a[tint_symbol_4_save_1][tint_symbol_5] = as_type<int>((as_type<uint>((*(tint_symbol_10))[tint_symbol_4_save].a[tint_symbol_4_save_1][tint_symbol_5]) - as_type<uint>(1))); |
| } |
| } |
| } |
| } |
| |