blob: 69458bc6fe79e3b0bc03177b10f332d8689a31b2 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
thread int* a;
thread float4* b;
thread float2x2* c;
};
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.a) = tint_div_i32((*tint_module_vars.a), 2);
(*tint_module_vars.b) = ((*tint_module_vars.b) * float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)));
(*tint_module_vars.c) = ((*tint_module_vars.c) * 2.0f);
}