#include <metal_stdlib>

using namespace metal;
int tint_insert_bits(int v, int n, uint offset, uint count) {
  uint const s = min(offset, 32u);
  uint const e = min(32u, (s + count));
  return insert_bits(v, n, s, (e - s));
}

void f_1() {
  int v = 0;
  int n = 0;
  uint offset_1 = 0u;
  uint count = 0u;
  int const x_15 = tint_insert_bits(v, n, offset_1, count);
  return;
}

kernel void f() {
  f_1();
  return;
}

