Windows 2000 and NT source leaked through a source code availability program: https://en.wikipedia.org/wiki/Windows_Interface_Source_Envir... . If that could happen then absolutely governments would have it.
The iOS kernel is based on Darwin which in macOS form is an open source project. It’s usually a bit out of date, but is available for download.