9. Given real numbers $a, b, c$ are all not equal to 0, and $a+b+c=m, a^{2}+b^{2}+c^{2}=\frac{m^{2}}{2}$, find the value of $\frac{a(m-2 a)^{2}+b(m-2 b)^{2}+c(m-2 c)^{2}}{a b c}$.
$$
\begin{array}{l}
a(m-2 a)^{2}+b(m-2 b)^{2}+c(m-2 c)^{2}=a(b+c-a)^{2}+b(c+a-b)^{2}+c(a+b-c)^{2} \\
=(a+b+c)\left(a^{2}+b^{2}+c^{2}\right)+6 a b c-[2 a b(a+b)+2 b c(b+c)+2 c a(c+a)] \\
=\frac{1}{2} m^{3}+6 a b c-[2 a b(m-c)+2 b c(m-a)+2 c a(m-b)] \\
=\frac{1}{2} m^{3}+12 a b c-m(2 a b+2 b c+2 c a)=\frac{1}{2} m^{3}+12 a b c-m\left(m^{2}-\frac{m^{2}}{2}\right)=12 a b c,
\end{array}
$$

Therefore, $\frac{a(m-2 a)^{2}+b(m-2 b)^{2}+c(m-2 c)^{2}}{a b c}=12$.