In "g_int_compress" :
int *dr; ... memmove((void *) &dr[cand - 1], (void *) &dr[cand + 1], (len - cand -1) * sizeof(int));
Should be
int32 *dr; ... memmove((void *) &dr[cand - 1], (void *) &dr[cand + 1], (len - cand -1) * sizeof(int32));