Who should a scrummaster report to?

This question was asked on LinkedIn. With an agile manager lens, the answer is straightforward.

Two principles I would apply here:
Separate work management from personnel management.
Don’t create hierarchy, create autonomy.

For personnel purposes:
ScrumMasters could report to the head of the scrum masters guild, the Chief ScrumMaster.
Or they could just report to an arbitrary HR manager for their area, division etc..

For work purposes, why would they report to anyone? Thier function is to coach and facilitate the team. They report to the team.