It was quite a challenge building it into such a tiny controller. Was doing it for a University project where we wanted to have the clock started from an external source so needed to keep one I/O free for that input. It ended up with every I/O pin of the 8 pin micro having a use.
For OpenRCT2 thats not quite how we did it. We didn't use IDA decomp output as its useless with Chris Sawyer calling conventions you had to just read the assembly. We did name things as per IDA when things were completely unknown hence why there was lots of sub_XXXX functions and byte_XXXX. I personally just used OllyDbg and read the assembly and wrote equivalent C code. I've a few videos of implementing functions for OpenRCT2 and OpenLoco if you are interested.