Hint
A swap in row one always maps to three simultaneous swaps of nonoverlapping pairs in row two. What kind of change in the middle is induced, in the other direction, by flipping three nonoverlapping pairs on the top? How many of each class permutations (transpositions, and triads of nonoverlapping transpositions) are there?
The answers here point the way to a full general solution.