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 ;)