#include <metal_stdlib>
using namespace metal;

struct VertexOutput {
  float4 pos;
};

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

void ldexp_71ebe3() {
  int arg_1 = 1;
  float res = ldexp(1.0f, arg_1);
}

fragment void fragment_main() {
  ldexp_71ebe3();
}

kernel void compute_main() {
  ldexp_71ebe3();
}

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

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