When Totentanz dies, it and Nim Deathmantle triggers.
Resolve the Totentanz trigger, creating a 1/1 Rat creature token.
Activate Ashnod's Altar by sacrificing the Rat, adding ({C} magic symbol) ({C} magic symbol) .
Resolve the Nim Deathmantle trigger from step 2, causing you to pay ({4} magic symbol) to return Totentanz from your graveyard to the battlefield, and attach Nim Deathmantle to it.