The mosque during a restoration.
During a restauration one could see, through the then open gate, the ramp, so the Sultan could ascend to the height of the connecting corridor to the left, so he'd reach his private prayer room.
Picture taken from the south.