The code is pulling the values listed in the sup file for X and Y and mapping them to X and Y. So if its rotated then either Superstar isn't outputting the values to the correct parameters or your model is defined wrong in xLights. The Flip only flips the Y values so it's a vertical flip.
Ah... so that's the problem. XLights and your utility is being logical. Superstar is not.
For a 14 x 50 grid, CCR's selected for convenience, you get the following in Superstar positioning:
HorizontalTop Left x=13 y=0
Bottom Left x=0 y=0
Top Right x=13 y=49
Bottom Right x=0 y=49
VerticalTop Left x=0 y=0
Bottom Left x=0 y=49
Top Right x=13 y=0
Bottom Right x=13 y=49
So just as we have the weirdness that in a vertical arrangement the Y position is descending when it's horizontal then X becomes the vertical ascending upwards and y is the horizontal ascending left to right.
So you are indeed taking X and Y as they are in the sup file, they just don't mean what you think they mean when you see ribbonOrientation="horizontal" in the layout tag.
I dealt with this when I wrote a quick utility for increasing/decreasing string count a year or two ago... I might dig out that code.
Simple enough for me for now to write a two second parser for the SUP file to switch x/y (and off the top of my head I'll probably also need to reverse one of them).