The geometric theory of ordinary differential equations and algebraic functions