[S390] convert/optimize csum_fold() to C