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