@foone I've done this a lot especially in embedded stuff where you have an open source peripheral library or RTOS bolted onto closed source application code.
Find one xref to a SFR, match to the corresponding vendor HAL function, then you probably get 30 functions with minimal effort that are right before/after in the same order as the .c