#include <metal_stdlib>

using namespace metal;

half3 tint_degrees(half3 param_0) {
  return param_0 * 57.295779513082322865;
}

void degrees_dfe8f4() {
  half3 arg_0 = half3(0.0h);
  half3 res = tint_degrees(arg_0);
}

struct tint_symbol {
  float4 value [[position]];
};

float4 vertex_main_inner() {
  degrees_dfe8f4();
  return float4(0.0f);
}

vertex tint_symbol vertex_main() {
  float4 const inner_result = vertex_main_inner();
  tint_symbol wrapper_result = {};
  wrapper_result.value = inner_result;
  return wrapper_result;
}

fragment void fragment_main() {
  degrees_dfe8f4();
  return;
}

kernel void compute_main() {
  degrees_dfe8f4();
  return;
}

