If current AI can barely do maths, decompilation is not something I'd expect it to do well. It will of course try and come up with something plausible, but often subtly wrong.
Now to test emitting.
There's been research into the latter but its in early stages. https://github.com/nforest/awesome-decompilation?tab=readme-...
decomp.me gives us a large database of C(++) <-> target asm to train a model on ;)