#include <metal_stdlib>
using namespace metal;
struct SB_RW {
  atomic_int arg_0;
};
struct tint_module_vars_struct {
  device SB_RW* sb_rw;
  device int* prevent_dce;
};

int atomicXor_c1b78c(tint_module_vars_struct tint_module_vars) {
  int arg_1 = 1;
  int res = atomic_fetch_xor_explicit((&(*tint_module_vars.sb_rw).arg_0), arg_1, memory_order_relaxed);
  return res;
}
fragment void fragment_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
  (*tint_module_vars.prevent_dce) = atomicXor_c1b78c(tint_module_vars);
}
kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device int* prevent_dce [[buffer(0)]]) {
  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb_rw=sb_rw, .prevent_dce=prevent_dce};
  (*tint_module_vars.prevent_dce) = atomicXor_c1b78c(tint_module_vars);
}
