#include <metal_stdlib>
using namespace metal;

uint tint_mod_u32(uint lhs, uint rhs) {
  uint const v_1 = select(rhs, 1u, (rhs == 0u));
  return (lhs - ((lhs / v_1) * v_1));
}
void f_inner(uint3 v) {
  uint const l = (v[0u] << (tint_mod_u32(v[1u], 1u) & 31u));
}
kernel void f(uint3 v [[thread_position_in_grid]]) {
  f_inner(v);
}
