Many of Tor's complex functions should be refactored
See some discussion on #6177 (moved).
I'm attaching a list of the most complex functions in Tor (by cyclomatic complexity).
Possibly cyclomatic-complexity-per-line would be another good thing to look at.
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information