Earlier quoted context omitted.
Genuine question: if a human did this manually would it be considered derived?
https://en.wikipedia.org/wiki/Clean-room_design There is a lot of legal history of doing new designs with influence from reverse engineered sources. The basic rule is that you can't have someone familiar with the original code involved with writing the new code. LLMs are a new area, but I would expect that feeding the original source into an LLM context and saying "Write this, but different" wouldn't qualify as a cle…
How and whether the same principles can be applied to LLMs, I have no idea. I imagine it would involve discussions about creativity, for example.
Not a lawyer.