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

uint atomicExchange_d59712(tint_module_vars_struct tint_module_vars) {
  uint arg_1 = 1u;
  uint res = atomic_exchange_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 uint* 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) = atomicExchange_d59712(tint_module_vars);
}
kernel void compute_main(device SB_RW* sb_rw [[buffer(1)]], device uint* 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) = atomicExchange_d59712(tint_module_vars);
}
