UInt64 = 0; i < 16; ++i { var min = i; for var j = i+1; j < 16; ++j { if read_nibble(arg, j) < read_nibble(arg, min) { min = j } } if (min != i) { var tmp = read_nibble(arg, i) write_nibble(&arg, i, read_nibble(arg, min)) write_nibble(&arg, min, tmp) } } return arg; }