I'm facing difficulty understanding how vibrational energy modes contribute to a molecule's average energy (or heat capacity). What I know is : For a polyatomic non-linear molecule, there are $3N-6$ normal modes of vibration ($3N-5$ for linear molecule). Also, in a one-dimensional harmonic oscillator, $(1/2)kT$ contribution to energy comes from potential energy, and $(1/2)kT$ from kinetic energy. So that in a system of many oscillators, $kT$ is avg. energy per oscillator, in Equilibrium.
Now consider linear triatomic molecule $CO_2$. It has $3$ translational and $2$ rotational d.o.f. There are two ways I can think of its vibrational d.o.f. -
$(a)$ It has $2$ C-O double bonds which are like $2$ oscillators. So vibrations contribute $2 \times kT $ to molecule energy. Therefore, the total energy of the molecule $E=(3+2)\times(1/2)kT + 2kT=(9/2)kT$.
$(b)$ It has $4$ normal modes of vibration. Considering each normal mode as one d.o.f., $E=(3+2+4)\times (1/2)kT=(9/2)kT$
$(c)$ I think considering each normal mode as an oscillator makes more sense. In that case, vibrational contribution $= 4kT$ and $E=(13/2)kT$.
Which of these is correct way (if either) to approach for any general molecule? I can't find enough examples that talk about all degrees of freedom active at high temperatures that could help me clear my doubt.