Add Pragma to reserve registers in ARM 64

Hi,
For my project, I want to reserve X9 ARM 64 register for only part of
the source code.
Ex.
[Code]
#pragma A
[Code]
#pragma B
[Code]

I want only to reserve X9 register only between pragma A and B. Is it
possible to implement this kind of functionality? If so can you advice
me on the starting point and how to proceed? (I am a newbee in
compiler hacking).

Thanks
Nisal