#include <metal_stdlib>
using namespace metal;

struct frexp_result_vec4_f32 {
  float4 fract;
  int4 exp;
};

struct VertexOutput {
  float4 pos;
};

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

void frexp_34bbfb() {
  frexp_result_vec4_f32 res = frexp_result_vec4_f32{.fract=float4(0.5f), .exp=int4(1)};
}

fragment void fragment_main() {
  frexp_34bbfb();
}

kernel void compute_main() {
  frexp_34bbfb();
}

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

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