Total internal reflection occurs when a ray of light is traveling through a medium and, when that medium changes, it does not refract into the second medium but instead it reflects back into the first medium.
By Snell's law, we know that
If this happens, then
, and the ray does not lose intensity due to refraction.
A ray of light has the same intensity both entering and exiting a fiber optic cable.