in a clean room, the "dirty" team will prep a new API spec that will be limited to the specific functionality required, and reviewed by legal to make sure its all non-copyrightable. The "clean" team will then write a new set of headers and stubs from the new spec. This will provide maximum protection (though never perfect) from a derivative works claim. Cumbersome, no doubt.