
For this creature to not be sacrificed, must have been spent on the
mana cost. It doesn't matter if
is spent on
.
You choose the value of X as Squealing Devil's ability resolves. X can be 0.
If this enters in a way other than announcing it as a spell, then the appropriate mana can't have been paid, and you'll have to sacrifice it.