Curve25519 implementation is both the most blessed and cursed code in the world.
On one hand, it has the cleanest math and attracted the best minds to work on it. Now the code deployed in most projects have been fully optimized, and formally verified to be mathematically correct and secure. One of the biggest accomplishment in crypto applications in recent years.
On the other hand, the monstrous, machine-generated assembly or C code will give any unsuspected programmer a heart attack.
Seriously, "you are not expected to understand this."
