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