cmp = qa->cmp; arg = qa->arg;
cmp = hsa->cmp; arg = hsa->arg;
HeapSortHelper(HSortArgs *qa, int lo, int hi){    void *pivot, *vec, *vec2, *arg, *a, *b;    size_t elsize;    JSComparator cmp;    JSBool fastmove;    int j, hiDiv2;    pivot = qa->pivot;    vec = qa->vec;    elsize = qa->elsize;    vec2 =  (char *)vec - 2 * elsize;    cmp = qa->cmp;    arg = qa->arg;    fastmove = (cmp == sort_compare || cmp == sort_compare_strings);#define MEMMOVE(p,q,n) \    (fastmove ? (void)(*(jsval*)(p) = *(jsval*)(q)) : (void)memmove(p, q, n))    if (lo == 1) {        j = 2;        b = (char *)vec + elsize;        if (j < hi && cmp((char *)vec, b, arg) < 0)            j++;        a = (char *)vec + (hi - 1) * elsize;        b = (char *)vec2 + j * elsize;        if (cmp(a, b, arg) >= 0)            return;        MEMMOVE(pivot, a, elsize);        MEMMOVE(a, b, elsize);        lo = j;    } else {        a = (char *)vec2 + lo * elsize;        MEMMOVE(pivot, a, elsize);    }    hiDiv2 = hi/2;    while (lo <= hiDiv2) {        j = lo + lo;        a = (char *)vec2 + j * elsize;        b = (char *)vec + (j - 1) * elsize;        if (j < hi && cmp(a, b, arg) < 0)            j++;        b = (char *)vec2 + j * elsize;        if (cmp(pivot, b, arg) >= 0)            break;        a = (char *)vec2 + lo * elsize;        MEMMOVE(a, b, elsize);        lo = j;    }    a = (char *)vec2 + lo * elsize;    MEMMOVE(a, pivot, elsize);#undef MEMMOVE}