@Mathematica
(* Functions *)
sortOdds[lst_]:=Module[{evens,odds,newodds},
(* Analysis *)
{evens,odds}=lst//
MapIndexed[List,#]&//
{Select[#,EvenQ[#[[1]]]&],Select[#,OddQ[#[[1]]]&]}&;
newodds=odds//
{Map[#[[1]]&,#],Map[#[[2]]&,#]}&//
{Sort[#[[1]]],#[[2]]}&//
MapThread[List,#]&;
(* Results *)
{evens,newodds}//
Flatten[#,1]&//
Sort[#,#2[[2,1]]>#1[[2,1]]&]&//
Map[#[[1]]&,#]&
];
sortEvensOdds[lst_]:=Module[{evens,odds,newevens,newodds},
(* Analysis *)
{evens,odds}=lst//
MapIndexed[List,#]&//
{Select[#,EvenQ[#[[1]]]&],Select[#,OddQ[#[[1]]]&]}&;
newevens=evens//
{Map[#[[1]]&,#],Map[#[[2]]&,#]}&//
{Sort[#[[1]]/2,Greater],#[[2]]}&//
MapThread[List,#]&;
newodds=odds//
{Map[#[[1]]&,#],Map[#[[2]]&,#]}&//
{Sort[#[[1]]],#[[2]]}&//
MapThread[List,#]&;
(* Results *)
{newevens,newodds}//
Flatten[#,1]&//
Sort[#,#2[[2,1]]>#1[[2,1]]&]&//
Map[#[[1]]&,#]&
];
(* Results *)
In[1] := sortOdds[{6, 5, 4, 3, 2, 1}]
Out[1] = {6, 1, 4, 3, 2, 5}
In[2] := sortEvensOdds[{6, 5, 4, 3, 2, 1}]
Out[2] = {3, 1, 2, 3, 1, 5}
QE1hdGhlbWF0aWNhCgooKiBGdW5jdGlvbnMgKikKc29ydE9kZHNbbHN0X106PU1vZHVsZVt7ZXZlbnMsb2RkcyxuZXdvZGRzfSwKCgkoKiBBbmFseXNpcyAqKQoJe2V2ZW5zLG9kZHN9PWxzdC8vCgkJTWFwSW5kZXhlZFtMaXN0LCNdJi8vCgkJe1NlbGVjdFsjLEV2ZW5RWyNbWzFdXV0mXSxTZWxlY3RbIyxPZGRRWyNbWzFdXV0mXX0mOwoKCW5ld29kZHM9b2Rkcy8vCgkJe01hcFsjW1sxXV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