A decompilation is not clean room, nor is it "created from scratch". If that was the case, you could just compile a program to remove the copyright, because the machine code doesn't resemble the source code at all either.
A reimplementation or a behavior-based clone is an entirely different legal world from decompilation.