A Generic Theory of the Integer Quantum Hall Effect