You can fly over any mountains, you don't have to immediately descend- that's what O2 masks are for. Pilots will be aware of that leg's 'safety altitude which will be an altitude to pass over any peak in that corridor, and that will be the lowest you can descend. But you have to descend further before the O2 runs out. When you pass over the northern edge of the Himalayas/Western China mountains, you fly as near direct as you can bearing in mind 'escape routes' where if you lose an engine or have a depressurisation, you can get out of trouble and clear of the mountains. Near Urumchi in western China is like this. It means you cannot pass over large mountain ranges, but ranges like the Alps or Pyrenees are no problem.