#include <metal_stdlib>

using namespace metal;
float4 subgroupShuffleUp_33d495() {
  float4 arg_0 = float4(1.0f);
  uint arg_1 = 1u;
  float4 res = simd_shuffle_up(arg_0,arg_1);
  return res;
}

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

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

