byte-compile-dest-file

byte-compile-dest-file is a compiled Lisp function in `bytecomp.el'.

(byte-compile-dest-file FILENAME)

Convert an Emacs Lisp source file name to a compiled file name.
If `byte-compile-dest-file-function' is non-nil, uses that
function to do the work. Otherwise, if FILENAME matches
`emacs-lisp-file-regexp' (by default, files with the extension `.el'),
adds `c' to it; otherwise adds `.elc'.