I tried ChatGPT! I gave it gtbitio files and it generated what it says optimized code for put nbits() and get nbits(). But it is interesting than an AI understands code and knows how to generate code. There were some easy mistakes though.