#include <metal_stdlib>
using namespace metal;

struct VertexOutput {
  float4 pos;
};

struct vertex_main_outputs {
  float4 VertexOutput_pos [[position]];
};

void transpose_32dd64() {
  float4x3 res = float4x3(float3(1.0f), float3(1.0f), float3(1.0f), float3(1.0f));
}

fragment void fragment_main() {
  transpose_32dd64();
}

kernel void compute_main() {
  transpose_32dd64();
}

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

vertex vertex_main_outputs vertex_main() {
  return vertex_main_outputs{.VertexOutput_pos=vertex_main_inner().pos};
}
