Create a shell company with an X$ investment.
Have the shell company write code. (Or more risky pay your company to write code as a work for higher.)
Devolve the shell contributing its assets to OSS.
Take a X$ loss in that year.
Argue that it is perfectly legal to the IRS.