@Harald Pretl: The netlist on the left has ports in alphabetical order which is how they are in the PDK (and the port order should be the same for all views in the PDK where port order matters). My hunch is that the netlist on the right was made after reading GDS. There is no standard for marking port order in GDS. Magic just makes sure that it always writes labels out in the GDS in monotonically increasing port order, so if it reads its own GDS back, the port order remains the same (at least, I think that's true). If you wrote GDS from, say, klayout, and read it back, then port order could be anything. That's my guess about how the port order got scrambled (openlane may use klayout to write GDS). Normally, this doesn't matter, because normally, one doesn't mix and match different netlists.