blob: 35069230feacdcc0bef5f6c2f512011553ff8095 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct S {
int a;
};
struct tint_module_vars_struct {
device S* v;
};
int tint_div_i32(int lhs, int rhs) {
return (lhs / select(rhs, 1, ((rhs == 0) | ((lhs == (-2147483647 - 1)) & (rhs == -1)))));
}
void foo(tint_module_vars_struct tint_module_vars) {
(*tint_module_vars.v).a = tint_div_i32((*tint_module_vars.v).a, 2);
}