#include <metal_stdlib>
using namespace metal;

int tint_div_i32(int lhs, int rhs) {
  uint const v = uint((lhs == (-2147483647 - 1)));
  bool const v_1 = bool((v & uint((rhs == -1))));
  uint const v_2 = uint((rhs == 0));
  return (lhs / select(rhs, 1, bool((v_2 | uint(v_1)))));
}

kernel void f() {
  int const a = 1;
  int const b = 2;
  int const r = tint_div_i32(a, b);
}
