Here is what appears to be some sort of a folded cascode amplifier, but does not really match with any classic text book example. Does it make sense to you guys?
You are probably right, n-channel transistors should all go to GND and p-channel to Vdd, so I must have it backwards except for the photo diode which should be reverse biased