An electronic control unit increases the maximum lift amount or the
working angle of an intake valve if it is determined that the operation
for stopping an engine is performed. The electronic control unit stops
fuel injection or ignition before increasing the maximum lift amount or
the working angle.