#include <metal_stdlib>

using namespace metal;
struct SB_RW {
  /* 0x0000 */ atomic_uint arg_0;
};

uint atomicAnd_85a8d9(device SB_RW* const tint_symbol) {
  uint res = atomic_fetch_and_explicit(&((*(tint_symbol)).arg_0), 1u, memory_order_relaxed);
  return res;
}

fragment void fragment_main(device uint* tint_symbol_1 [[buffer(0)]], device SB_RW* tint_symbol_2 [[buffer(1)]]) {
  *(tint_symbol_1) = atomicAnd_85a8d9(tint_symbol_2);
  return;
}

kernel void compute_main(device uint* tint_symbol_3 [[buffer(0)]], device SB_RW* tint_symbol_4 [[buffer(1)]]) {
  *(tint_symbol_3) = atomicAnd_85a8d9(tint_symbol_4);
  return;
}

