#include <metal_stdlib>

using namespace metal;
half3 subgroupShuffleUp_868e52() {
  half3 arg_0 = half3(1.0h);
  uint arg_1 = 1u;
  half3 res = simd_shuffle_up(arg_0,arg_1);
  return res;
}

fragment void fragment_main(device packed_half3* tint_symbol [[buffer(0)]]) {
  *(tint_symbol) = packed_half3(subgroupShuffleUp_868e52());
  return;
}

kernel void compute_main(device packed_half3* tint_symbol_1 [[buffer(0)]]) {
  *(tint_symbol_1) = packed_half3(subgroupShuffleUp_868e52());
  return;
}

