I think I can answer your last question...

~ is Bitwise NOT... meaning to invert each bit

For the other question I can not help... I have yet to understand exactly what the DIV32 function does.