Complex sentence: Madonna was in the movie and was entitled under her contract to record the end title song.
Split into simpler sentences: Madonna was in the movie and had a contract. Madonna's contract stated that she had to record the end title song.