`r[i]` and `r[j]` are `uint32`, you don't need to cast them to uint to compare them