Automatically generating intrinsic declarations from Dan Gohman. Modified