Just out of interest, do the Antminer systems run CGMiner as part of BitMains default software stack?
Good luck to the OP., I sure wouldnt want to take on a task that big alone.
Yes, Bitmain (and MicroBT and Inno) all run hacked versions of cgminer. Up to the s9 Bitmain at least
did publish their code then closed it. Canaan also used cgminer and published their code up to their A10 series when they changed to using their FMS firmware.