#include <metal_stdlib>

using namespace metal;
void round_184d5a() {
  float4 res = float4(4.0f);
}

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

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

struct VertexOutput {
  float4 pos;
};

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

VertexOutput vertex_main_inner() {
  VertexOutput out = {};
  out.pos = float4(0.0f);
  round_184d5a();
  return out;
}

vertex tint_symbol vertex_main() {
  VertexOutput const inner_result = vertex_main_inner();
  tint_symbol wrapper_result = {};
  wrapper_result.pos = inner_result.pos;
  return wrapper_result;
}

