Rewriting function calls and signatures

If you’re lowering into the LLVM dialect directly your best reference is probably the StandardToLLVM conversion. I don’t know that there’s any generic transformation that does what you’re looking for directly, however.