The function of mitosis is to-

O provide energy to cells.
Obattle invading viruses.
O replace worn-out cells.
O remove waste from cells.