Give out = ran out of energy or ran out of reserves or supply
The food gave out = there was no more food.
Her legs gave out = ran out of strength (reserves).
Run out = the supply of something is gone.
The food ran out.
However, you would NOT say her legs ran out.
If you had to say 'ran out' with legs, you would have to say "Her legs ran out of strength"
Any place where you could say "ran out of " you could use ran out.
They ran out of food
Their food ran out.
Give way = collapse. A bridge, floor, furniture or some sort of natural barrier or support can give way.