(#21193) Fix rgen assertion check

Corrects `@asserted` to be `@@asserted` and assigns `true` value upon
successful assertion.