First let's look at the difference between IAS and TAS
TAS is your true airspeed and is independent of altitude, it's the speed at which you're moving through air. If there is no wind it is equal to your airspeed. On the other hand IAS is the airspeed you read on your flight instruments as indicated airspeed and is a function of the dynamic pressure. Your pitot tube is measuring the stagnation pressure and deducing the static pressure you get the dynamic pressure related to the airspeed.
$$ P_{stagn}=P_{static}+\frac{1}{2}\rho V^2$$
As your instruments are calibrated for a given $\rho$ the indicated airspeed IAS will be different than the TAS with variation of the air density. IAS is used to provide a good idea of the aircraft performances as in drag and lift equation the term $\frac{1}{2}\rho V^2$ is always there. At same IAS, the aircraft aerodynamic performances will be the same whether you are at see level or up a mountain.
Now moving to the engine part of the question. Modern turbofans actually work with fairly constant airflow speed inside fixed by their design. Thrust is produced by accelerating air through the engine. The more air you can accelerate and the more speed increase you can provide the more thrust you get.
As the exhaust leaves the engine nozzle at a fairly fixed velocity, the acceleration provided is directly linked to the incoming airspeed, and here it's the true airspeed that matters. The faster the aircraft speed, the less the intake air is being accelerated. Therefore thrust decreases with increasing airspeed.
Furthermore the higher you fly the less air density you have. Then for the same volume of intake air passing through your engine, less mass is accelerated and therefore thrust is also reduced while flying at high altitude.
Both effects are mitigated by the fact that flying faster increases compression in the intake and lets the whole engine operate at a higher pressure level, thus increasing the output thrust. As airspeed increase, more volume of air is directed in the inlet where it needs to slow down before entering the compressor, thus increasing the inlet pressure your engine is seeing.
Modern turbofans are highly oversized, as for twin engines airliners they must be able to fly level for more than 180min with one engine shut down (ETOPS 180 certification). Therefore they never use the maximal power output they can generate even at take-off. Then even if with the altitude and airspeed thrust decrease there is still plenty enough to cruise at transsonic speed. Finally the shaft power is a function of the torque and RPM of the engine. The torque is directly related to the thrust and the RPM are maintained at quite a constant value in new engines. Therefore if thrust decreases, the aerodynamic torque on the fan decreases and the shaft power required to drive it will decrease. Maintaining the same IAS means your drag will remain constant in level flight whatsoever your flying altitude. And thrust requirement remains constant. On ducted fan the inlet compressive effect at high speed mitigate the need of higher RPM. On propeller on the other hand, if you don't adapt your blade pitch, at constant power output, the RPM will increase which is not really good for the engine and the blade tip going supersonic. If you change your pitch your blade can remain at constant speed and the RPM will remain constant.