Integration of subdifferentials of nonconvex functions