Reorder the if/else for residual cats to match gcc's branch prediction.