Then use (Edit: see further down for a better, safer approach):
 Note that to be POSIX compliant, that code should have gsub(q, q "\\\\" q q, s) instead of gsub(q, q "\\" q q, s), however the latter, even though yielding unspecified behaviour by POSIX is more portable as the former doesn't work properly with gawk unless $POSIXLY_CORRECT is in the environment nor busybox awk for instance.
 If the data is not guaranteed to be valid text in the user's locale, one can set the locale to C and then the strings will be considered as arrays of bytes and sorted as if by strcmp() (on ASCII-based systems), not as per the user's locale collation order.
 Giving eval something that is potentially the result of unspecified behaviour is quite uncomfortable, but on second thought, it should be possible to make it reliable if instead of having awk output something like set -- '3rd argument hoped to be quoted correctly' 'first' 'second', we have it output set -- "${3}" "${1}" "${2}".
 That should also be easier to do, shorter and more efficient:
code=$(
  awk -- '
    code-from-that-link-above
    BEGIN {
      delete ARGV[0]
      n = qsortArbIndByValue(ARGV, rank)
      printf "set --"
      for (i = 1; i <= n; i++)
        printf " \"${%s}\"", rank[i]
    }' "$@"
) || exit
eval "$code"