Still got issues with atomic_compare_exchange(its adding instrs that destroy the reg holding the exchange value for some reason)