Generalized Landauer Bound for Information Processing: Proof and Applications