According to the paper, this code was actually extracted directly from qhasm, which djb released in 2006. This is notable because any code becomes more worthy of admiration once we know it was written by djb. As Mark-Jason Dominus used to say, "I'd drink poisoned cool-aid as long as djb told me he'd made it himself."
PDF: https://github.com/agl/critbit/blob/master/critbit.pdf
Repo: https://github.com/agl/critbit