To remove the engine, first disconnect the cable from the negative terminal of the battery, ensuring that on 2015 and later models with an Intelligent Battery Sensor, the IBS connector is disconnected first. Drain the cooling system, raise the vehicle securely on jackstands, and drain the engine oil while replacing the oil filter. Remove the engine oil dipstick and the engine splash shield, then disconnect the exhaust pipes from the exhaust manifolds. Next, remove the intake manifold and, for 2012 and later models with 5.7L engines, the Variable Valve Timing solenoid. Remove the engine cooling fans and shroud, then take out the power steering gear from the crossmember without disconnecting the intermediate shaft coupler or tie rod ends, positioning the assembly down and away from the engine. Connect an engine hoist to the engine, remove the left and right side engine mount-to-subframe nuts and studs, and raise the engine slightly. Remove all oil pan bolts, lower the pan from the engine, and if it sticks, strike it with a rubber mallet to break the gasket seal, ensuring all bolts are removed first. Slide the oil pan out carefully, noting that the M10 horizontal bolts are longer than the vertical ones, and mark them for correct reinstallation. Remove the windage tray, which is integral to the oil pan gasket and must be replaced as an assembly. For installation, place a new gasket and windage tray, wash out the oil pan with solvent, and clean the mounting surfaces of old gasket material and sealer. If the oil pan is distorted, straighten it by supporting it from below and tapping the bolt holes. Apply RTV sealant to the corners where the timing chain cover meets the block and attach the one-piece oil pan gasket with gasket adhesive. Ensure the alignment studs are correctly positioned, lift the pan into place, and install several bolts finger tight without disturbing the gasket. Check that the gasket is properly aligned, then install the oil pan nuts onto the studs and tighten the fasteners following the correct torque sequence. The remainder of the installation is the reverse of removal. Finally, add the proper type and quantity of oil, change the oil filter, refill the cooling system, start the engine, and check for leaks before returning the vehicle to service.