Branch Coverage

XS.xs
Criterion Covered Total %
branch 1591 2634 60.4


line true false branch
151 41018 13 if (sv_isobject(n)) {
152 41018 0 const char *hvname = HvNAME_get(SvSTASH(SvRV(n)));
41018 0 const char *hvname = HvNAME_get(SvSTASH(SvRV(n)));
0 41018 const char *hvname = HvNAME_get(SvSTASH(SvRV(n)));
0 0 const char *hvname = HvNAME_get(SvSTASH(SvRV(n)));
41018 0 const char *hvname = HvNAME_get(SvSTASH(SvRV(n)));
0 41018 const char *hvname = HvNAME_get(SvSTASH(SvRV(n)));
153 41018 0 if (hvname != 0) {
154 3 41015 if (strEQ(hvname, "Math::BigInt") || strEQ(hvname, "Math::BigFloat") ||
0 3 if (strEQ(hvname, "Math::BigInt") || strEQ(hvname, "Math::BigFloat") ||
0 0 if (strEQ(hvname, "Math::BigInt") || strEQ(hvname, "Math::BigFloat") ||
155 0 0 strEQ(hvname, "Math::GMPz") || strEQ(hvname, "Math::GMP") ||
0 0 strEQ(hvname, "Math::GMPz") || strEQ(hvname, "Math::GMP") ||
156 0 0 strEQ(hvname, "Math::GMPq") || strEQ(hvname, "Math::AnyNum") ||
0 0 strEQ(hvname, "Math::GMPq") || strEQ(hvname, "Math::AnyNum") ||
157 0 0 strEQ(hvname, "Math::Pari") || strEQ(hvname, "Math::BigInt::Lite"))
177 1007203 47705 if (SVNUMTEST(n)) { /* If defined as number, use it */
178 1006144 1059 if (SvIsUV(n) || SvIVX(n) >= 0) return 1; /* The normal case */
979108 27036 if (SvIsUV(n) || SvIVX(n) >= 0) return 1; /* The normal case */
179 27025 11 if (negok) return -1;
182 41018 6687 if (sv_isobject(n)) {
184 0 41018 if (!isbignum) return 0;
187 47704 1 if (SvGAMAGIC(n) && !isbignum) return 0;
41018 6686 if (SvGAMAGIC(n) && !isbignum) return 0;
41018 0 if (SvGAMAGIC(n) && !isbignum) return 0;
41018 0 if (SvGAMAGIC(n) && !isbignum) return 0;
1 41018 if (SvGAMAGIC(n) && !isbignum) return 0;
188 20 47684 if (!SvOK(n)) croak("Parameter must be defined");
20 0 if (!SvOK(n)) croak("Parameter must be defined");
20 0 if (!SvOK(n)) croak("Parameter must be defined");
189 6438 41246 ptr = SvPV_nomg(n, len); /* Includes stringifying bigints */
190 47683 1 if (len == 0 || ptr == 0) croak("Parameter must be a positive integer");
0 47683 if (len == 0 || ptr == 0) croak("Parameter must be a positive integer");
191 340 47343 if (ptr[0] == '-' && negok) {
336 4 if (ptr[0] == '-' && negok) {
193 5 47342 } else if (ptr[0] == '+') {
196 47682 1 if (len == 0 || !isDIGIT(ptr[0]))
24 47658 if (len == 0 || !isDIGIT(ptr[0]))
198 47664 383 while (len > 0 && *ptr == '0') /* Strip all leading zeros */
389 47275 while (len > 0 && *ptr == '0') /* Strip all leading zeros */
200 36817 10841 if (len > uvmax_maxlen) /* Huge number, don't even look at it */
202 58793 10830 for (i = 0; i < len; i++) /* Ensure all characters are digits */
203 11 58782 if (!isDIGIT(ptr[i]))
205 81 10749 if (isneg == 1) /* Negative number (ignore overflow) */
207 0 10749 ret = isneg ? -1 : 1;
208 0 10749 maxlen = isneg ? ivmax_maxlen : uvmax_maxlen;
209 0 10749 maxstr = isneg ? ivmax_str : uvmax_str;
210 10503 246 if (len < maxlen) /* Valid small integer */
212 985 5 for (i = 0; i < maxlen; i++) { /* Check if in range */
213 82 903 if (ptr[i] < maxstr[i]) return ret;
214 159 744 if (ptr[i] > maxstr[i]) return 0;
229 10118 28452 int use_gmp = stashflags & VCALL_GMP && _XS_get_callgmp() && _XS_get_callgmp() >= version;
0 10118 int use_gmp = stashflags & VCALL_GMP && _XS_get_callgmp() && _XS_get_callgmp() >= version;
0 0 int use_gmp = stashflags & VCALL_GMP && _XS_get_callgmp() && _XS_get_callgmp() >= version;
231 0 38570 if (use_gmp && hv_exists(MY_CXT.MPUGMP,name,namelen)) {
0 0 if (use_gmp && hv_exists(MY_CXT.MPUGMP,name,namelen)) {
233 0 0 if (gvp) gv = *gvp;
235 38570 0 if (!gv && (stashflags & VCALL_PP))
31137 7433 if (!gv && (stashflags & VCALL_PP))
237 38570 0 if (!gv) {
238 31137 7433 GV ** gvp = (GV**)hv_fetch(stashflags & VCALL_PP? MY_CXT.MPUPP : MY_CXT.MPUroot, name,namelen,0);
239 38570 0 if (gvp) gv = *gvp;
243 0 38570 PUSHMARK(PL_stack_sp-nargs);
287 0 1 dSP; ENTER; PUSHMARK(SP);
288 0 1 XPUSHs(r);
307 0 13 if (SvTYPE((SV*)av) != SVt_PVAV)
310 0 13 New(0, r, len, UV);
311 63 13 for (i = len-1; i >= 0; i--) {
313 0 63 if (_validate_int(aTHX_ *psvd, 1) != 1) break;
314 0 63 r[i] = my_svuv(*psvd) + carry;
315 14 49 if (r[i] >= (UV)base && i > 0) {
11 3 if (r[i] >= (UV)base && i > 0) {
322 0 13 if (i >= 0) {
333 402 0 return (negamod == 0) ? 0 : n-negamod;
361 9648 48 for (i = 0; i <= CINTS; i++) {
407 9648 48 for (i = 0; i <= CINTS; i++) {
423 0 6 if (items == 0) {
425 0 6 } else if (_XS_get_secure()) {
428 6 0 data = (unsigned char*) SvPV(seed, size);
436 0 5 if (_XS_get_secure())
438 1 4 if (items == 0)
451 100005 6 if (ix == 0)
470 2001 4037 if (m != 0) RETVAL *= m;
479 36 1 RETVAL = newSV(n == 0 ? 1 : n);
492 2 0 RETVAL = newSV(n == 0 ? 1 : n);
558 29 1147 histatus = (items == 1 || _validate_int(aTHX_ ST(1), 0));
28 1 histatus = (items == 1 || _validate_int(aTHX_ ST(1), 0));
559 1175 1 if (lostatus == 1 && histatus == 1) {
1175 0 if (lostatus == 1 && histatus == 1) {
561 1147 28 if (items == 1) {
563 0 1147 hi = my_svuv(svlo);
565 0 28 lo = my_svuv(svlo);
566 0 28 hi = my_svuv(ST(1));
568 1165 10 if (lo <= hi) {
569 139 1026 if (ix == 0) { count = prime_count(lo, hi); }
570 11 1015 else if (ix == 1) { count = twin_prime_count(lo, hi); }
571 10 1005 else if (ix == 2) { count = ramanujan_prime_count(lo, hi); }
572 2 1003 else if (ix == 3) { count = ramanujan_prime_count_approx(hi);
573 0 2 if (lo > 2)
575 1003 0 else if (ix == 4) {
577 0 1003 if (hi >= 29505444491UL && hi-lo > hi/50) {
0 0 if (hi >= 29505444491UL && hi-lo > hi/50) {
580 0 0 if (lostatus == 1 && lo > 2) {
0 0 if (lostatus == 1 && lo > 2) {
583 0 0 if (count < lo_loc) hicount--;
586 0 0 if (lostatus == 1 && hicount > 0)
0 0 if (lostatus == 1 && hicount > 0)
587 0 0 RETURN_128(hicount, count);
591 0 0 } else if (ix == 5) {
592 0 0 int fd = (items < 3) ? fileno(stdout) : my_sviv(ST(2));
0 0 int fd = (items < 3) ? fileno(stdout) : my_sviv(ST(2));
597 1175 0 if (lostatus == 1) XSRETURN_UV(count);
600 1 0 case 0: _vcallsubn(aTHX_ GIMME_V, VCALL_ROOT, "_generic_prime_count", items, 0); break;
617 10024 12000 histatus = (items == 1 || _validate_int(aTHX_ svhi, 0));
10017 1 histatus = (items == 1 || _validate_int(aTHX_ svhi, 0));
618 22017 1 if (lostatus == 1 && histatus == 1) {
22017 0 if (lostatus == 1 && histatus == 1) {
619 12000 10017 if (items == 1) {
621 0 12000 hi = my_svuv(svlo);
623 0 10017 lo = my_svuv(svlo);
624 0 10017 hi = my_svuv(svhi);
627 22011 6 if (ret) XSRETURN_UV(ret);
631 0 1 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
676 1078 133 if ((low <= 2) && (high >= 2) && ix != 4) { av_push(av, newSVuv( 2 )); }
1074 4 if ((low <= 2) && (high >= 2) && ix != 4) { av_push(av, newSVuv( 2 )); }
1069 5 if ((low <= 2) && (high >= 2) && ix != 4) { av_push(av, newSVuv( 2 )); }
677 1090 121 if ((low <= 3) && (high >= 3) && ix != 5) { av_push(av, newSVuv( 3 )); }
1076 14 if ((low <= 3) && (high >= 3) && ix != 5) { av_push(av, newSVuv( 3 )); }
1071 5 if ((low <= 3) && (high >= 3) && ix != 5) { av_push(av, newSVuv( 3 )); }
678 1099 112 if ((low <= 5) && (high >= 5) && ix != 5) { av_push(av, newSVuv( 5 )); }
1070 29 if ((low <= 5) && (high >= 5) && ix != 5) { av_push(av, newSVuv( 5 )); }
1065 5 if ((low <= 5) && (high >= 5) && ix != 5) { av_push(av, newSVuv( 5 )); }
679 1101 110 if (low < 7) low = 7;
680 1168 43 if (low <= high) {
681 17 1151 if (ix == 4) high += 2;
682 1100 68 if (ix == 0) { /* Sieve with primary cache */
683 0 1100 START_DO_FOR_EACH_PRIME(low, high) {
0 1289669 START_DO_FOR_EACH_PRIME(low, high) {
0 0 START_DO_FOR_EACH_PRIME(low, high) {
0 0 START_DO_FOR_EACH_PRIME(low, high) {
485162 804507 START_DO_FOR_EACH_PRIME(low, high) {
160 506576 START_DO_FOR_EACH_PRIME(low, high) {
21574 485002 START_DO_FOR_EACH_PRIME(low, high) {
160 485002 START_DO_FOR_EACH_PRIME(low, high) {
0 1289509 START_DO_FOR_EACH_PRIME(low, high) {
940 1288569 START_DO_FOR_EACH_PRIME(low, high) {
686 11 57 } else if (ix == 1) { /* Trial */
687 547 11 for (low = next_prime(low-1);
688 547 0 low <= high && low != 0;
692 9 48 } else if (ix == 2) { /* Erat with private memory */
694 639 0 START_DO_FOR_EACH_SIEVE_PRIME( sieve, 0, low, high ) {
9 630 START_DO_FOR_EACH_SIEVE_PRIME( sieve, 0, low, high ) {
538 92 START_DO_FOR_EACH_SIEVE_PRIME( sieve, 0, low, high ) {
639 17 START_DO_FOR_EACH_SIEVE_PRIME( sieve, 0, low, high ) {
26 9 START_DO_FOR_EACH_SIEVE_PRIME( sieve, 0, low, high ) {
698 32 16 } else if (ix == 3 || ix == 4) { /* Segment */
17 15 } else if (ix == 3 || ix == 4) { /* Segment */
702 37 33 while (next_segment_primes(ctx, &seg_base, &seg_low, &seg_high)) {
703 394266 0 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
33 394233 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
394200 33 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
394266 22927 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
22960 37 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
704 308148 86052 if (ix == 3) av_push(av,newSVuv( p ));
705 8957 77095 else if (lastp+2 == p) av_push(av,newSVuv( lastp ));
710 15 0 } else if (ix == 5) { /* Ramanujan primes */
713 15 0 if (L && end >= beg)
14 1 if (L && end >= beg)
714 94 14 for (i = beg; i <= end; i++)
717 0 0 } else if (ix == 6) { /* Ramanujan primes */
720 0 0 if (L && high >= low)
0 0 if (L && high >= low)
721 0 0 for (i = low; i <= high; i++)
734 10 0 if (status == 1) {
736 0 10 UV factors[MPU_MAX_FACTORS+1], i, n = my_svuv(svn);
737 0 10 if (depth == 0) depth = 1; /* Trial factor takes 0 to means sqrt(n) */
738 0 10 if ( (n + width) < n) { /* Overflow */
740 10 0 } else if (depth <= 100) { /* trial division for each value */
741 4 6 for (i = (n<2)?2-n:0; i < width; i++)
1610 10 for (i = (n<2)?2-n:0; i < width; i++)
742 316 1294 if (trial_factor(n+i, factors, depth) < 2)
743 0 316 XPUSHs(sv_2mortal(newSVuv( i )));
745 0 0 for (i = (n<2)?2-n:0; i < width; i++)
0 0 for (i = (n<2)?2-n:0; i < width; i++)
746 0 0 if (trial_factor(n+i, factors, 100) < 2)
747 0 0 if (factor(n+i,factors) < 2 || factors[0] > depth)
0 0 if (factor(n+i,factors) < 2 || factors[0] > depth)
748 0 0 XPUSHs(sv_2mortal(newSVuv( i )));
751 0 10 if (status != 1) {
752 0 0 _vcallsubn(aTHX_ GIMME_V, VCALL_GMP|VCALL_PP, "sieve_range", items, 36);
764 0 41 if (items > 100) croak("sieve_prime_cluster: too many entries");
766 215 41 for (i = 1; i < nc; i++) {
767 0 215 if (!_validate_int(aTHX_ ST(1+i), 0)) croak("sieve_prime_cluster: cluster values must be standard integers");
768 0 215 cval = my_svuv(ST(1+i));
769 0 215 if (cval & 1) croak("sieve_prime_cluster: values must be even");
770 0 215 if (cval > 2147483647UL) croak("sieve_prime_cluster: values must be 31-bit");
771 0 215 if (cval <= cl[i-1]) croak("sieve_prime_cluster: values must be increasing");
777 32 9 if (lostatus == 1 && histatus == 1) {
32 0 if (lostatus == 1 && histatus == 1) {
778 0 32 UV low = my_svuv(svlo);
779 0 32 UV high = my_svuv(svhi);
781 32 0 if (list != 0) {
783 32 0 EXTEND(SP, (IV)nprimes);
1 31 EXTEND(SP, (IV)nprimes);
784 12276 32 for (i = 0; i < nprimes; i++)
789 9 32 if (!done) {
790 9 0 _vcallsubn(aTHX_ GIMME_V, VCALL_GMP|VCALL_PP, "sieve_prime_cluster", items, 34);
812 0 83 if (n == 0) XSRETURN_UV(0);
813 0 83 if (ix == 9) { /* We don't have an ecm_factor, call PP. */
814 0 0 _vcallsubn(aTHX_ GIMME_V, VCALL_PP, "ecm_factor", 1, 0);
818 2 81 arg1 = (items >= 2) ? my_svuv(ST(1)) : default_arg1[ix];
0 2 arg1 = (items >= 2) ? my_svuv(ST(1)) : default_arg1[ix];
819 0 83 arg2 = (items >= 3) ? my_svuv(ST(2)) : 0;
0 0 arg2 = (items >= 3) ? my_svuv(ST(2)) : 0;
821 0 48 while ( (n% 2) == 0 ) { n /= 2; XPUSHs(sv_2mortal(newSVuv( 2 ))); }
48 83 while ( (n% 2) == 0 ) { n /= 2; XPUSHs(sv_2mortal(newSVuv( 2 ))); }
822 0 48 while ( (n% 3) == 0 ) { n /= 3; XPUSHs(sv_2mortal(newSVuv( 3 ))); }
48 83 while ( (n% 3) == 0 ) { n /= 3; XPUSHs(sv_2mortal(newSVuv( 3 ))); }
823 0 64 while ( (n% 5) == 0 ) { n /= 5; XPUSHs(sv_2mortal(newSVuv( 5 ))); }
64 83 while ( (n% 5) == 0 ) { n /= 5; XPUSHs(sv_2mortal(newSVuv( 5 ))); }
824 43 40 if (n == 1) { /* done */ }
825 24 19 else if (is_prime(n)) { XPUSHs(sv_2mortal(newSVuv( n ))); }
0 24 else if (is_prime(n)) { XPUSHs(sv_2mortal(newSVuv( n ))); }
837 2 0 case 7: if (items < 3) arg2 = 1;
840 2 0 default: if (items < 3) arg2 = 10*arg1;
843 19 0 EXTEND(SP, nfactors);
0 19 EXTEND(SP, nfactors);
844 39 19 for (i = 0; i < nfactors; i++)
856 1 54951 if (items < 2)
859 159947 54830 for (c = 0; c < items && status == 1; c++)
159826 121 for (c = 0; c < items && status == 1; c++)
860 121 159705 if (_validate_int(aTHX_ ST(c), 0) != 1)
862 54830 121 if (status == 1) {
863 0 54830 UV n = my_svuv(svn);
865 7 54823 if (n < 4) { /* 0,1 composite; 2,3 prime */
867 82 54741 } else if (ix == 1) { /* Fermat test */
868 86 82 for (c = 1; c < items && ret == 1; c++)
86 0 for (c = 1; c < items && ret == 1; c++)
869 0 86 ret = is_pseudoprime(n, my_svuv(ST(c)));
870 109 54632 } else if (ix == 2) { /* Euler test */
871 109 109 for (c = 1; c < items && ret == 1; c++)
109 0 for (c = 1; c < items && ret == 1; c++)
872 0 109 ret = is_euler_pseudoprime(n, my_svuv(ST(c)));
873 27072 27560 } else if ((n % 2) == 0) { /* evens composite */
877 27560 27558 for (c = 1; c < items && ret == 1; ) {
27560 0 for (c = 1; c < items && ret == 1; ) {
878 80104 0 for (b = 0; b < 32 && c < items; c++)
52544 27560 for (b = 0; b < 32 && c < items; c++)
879 0 52544 bases[b++] = my_svuv(ST(c));
883 54828 0 RETURN_NPARITY(ret);
54828 0 RETURN_NPARITY(ret);
906 19853 14 if (ix == 2 || ix == 3) {
15 19838 if (ix == 2 || ix == 3) {
909 2 27 if (items == 0) XSRETURN_UNDEF;
910 6 21 if (items == 1) XSRETURN(1);
912 19 2 if (status != 0 && items > 1) {
19 0 if (status != 0 && items > 1) {
914 0 19 ret = my_svuv(ST(0));
915 79 19 for (i = 1; i < items; i++) {
917 0 79 if (status == 0) break;
918 0 79 n = my_svuv(ST(i));
919 21 58 if (( (sign == -1 && status == 1) ||
15 6 if (( (sign == -1 && status == 1) ||
50 23 if (( (sign == -1 && status == 1) ||
31 48 if (( (sign == -1 && status == 1) ||
920 40 10 (n >= ret && sign == status)
928 19 2 if (status != 0) {
932 2054 17784 } else if (ix == 4) {
935 115885 2026 for (ret = i = 0; i < items; i++) {
937 26 115859 if (status == 0) break;
938 1 115858 n = my_svuv(ST(i));
939 115851 8 if (status == 1) {
942 2 6 if (UV_MAX-n == (UV)IV_MAX) { status = 0; break; } /* IV Overflow */
947 2026 28 if (status != 0 && hi != 0) {
2 2024 if (status != 0 && hi != 0) {
948 1 1 if (hi == -1 && lo > IV_MAX) XSRETURN_IV((IV)lo);
1 0 if (hi == -1 && lo > IV_MAX) XSRETURN_IV((IV)lo);
949 0 1 else RETURN_128(hi, lo);
952 15814 1970 } else if (ix == 5) {
955 19660 1788 for (i = 0; i < items; i++) {
957 13360 6300 if (status == 0) break;
958 6291 9 n = (status == 1) ? my_svuv(ST(i)) : (UV)-my_sviv(ST(i));
0 6291 n = (status == 1) ? my_svuv(ST(i)) : (UV)-my_sviv(ST(i));
9 0 n = (status == 1) ? my_svuv(ST(i)) : (UV)-my_sviv(ST(i));
959 6299 1 if (ret > 0 && n > UV_MAX/ret) { status = 0; break; }
666 5633 if (ret > 0 && n > UV_MAX/ret) { status = 0; break; }
963 5 15809 if (sign == -1 && status != 0) {
5 0 if (sign == -1 && status != 0) {
964 5 0 if (ret <= (UV)IV_MAX) XSRETURN_IV(-(IV)ret);
969 1946 24 if (ix == 0) { ret = 0; nullv = 1; }
971 3954 1958 for (i = 0; i < items && ret != nullv && status != 0; i++) {
3950 4 for (i = 0; i < items && ret != nullv && status != 0; i++) {
3949 1 for (i = 0; i < items && ret != nullv && status != 0; i++) {
973 7 3942 if (status == 0)
975 6 3936 n = status * my_svuv(ST(i)); /* n = abs(arg) */
976 1964 1978 if (i == 0) {
980 1950 28 if (ix == 0) {
984 26 2 if (n <= (UV_MAX / ret) ) ret *= n;
990 5768 14065 if (status != 0)
993 14064 1 if ((ix == 2 || ix == 3) && !sv_isobject(ST(0))) {
1 14063 if ((ix == 2 || ix == 3) && !sv_isobject(ST(0))) {
2 0 if ((ix == 2 || ix == 3) && !sv_isobject(ST(0))) {
998 2 0 aptr = SvPV(ST(0), alen);
1000 2 2 for (i = 1; i < items; i++) {
1001 2 0 bptr = SvPV(ST(i), blen);
1002 2 0 if (strnum_minmax(minmax, aptr, alen, bptr, blen)) {
1028 2 0 if ((!SvROK(x)) || (SvTYPE(SvRV(x)) != SVt_PVAV))
0 2 if ((!SvROK(x)) || (SvTYPE(SvRV(x)) != SVt_PVAV))
1031 1 1 if (SvROK(svm) && SvTYPE(SvRV(svm)) == SVt_PVAV) {
1 0 if (SvROK(svm) && SvTYPE(SvRV(svm)) == SVt_PVAV) {
1034 5 1 for (j = 0; j <= mlen; j++) {
1036 5 0 if (iv && SvTYPE(*iv) == SVt_IV) {
5 0 if (iv && SvTYPE(*iv) == SVt_IV) {
1037 5 0 SV **v = av_fetch(av, SvIV(*iv), 0);
1038 5 0 if (v) XPUSHs(*v);
0 5 if (v) XPUSHs(*v);
1041 1 0 } else if (_validate_int(aTHX_ svm, 0)) {
1042 0 1 UV mask = my_svuv(svm);
1043 24 1 while (mask) {
1044 13 11 if (mask & 1) {
1046 13 0 if (v) XPUSHs(*v);
0 13 if (v) XPUSHs(*v);
1052 0 0 _vcallsubn(aTHX_ GIMME_V, VCALL_PP, "vecextract", items, 0);
1065 0 25 New(0, an, 2*items, UV);
1067 47 22 for (i = 0; i < items; i++) {
1069 47 0 if (!SvROK(ST(i)) || SvTYPE(SvRV(ST(i))) != SVt_PVAV || av_len((AV*)SvRV(ST(i))) != 1)
47 0 if (!SvROK(ST(i)) || SvTYPE(SvRV(ST(i))) != SVt_PVAV || av_len((AV*)SvRV(ST(i))) != 1)
0 47 if (!SvROK(ST(i)) || SvTYPE(SvRV(ST(i))) != SVt_PVAV || av_len((AV*)SvRV(ST(i))) != 1)
1074 47 0 if (psva == 0 || psvn == 0 || _validate_int(aTHX_ *psva, 1) != 1 || !_validate_int(aTHX_ *psvn, 0)) {
47 0 if (psva == 0 || psvn == 0 || _validate_int(aTHX_ *psva, 1) != 1 || !_validate_int(aTHX_ *psvn, 0)) {
44 3 if (psva == 0 || psvn == 0 || _validate_int(aTHX_ *psva, 1) != 1 || !_validate_int(aTHX_ *psvn, 0)) {
0 44 if (psva == 0 || psvn == 0 || _validate_int(aTHX_ *psva, 1) != 1 || !_validate_int(aTHX_ *psvn, 0)) {
1078 0 44 an[i+0] = my_svuv(*psva);
1079 0 44 an[i+items] = my_svuv(*psvn);
1081 22 3 if (status)
1084 5 20 if (status == -1) XSRETURN_UNDEF;
1085 13 7 if (status) XSRETURN_UV(ret);
1088 2 5 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
2 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
2 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
2 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 1 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
0 1 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
0 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
0 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
0 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
0 1 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
0 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
0 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 1 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
0 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
0 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
0 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
0 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
0 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
0 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
0 0 OBJECTIFY_RESULT( (psvn ? *psvn : 0), ST(0));
1099 26445 199 if (ix == 1 || ix == 2) {
152 26293 if (ix == 1 || ix == 2) {
1100 0 351 if (items != 3) croak("lucasu: P, Q, k");
1101 351 0 if (_validate_int(aTHX_ ST(0), 1) && _validate_int(aTHX_ ST(1), 1) &&
1103 351 0 IV P = my_sviv(ST(0));
1104 351 0 IV Q = my_sviv(ST(1));
1105 0 351 UV k = my_svuv(ST(2));
1107 199 152 int ok = (ix == 1) ? lucasu(&ret, P, Q, k) : lucasv(&ret, P, Q, k);
1108 351 0 if (ok) XSRETURN_IV(ret);
1110 0 0 _vcallsub_with_gmpobj(0.29,(ix==1) ? "lucasu" : "lucasv");
1111 0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
0 0 OBJECTIFY_RESULT(ST(2), ST(0));
1114 0 26293 if (items != 4) croak("lucas_sequence: n, P, Q, k");
1115 26291 2 if (_validate_int(aTHX_ ST(0), 0) && _validate_int(aTHX_ ST(1), 1) &&
1116 26291 0 _validate_int(aTHX_ ST(2), 1) && _validate_int(aTHX_ ST(3), 0)) {
1117 0 26291 lucas_seq(&U, &V, &Qk,
26278 13 lucas_seq(&U, &V, &Qk,
26278 13 lucas_seq(&U, &V, &Qk,
0 26291 lucas_seq(&U, &V, &Qk,
1123 2 0 _vcallsubn(aTHX_ GIMME_V, VCALL_PP, "lucas_sequence", items, 0);
1160 896 475674 astatus = (items == 1 || ix==23) ? 1 : _validate_int(aTHX_ ST(1), 1);
877 19 astatus = (items == 1 || ix==23) ? 1 : _validate_int(aTHX_ ST(1), 1);
1161 475384 1186 if (status != 0 && astatus != 0) {
475384 0 if (status != 0 && astatus != 0) {
1163 17 475367 UV n = my_svuv(svn);
1164 767 474617 UV a = (items == 1 || ix == 23) ? 0 : my_svuv(ST(1));
748 19 UV a = (items == 1 || ix == 23) ? 0 : my_svuv(ST(1));
0 748 UV a = (items == 1 || ix == 23) ? 0 : my_svuv(ST(1));
1165 475259 125 if (status == 1 && astatus == 1 && ix < 22) {
475259 0 if (status == 1 && astatus == 1 && ix < 22) {
453990 21269 if (status == 1 && astatus == 1 && ix < 22) {
1178 28 0 if (items == 3) { P = my_sviv(ST(1)); Q = my_sviv(ST(2)); }
28 0 if (items == 3) { P = my_sviv(ST(1)); Q = my_sviv(ST(2)); }
28 0 if (items == 3) { P = my_sviv(ST(1)); Q = my_sviv(ST(2)); }
1179 0 0 else if (items != 1) croak("is_frobenius_pseudoprime takes P,Q");
1186 50 0 case 13: ret = is_almost_extra_strong_lucas_pseudoprime
1197 0 2282 if (ret == -1) status = 0;
1200 453990 0 if (status != 0 && astatus == 1) RETURN_NPARITY(ret);
453990 0 if (status != 0 && astatus == 1) RETURN_NPARITY(ret);
453990 0 if (status != 0 && astatus == 1) RETURN_NPARITY(ret);
453990 0 if (status != 0 && astatus == 1) RETURN_NPARITY(ret);
1201 10404 10990 } else if (ix == 22) {
1202 65 10339 if (status == -1) {
1203 17 48 IV sn = my_sviv(svn);
1204 2 63 if (sn <= -IV_MAX) status = 0;
1207 65 10339 if (status == 1 || (status == -1 && (a == 0 || a & 1))) {
63 2 if (status == 1 || (status == -1 && (a == 0 || a & 1))) {
4 59 if (status == 1 || (status == -1 && (a == 0 || a & 1))) {
2 2 if (status == 1 || (status == -1 && (a == 0 || a & 1))) {
1209 61 10339 if (status == -1 && a == 0) {
59 2 if (status == -1 && a == 0) {
1211 11 48 if (ret == 1) ret = 0;
1213 139 10261 if (ret && items == 3) {
29 110 if (ret && items == 3) {
1214 27 2 UV root = rootof(n, a ? a : (UV)ret);
1215 0 29 if (!SvROK(ST(2))) croak("is_power: third argument not a scalar reference");
1216 11 18 if (status == 1) sv_setuv(SvRV(ST(2)), root);
1220 10402 2 if (status != 0 && astatus != 0) RETURN_NPARITY(ret);
10402 0 if (status != 0 && astatus != 0) RETURN_NPARITY(ret);
10402 0 if (status != 0 && astatus != 0) RETURN_NPARITY(ret);
10402 0 if (status != 0 && astatus != 0) RETURN_NPARITY(ret);
1221 10254 736 } else if (ix == 23) {
1222 10254 0 if (status == 1) {
1225 2818 7436 if (ret && items > 1) {
17 2801 if (ret && items > 1) {
1226 0 17 if (!SvROK(ST(1))) croak("is_prime_power: second argument not a scalar reference");
1230 10254 0 if (status != 0) RETURN_NPARITY(ret);
10254 0 if (status != 0) RETURN_NPARITY(ret);
10254 0 if (status != 0) RETURN_NPARITY(ret);
1231 601 135 } else if (ix == 24) {
1233 601 0 if (status != 1 || n <= 0) croak("logint: n must be > 0");
0 601 if (status != 1 || n <= 0) croak("logint: n must be > 0");
1234 0 601 if (items == 1) croak("logint: missing base");
1235 601 0 if (astatus != 1 || a <= 1) croak("logint: base must be > 1");
0 601 if (astatus != 1 || a <= 1) croak("logint: base must be > 1");
1237 1 600 if (items == 3) {
1238 0 1 if (!SvROK(ST(2))) croak("logint: third argument not a scalar reference");
1242 23 112 } else if (ix == 25) {
1244 0 23 if (items == 1) croak("rootint: missing exponent");
1245 23 0 if (astatus != 1 || a == 0) croak("rootint: k must be > 0");
0 23 if (astatus != 1 || a == 0) croak("rootint: k must be > 0");
1246 0 23 if (status == -1) croak("rootint: n must be >= 0");
1247 23 0 if (status == 1) {
1249 20 3 if (items == 3) {
1250 0 20 if (!SvROK(ST(2))) croak("rootint: third argument not a scalar reference");
1255 102 10 } else if (ix == 26) {
1256 50 52 if (status == -1) {
1257 50 0 IV sn = my_sviv(svn);
1258 0 50 if (sn <= -IV_MAX) status = 0;
1261 102 0 if (status != 0)
1262 102 0 RETURN_NPARITY( is_fundamental(n, status == -1) );
102 0 RETURN_NPARITY( is_fundamental(n, status == -1) );
1277 0 1 case 11:_vcallsub_with_gmp(
0 0 case 11:_vcallsub_with_gmp(
0 0 case 11:_vcallsub_with_gmp(
0 0 case 11:_vcallsub_with_gmp(
0 0 case 11:_vcallsub_with_gmp(
1290 130 128 case 22:if (items != 3) { _vcallsub_with_gmp(0.28, "is_power"); }
1292 0 0 case 23:(void)_vcallsubn(aTHX_ G_SCALAR, (items == 1) ? (VCALL_GMP|VCALL_PP) : (VCALL_PP), "is_prime_power", items, 40); break;
1294 2 0 case 25:(void)_vcallsubn(aTHX_ G_SCALAR, (items == 2) ? (VCALL_GMP|VCALL_PP) : (VCALL_PP), "rootint", items, 40); break;
1306 0 25300 if (k < 3) croak("is_polygonal: k must be >= 3");
1308 25300 0 if (status != 0) {
1310 0 25300 if (status == -1) {
1313 0 25300 n = my_svuv(svn);
1315 25300 0 result = (n == 0) || root;
460 24840 result = (n == 0) || root;
1317 25300 0 if (!overflow) {
1318 460 24840 if (result && svroot != 0) {
230 230 if (result && svroot != 0) {
1319 0 230 if (!SvROK(svroot)) croak("is_polygonal: third argument not a scalar reference");
1322 25300 0 RETURN_NPARITY(result);
25300 0 RETURN_NPARITY(result);
1325 0 0 if (items != 3) { _vcallsub_with_gmp(0.00, "is_polygonal"); }
1336 1 7 if (bases < 0) croak("miller_rabin_random: number of bases must be positive");
1337 5 2 if (status != 0 && seed == 0) {
5 0 if (status != 0 && seed == 0) {
1338 0 5 UV n = my_svuv(svn);
1339 5 0 RETURN_NPARITY( is_mr_random(MY_CXT.randcxt, n, bases) );
5 0 RETURN_NPARITY( is_mr_random(MY_CXT.randcxt, n, bases) );
1367 9941 35 if (_validate_int(aTHX_ svn, 0)) {
1368 11 9930 UV n = my_svuv(svn);
1369 9 9932 if ( (n >= MPU_MAX_PRIME && ix == 0) ||
4 5 if ( (n >= MPU_MAX_PRIME && ix == 0) ||
47 9890 if ( (n >= MPU_MAX_PRIME && ix == 0) ||
1370 47 0 (n >= MPU_MAX_PRIME_IDX && (ix==2 || ix==3 || ix==4 || ix==5 || ix == 6)) ||
46 1 (n >= MPU_MAX_PRIME_IDX && (ix==2 || ix==3 || ix==4 || ix==5 || ix == 6)) ||
43 3 (n >= MPU_MAX_PRIME_IDX && (ix==2 || ix==3 || ix==4 || ix==5 || ix == 6)) ||
43 0 (n >= MPU_MAX_PRIME_IDX && (ix==2 || ix==3 || ix==4 || ix==5 || ix == 6)) ||
0 43 (n >= MPU_MAX_PRIME_IDX && (ix==2 || ix==3 || ix==4 || ix==5 || ix == 6)) ||
52 9881 (n >= MPU_MAX_PRIME_IDX && (ix==2 || ix==3 || ix==4 || ix==5 || ix == 6)) ||
1371 52 0 (n >= MPU_MAX_TWIN_PRIME_IDX && (ix==7 || ix==8)) ||
0 52 (n >= MPU_MAX_TWIN_PRIME_IDX && (ix==7 || ix==8)) ||
52 9881 (n >= MPU_MAX_TWIN_PRIME_IDX && (ix==7 || ix==8)) ||
1372 0 52 (n >= MPU_MAX_RMJN_PRIME_IDX && (ix==9)) ) {
1377 3759 6174 if (ix == 1 && n < 3) XSRETURN_UNDEF;
5 3754 if (ix == 1 && n < 3) XSRETURN_UNDEF;
1379 6 9922 if (n == 0 && (ix >= 2 && ix <= 9 && ix != 6)) XSRETURN_UNDEF;
5 1 if (n == 0 && (ix >= 2 && ix <= 9 && ix != 6)) XSRETURN_UNDEF;
4 1 if (n == 0 && (ix >= 2 && ix <= 9 && ix != 6)) XSRETURN_UNDEF;
3 1 if (n == 0 && (ix >= 2 && ix <= 9 && ix != 6)) XSRETURN_UNDEF;
1382 3754 0 case 1: ret = (n < 3) ? 0 : prev_prime(n); break;
1406 35 8 if ((ix == 0 || ix == 1) && _XS_get_callgmp() && PERL_REVISION >= 5 && PERL_VERSION > 8) {
3 32 if ((ix == 0 || ix == 1) && _XS_get_callgmp() && PERL_REVISION >= 5 && PERL_VERSION > 8) {
0 11 if ((ix == 0 || ix == 1) && _XS_get_callgmp() && PERL_REVISION >= 5 && PERL_VERSION > 8) {
1407 0 0 _vcallsub_with_gmpobj(0.01, ix ? "prev_prime" : "next_prime");
1408 0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
1433 0 8 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
0 0 OBJECTIFY_RESULT(svn, ST(0));
1464 294 321 if (minarg > 0 && bits < minarg)
6 288 if (minarg > 0 && bits < minarg)
1467 571 38 if (bits <= BITS_PER_WORD) {
1480 5 566 if (res || ix == 0) XSRETURN_UV(res);
2 3 if (res || ix == 0) XSRETURN_UV(res);
1494 1 40 OBJECTIFY_RESULT(ST(0), ST(0));
1 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 1 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 1 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
1513 1 1000 if (digits == 0) {
1515 15 985 } else if (digits <= mantsize) {
1530 0 972 if (digits <= 0) XSRETURN_EMPTY;
1532 0 972 XPUSHs(sv_2mortal(newSVpvn(out, digits+1)));
1544 1182 0 gimme_v = GIMME_V;
1546 1140 42 if (status == 1) {
1549 1 1139 UV n = my_svuv(svn);
1550 52 1088 if (gimme_v == G_SCALAR) {
1557 1088 0 } else if (gimme_v == G_ARRAY) {
1560 99 0 EXTEND(SP, nfactors);
0 99 EXTEND(SP, nfactors);
1561 430 99 for (i = 0; i < nfactors; i++)
1566 131 0 EXTEND(SP, nfactors);
0 131 EXTEND(SP, nfactors);
1567 363 131 for (i = 0; i < nfactors; i++) {
1577 858 0 EXTEND(SP, (IV)ndivisors);
0 858 EXTEND(SP, (IV)ndivisors);
1578 3743 858 for (i = 0; (UV)i < ndivisors; i++)
1600 2239 92 svk = (items > 1) ? ST(1) : 0;
1602 2239 92 kstatus = (items == 1 || (SvIOK(svk) && SvIV(svk) >= 0)) ? 1 : 0;
1320 919 kstatus = (items == 1 || (SvIOK(svk) && SvIV(svk) >= 0)) ? 1 : 0;
1320 0 kstatus = (items == 1 || (SvIOK(svk) && SvIV(svk) >= 0)) ? 1 : 0;
1320 0 kstatus = (items == 1 || (SvIOK(svk) && SvIV(svk) >= 0)) ? 1 : 0;
0 0 kstatus = (items == 1 || (SvIOK(svk) && SvIV(svk) >= 0)) ? 1 : 0;
1604 2324 7 if (nstatus == 1 && kstatus == 0 && SvROK(svk) && (sv_isa(svk, "Math::BigInt") || sv_isa(svk, "Math::GMP") || sv_isa(svk, "Math::GMPz")))
913 1411 if (nstatus == 1 && kstatus == 0 && SvROK(svk) && (sv_isa(svk, "Math::BigInt") || sv_isa(svk, "Math::GMP") || sv_isa(svk, "Math::GMPz")))
913 0 if (nstatus == 1 && kstatus == 0 && SvROK(svk) && (sv_isa(svk, "Math::BigInt") || sv_isa(svk, "Math::GMP") || sv_isa(svk, "Math::GMPz")))
913 0 if (nstatus == 1 && kstatus == 0 && SvROK(svk) && (sv_isa(svk, "Math::BigInt") || sv_isa(svk, "Math::GMP") || sv_isa(svk, "Math::GMPz")))
913 0 if (nstatus == 1 && kstatus == 0 && SvROK(svk) && (sv_isa(svk, "Math::BigInt") || sv_isa(svk, "Math::GMP") || sv_isa(svk, "Math::GMPz")))
0 913 if (nstatus == 1 && kstatus == 0 && SvROK(svk) && (sv_isa(svk, "Math::BigInt") || sv_isa(svk, "Math::GMP") || sv_isa(svk, "Math::GMPz")))
1606 2324 7 if (nstatus == 1 && kstatus == 1) {
1411 913 if (nstatus == 1 && kstatus == 1) {
1607 0 1411 UV n = my_svuv(svn);
1608 1320 91 UV k = (items > 1) ? my_svuv(svk) : 1;
0 1320 UV k = (items > 1) ? my_svuv(svk) : 1;
1610 1411 0 if (sigma != 0) XSRETURN_UV(sigma); /* sigma 0 means overflow */
1626 16599 2710 astatus = _validate_int(aTHX_ sva, (ix==1) ? 2 : 0);
1627 16599 2710 nstatus = _validate_int(aTHX_ svn, (ix==1) ? 2 : 0);
1628 19309 0 if (astatus != 0 && nstatus != 0) {
19305 4 if (astatus != 0 && nstatus != 0) {
1629 0 19305 UV a = my_svuv(sva);
1630 0 19305 UV n = my_svuv(svn);
1635 16562 37 case 1: if ( (astatus == 1 && (nstatus == -1 || n > a)) ||
16544 18 case 1: if ( (astatus == 1 && (nstatus == -1 || n > a)) ||
16536 8 case 1: if ( (astatus == 1 && (nstatus == -1 || n > a)) ||
37 16536 case 1: if ( (astatus == 1 && (nstatus == -1 || n > a)) ||
1636 17 20 (astatus ==-1 && (nstatus == -1 && n > a)) )
9 8 (astatus ==-1 && (nstatus == -1 && n > a)) )
1638 8 16556 if (nstatus == -1)
1640 28 16536 if (astatus == -1) {
1641 28 0 ret = binomial( -my_sviv(sva)+n-1, n );
1642 28 0 if (ret > 0 && ret <= (UV)IV_MAX)
28 0 if (ret > 0 && ret <= (UV)IV_MAX)
1643 15 13 XSRETURN_IV( (IV)ret * ((n&1) ? -1 : 1) );
1647 5232 11304 if (ret == 0)
1652 22 468 if (ret == 0 && n > 1)
22 0 if (ret == 0 && n > 1)
1655 901 1 case 3: if (a < 1 || n < 1) XSRETURN_IV(0);
1 900 case 3: if (a < 1 || n < 1) XSRETURN_IV(0);
1659 676 224 if (m == 0 || a == g) RETURN_NPARITY(m);
391 285 if (m == 0 || a == g) RETURN_NPARITY(m);
615 0 if (m == 0 || a == g) RETURN_NPARITY(m);
615 0 if (m == 0 || a == g) RETURN_NPARITY(m);
1669 703 12418 if (ret == 0 && ix == 0) XSRETURN_UNDEF; /* not defined */
4 699 if (ret == 0 && ix == 0) XSRETURN_UNDEF; /* not defined */
1698 1837 7345 if (astatus != 0 && gstatus != 0 && pstatus == 1) {
1829 8 if (astatus != 0 && gstatus != 0 && pstatus == 1) {
1792 37 if (astatus != 0 && gstatus != 0 && pstatus == 1) {
1699 432 1360 UV a, g, p = my_svuv(svp);
1700 224 1568 if (p <= 1) XSRETURN_UV(0);
1703 1568 0 a = (astatus == 1) ? my_svuv(sva) : negmod(my_sviv(sva), p);
408 1160 a = (astatus == 1) ? my_svuv(sva) : negmod(my_sviv(sva), p);
0 0 a = (astatus == 1) ? my_svuv(sva) : negmod(my_sviv(sva), p);
1704 1168 400 g = (gstatus == 1) ? my_svuv(svg) : negmod(my_sviv(svg), p);
172 996 g = (gstatus == 1) ? my_svuv(svg) : negmod(my_sviv(svg), p);
400 0 g = (gstatus == 1) ? my_svuv(svg) : negmod(my_sviv(svg), p);
1705 409 1159 if (a >= p) a %= p;
1706 168 1400 if (g >= p && ix != 4) g %= p;
126 42 if (g >= p && ix != 4) g %= p;
1709 5 15 if (ret == 0 && a > 1) retundef = 1;
3 2 if (ret == 0 && a > 1) retundef = 1;
1710 5 15 if (ret == 0 && (a == 0 || g == 0)) retundef = 1;
5 0 if (ret == 0 && (a == 0 || g == 0)) retundef = 1;
0 5 if (ret == 0 && (a == 0 || g == 0)) retundef = 1;
1715 83 118 if (g == 0) retundef = 1;
1719 0 388 default:if (a == 0) {
1723 100 288 if (gstatus == -1) {
1725 38 62 if (a == 0) retundef = 1;
1726 62 0 else g = -my_sviv(svg);
1732 124 1444 if (retundef) XSRETURN_UNDEF;
1743 7390 0 OBJECTIFY_RESULT(svp, ST(items-1));
7390 0 OBJECTIFY_RESULT(svp, ST(items-1));
7390 0 OBJECTIFY_RESULT(svp, ST(items-1));
7390 0 OBJECTIFY_RESULT(svp, ST(items-1));
7390 0 OBJECTIFY_RESULT(svp, ST(items-1));
0 7390 OBJECTIFY_RESULT(svp, ST(items-1));
0 0 OBJECTIFY_RESULT(svp, ST(items-1));
7390 0 OBJECTIFY_RESULT(svp, ST(items-1));
0 7390 OBJECTIFY_RESULT(svp, ST(items-1));
7390 0 OBJECTIFY_RESULT(svp, ST(items-1));
7390 0 OBJECTIFY_RESULT(svp, ST(items-1));
0 0 OBJECTIFY_RESULT(svp, ST(items-1));
0 0 OBJECTIFY_RESULT(svp, ST(items-1));
0 0 OBJECTIFY_RESULT(svp, ST(items-1));
0 0 OBJECTIFY_RESULT(svp, ST(items-1));
0 0 OBJECTIFY_RESULT(svp, ST(items-1));
0 0 OBJECTIFY_RESULT(svp, ST(items-1));
0 0 OBJECTIFY_RESULT(svp, ST(items-1));
1758 228 3 if (astatus != 0 && bstatus != 0) {
226 2 if (astatus != 0 && bstatus != 0) {
1759 171 55 if (ix == 0) {
1761 159 12 abpositive = astatus == 1 && bstatus == 1;
151 8 abpositive = astatus == 1 && bstatus == 1;
1764 20 0 && (SvIOK(sva) && !SvIsUV(sva))
19 1 && (SvIOK(sva) && !SvIsUV(sva))
1765 20 151 && (SvIOK(svb) && !SvIsUV(svb));
19 0 && (SvIOK(svb) && !SvIsUV(svb));
18 1 && (SvIOK(svb) && !SvIsUV(svb));
1766 20 151 if (abpositive || abnegative) {
18 2 if (abpositive || abnegative) {
1767 3 166 UV a = my_svuv(sva);
1768 2 167 UV b = my_svuv(svb);
1769 151 18 int k = (abpositive) ? kronecker_uu(a,b) : kronecker_ss(a,b);
1770 169 0 RETURN_NPARITY(k);
169 0 RETURN_NPARITY(k);
1772 5 50 } else if (ix == 1) {
1773 1 4 UV n = (astatus == -1) ? (UV)(-(my_sviv(sva))) : my_svuv(sva);
1 0 UV n = (astatus == -1) ? (UV)(-(my_sviv(sva))) : my_svuv(sva);
0 4 UV n = (astatus == -1) ? (UV)(-(my_sviv(sva))) : my_svuv(sva);
1774 0 5 UV k = (bstatus == -1) ? (UV)(-(my_sviv(svb))) : my_svuv(svb);
0 0 UV k = (bstatus == -1) ? (UV)(-(my_sviv(svb))) : my_svuv(svb);
0 5 UV k = (bstatus == -1) ? (UV)(-(my_sviv(svb))) : my_svuv(svb);
1776 5 0 RETURN_NPARITY( valuation(n, k) );
5 0 RETURN_NPARITY( valuation(n, k) );
1777 12 38 } else if (ix == 2) {
1779 10 2 n = (bstatus != -1) ? my_svuv(svb) : (UV)(-(my_sviv(svb)));
2 8 n = (bstatus != -1) ? my_svuv(svb) : (UV)(-(my_sviv(svb)));
2 0 n = (bstatus != -1) ? my_svuv(svb) : (UV)(-(my_sviv(svb)));
1780 10 2 if (n > 0) {
1781 8 2 a = (astatus == 1) ? my_svuv(sva) : negmod(my_sviv(sva), n);
0 8 a = (astatus == 1) ? my_svuv(sva) : negmod(my_sviv(sva), n);
2 0 a = (astatus == 1) ? my_svuv(sva) : negmod(my_sviv(sva), n);
1782 9 1 if (a > 0) {
1783 1 8 if (n == 1) XSRETURN_UV(0);
1787 4 7 if (ret == 0) XSRETURN_UNDEF;
1789 12 26 } else if (ix == 3) {
1791 12 0 n = (bstatus != -1) ? my_svuv(svb) : (UV)(-(my_sviv(svb)));
0 12 n = (bstatus != -1) ? my_svuv(svb) : (UV)(-(my_sviv(svb)));
0 0 n = (bstatus != -1) ? my_svuv(svb) : (UV)(-(my_sviv(svb)));
1792 10 2 a = (n == 0) ? 0 : (astatus != -1) ? my_svuv(sva) % n : negmod(my_sviv(sva), n);
10 0 a = (n == 0) ? 0 : (astatus != -1) ? my_svuv(sva) % n : negmod(my_sviv(sva), n);
0 10 a = (n == 0) ? 0 : (astatus != -1) ? my_svuv(sva) % n : negmod(my_sviv(sva), n);
0 0 a = (n == 0) ? 0 : (astatus != -1) ? my_svuv(sva) % n : negmod(my_sviv(sva), n);
1793 5 7 if (is_prob_prime(n)) {
1794 0 5 if (!sqrtmod(&s, a, n)) XSRETURN_UNDEF;
1796 2 5 if (!sqrtmod_composite(&s, a, n)) XSRETURN_UNDEF;
1801 25 1 n = (bstatus != -1) ? my_svuv(svb) : (UV)(-(my_sviv(svb)));
2 23 n = (bstatus != -1) ? my_svuv(svb) : (UV)(-(my_sviv(svb)));
1 0 n = (bstatus != -1) ? my_svuv(svb) : (UV)(-(my_sviv(svb)));
1802 25 1 a = (n == 0) ? 0 : (astatus != -1) ? my_svuv(sva) % n : negmod(my_sviv(sva), n);
25 0 a = (n == 0) ? 0 : (astatus != -1) ? my_svuv(sva) % n : negmod(my_sviv(sva), n);
0 25 a = (n == 0) ? 0 : (astatus != -1) ? my_svuv(sva) % n : negmod(my_sviv(sva), n);
0 0 a = (n == 0) ? 0 : (astatus != -1) ? my_svuv(sva) % n : negmod(my_sviv(sva), n);
1803 26 0 RETURN_NPARITY( is_primitive_root(a,n,0) );
26 0 RETURN_NPARITY( is_primitive_root(a,n,0) );
1824 10 4 if ( (astatus == 1 && SvIsUV(sva)) || (astatus == -1 && !SvIOK(sva)) )
9 1 if ( (astatus == 1 && SvIsUV(sva)) || (astatus == -1 && !SvIOK(sva)) )
3 10 if ( (astatus == 1 && SvIsUV(sva)) || (astatus == -1 && !SvIOK(sva)) )
0 3 if ( (astatus == 1 && SvIsUV(sva)) || (astatus == -1 && !SvIOK(sva)) )
1826 10 4 if ( (bstatus == 1 && SvIsUV(svb)) || (bstatus == -1 && !SvIOK(svb)) )
10 0 if ( (bstatus == 1 && SvIsUV(svb)) || (bstatus == -1 && !SvIOK(svb)) )
3 11 if ( (bstatus == 1 && SvIsUV(svb)) || (bstatus == -1 && !SvIOK(svb)) )
0 3 if ( (bstatus == 1 && SvIsUV(svb)) || (bstatus == -1 && !SvIOK(svb)) )
1828 12 2 if (astatus != 0 && bstatus != 0) {
12 0 if (astatus != 0 && bstatus != 0) {
1830 12 0 IV a = my_sviv(sva);
1831 12 0 IV b = my_sviv(svb);
1833 0 12 XPUSHs(sv_2mortal(newSViv( u )));
1834 0 12 XPUSHs(sv_2mortal(newSViv( v )));
1835 0 12 XPUSHs(sv_2mortal(newSViv( d )));
1837 2 0 _vcallsubn(aTHX_ GIMME_V, VCALL_PP, "gcdext", items, 0);
1844 1288 255 if (type != 1 && type != 2 && type != 3)
253 1035 if (type != 1 && type != 2 && type != 3)
1 252 if (type != 1 && type != 2 && type != 3)
1846 63 1479 if (n == m)
1848 1476 3 else if (n == 0 || m == 0 || m > n)
1416 60 else if (n == 0 || m == 0 || m > n)
61 1355 else if (n == 0 || m == 0 || m > n)
1850 190 1165 else if (type == 3) {
1852 185 5 if (s != 0) XSRETURN_UV(s);
1853 973 192 } else if (type == 2) {
1855 509 464 if (s != 0) XSRETURN_IV(s);
1856 192 0 } else if (type == 1) {
1858 145 47 if (s != 0) XSRETURN_IV(s);
1861 0 516 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
0 0 OBJECTIFY_RESULT(ST(0), ST(0));
1874 44 20 nv = SvNV(x);
1895 32 28130 histatus = (items == 1 || _validate_int(aTHX_ ST(1), 0));
31 1 histatus = (items == 1 || _validate_int(aTHX_ ST(1), 0));
1896 28130 32 if (items == 1 && lostatus != 0) {
28122 8 if (items == 1 && lostatus != 0) {
1898 73 28049 if (ix == 0) {
1899 73 0 UV n = (lostatus == -1) ? 0 : my_svuv(svlo);
0 73 UV n = (lostatus == -1) ? 0 : my_svuv(svlo);
1902 0 28049 UV n = (lostatus == -1) ? (UV)(-(my_sviv(svlo))) : my_svuv(svlo);
0 0 UV n = (lostatus == -1) ? (UV)(-(my_sviv(svlo))) : my_svuv(svlo);
0 28049 UV n = (lostatus == -1) ? (UV)(-(my_sviv(svlo))) : my_svuv(svlo);
1903 28049 0 RETURN_NPARITY(moebius(n));
28049 0 RETURN_NPARITY(moebius(n));
1905 32 8 } else if (items == 2 && lostatus == 1 && histatus == 1) {
32 0 } else if (items == 2 && lostatus == 1 && histatus == 1) {
31 1 } else if (items == 2 && lostatus == 1 && histatus == 1) {
1907 0 31 UV lo = my_svuv(svlo);
1908 0 31 UV hi = my_svuv(ST(1));
1909 30 1 if (lo <= hi) {
1911 30 0 EXTEND(SP, (IV)(hi-lo+1));
0 30 EXTEND(SP, (IV)(hi-lo+1));
1912 8 22 if (ix == 0) {
1913 1 7 UV arraylo = (lo < 100) ? 0 : lo;
1915 286 8 for (i = lo; i <= hi; i++)
1921 27866 22 for (i = lo; i <= hi; i++)
1922 27866 0 PUSH_NPARITY(mu[i-lo]);
27866 0 PUSH_NPARITY(mu[i-lo]);
1928 9 0 U32 gimme_v = GIMME_V;
1929 2 7 switch (ix) {
1956 2042 6 if (status != 0) {
1957 2 2040 UV r, n = my_svuv(svn);
1962 2 58 int nfactors = factor(my_svuv(svn), factors);
1963 30 30 RETURN_NPARITY( (nfactors & 1) ? -1 : 1 ); }
60 0 RETURN_NPARITY( (nfactors & 1) ? -1 : 1 ); }
60 0 RETURN_NPARITY( (nfactors & 1) ? -1 : 1 ); }
1968 888 547 if (r != 0) XSRETURN_UV(r);
1971 20 1 case 7: XSRETURN_UV( (status == -1) ? 1 : exp_mangoldt(n) ); break;
1972 2 23 case 8: if (status == -1) n = -(IV)n;
1974 5 20 if (r == 0 && n != 1) XSRETURN_UNDEF; /* No root */
4 1 if (r == 0 && n != 1) XSRETURN_UNDEF; /* No root */
1976 1 6 case 9: if (status == -1) n = -(IV)n;
1978 96 1 case 10: XSRETURN_IV( (status == -1) ? 0 : hclassno(n) ); break;
1979 1 0 case 11: RETURN_NPARITY( (status == -1) ? 0 : pillai_v(n) ); break;
1 0 case 11: RETURN_NPARITY( (status == -1) ? 0 : pillai_v(n) ); break;
0 1 case 11: RETURN_NPARITY( (status == -1) ? 0 : pillai_v(n) ); break;
1981 10 0 default: { IV tau = (status == 1) ? ramanujan_tau(n) : 0;
1982 5 5 if (tau != 0 || status == -1 || n == 0)
5 0 if (tau != 0 || status == -1 || n == 0)
1 4 if (tau != 0 || status == -1 || n == 0)
1998 1 0 case 9: { char* ptr; STRLEN len; ptr = SvPV(svn, len);
2013 1 5 if (n == 0)
2015 5 0 if (n < 32 && _validate_int(aTHX_ svk, 1) == 1) {
5 0 if (n < 32 && _validate_int(aTHX_ svk, 1) == 1) {
2016 0 5 k = my_svuv(svk);
2017 5 0 if (num_to_perm(k, n, S)) {
2019 5 0 EXTEND(SP, (IV)n);
0 5 EXTEND(SP, (IV)n);
2020 45 5 for (i = 0; i < (int)n; i++)
2021 45 0 PUSH_NPARITY( S[i] );
45 0 PUSH_NPARITY( S[i] );
2025 0 0 _vcallsubn(aTHX_ GIMME_V, VCALL_PP, "numtoperm", items, 0);
2035 6 0 if ((!SvROK(svp)) || (SvTYPE(SvRV(svp)) != SVt_PVAV))
0 6 if ((!SvROK(svp)) || (SvTYPE(SvRV(svp)) != SVt_PVAV))
2039 6 0 if (plen < 32) {
2041 68 6 for (i = 0; i <= plen; i++) {
2043 68 0 if (iv == 0 || _validate_int(aTHX_ *iv, 1) != 1) break;
68 0 if (iv == 0 || _validate_int(aTHX_ *iv, 1) != 1) break;
2044 0 68 val = my_svuv(*iv);
2045 68 0 if (val > (UV)plen || A[val] != 0) break;
68 0 if (val > (UV)plen || A[val] != 0) break;
2049 6 0 if (i > plen && perm_to_num(plen+1, V, &num))
4 2 if (i > plen && perm_to_num(plen+1, V, &num))
2061 3 1 if (items == 1) k = n;
2062 0 4 if (k > n) k = n;
2063 1 3 if (k == 0) XSRETURN_EMPTY;
2064 0 3 New(0, S, k, UV);
2066 3 0 EXTEND(SP, (IV)k);
0 3 EXTEND(SP, (IV)k);
2067 105 3 for (i = 0; i < k; i++) {
2068 105 0 if (n < 2*CINTS) PUSH_NPARITY(S[i]);
105 0 if (n < 2*CINTS) PUSH_NPARITY(S[i]);
105 0 if (n < 2*CINTS) PUSH_NPARITY(S[i]);
2080 1 2 if (items == 0)
2082 99 2 for (i = 0, randcxt = MY_CXT.randcxt; i < items-1; i++) {
2095 0 1007 base = (ibase == 255) ? 10 : ibase;
2096 1007 0 if (base < 2 || base > 36) croak("sumdigits: invalid base %"UVuf, base);
0 1007 if (base < 2 || base > 36) croak("sumdigits: invalid base %"UVuf, base);
2099 1007 0 if (base == 10 && SVNUMTEST(svn) && (SvIsUV(svn) || SvIVX(svn) >= 0)) {
1001 6 if (base == 10 && SVNUMTEST(svn) && (SvIsUV(svn) || SvIVX(svn) >= 0)) {
1001 0 if (base == 10 && SVNUMTEST(svn) && (SvIsUV(svn) || SvIVX(svn) >= 0)) {
1001 0 if (base == 10 && SVNUMTEST(svn) && (SvIsUV(svn) || SvIVX(svn) >= 0)) {
2100 0 1001 UV n, t = my_svuv(svn);
2101 2893 1001 while ((n=t)) {
2107 3 3 s = SvPV(svn, len);
2109 6 0 if (ibase == 255 && len > 2 && s[0] == '0' && (s[1] == 'x' || s[1] == 'b')){
6 0 if (ibase == 255 && len > 2 && s[0] == '0' && (s[1] == 'x' || s[1] == 'b')){
1 5 if (ibase == 255 && len > 2 && s[0] == '0' && (s[1] == 'x' || s[1] == 'b')){
0 1 if (ibase == 255 && len > 2 && s[0] == '0' && (s[1] == 'x' || s[1] == 'b')){
0 0 if (ibase == 255 && len > 2 && s[0] == '0' && (s[1] == 'x' || s[1] == 'b')){
2110 1 0 base = (s[1] == 'x') ? 16 : 2;
2114 38634 6 for (i = 0; i < len; i++) {
2117 38631 3 if (c >= '0' && c <= '9') { d = c - '0'; }
38629 2 if (c >= '0' && c <= '9') { d = c - '0'; }
2118 1 4 else if (c >= 'a' && c <= 'z') { d = c - 'a' + 10; }
1 0 else if (c >= 'a' && c <= 'z') { d = c - 'a' + 10; }
2119 1 3 else if (c >= 'A' && c <= 'Z') { d = c - 'A' + 10; }
1 0 else if (c >= 'A' && c <= 'Z') { d = c - 'A' + 10; }
2120 38634 0 if (d < base)
2134 0 38 if (base < 2) croak("invalid base: %d", base);
2136 22 16 if (ix == 0 || ix == 1) {
3 19 if (ix == 0 || ix == 1) {
2138 17 2 n = (status == 0) ? 0 : status * my_svuv(svn);
0 17 n = (status == 0) ? 0 : status * my_svuv(svn);
2141 16 22 if (ix == 0 && status != 0 && length < 128) {
14 2 if (ix == 0 && status != 0 && length < 128) {
14 0 if (ix == 0 && status != 0 && length < 128) {
2144 14 0 if (len >= 0) {
2146 14 0 EXTEND(SP, len);
0 14 EXTEND(SP, len);
2147 89 14 for (i = 0; i < len; i++)
2148 89 0 PUSH_NPARITY( digits[len-i-1] );
89 0 PUSH_NPARITY( digits[len-i-1] );
2153 3 21 if (ix == 1 && status != 0 && length < 128) {
3 0 if (ix == 1 && status != 0 && length < 128) {
3 0 if (ix == 1 && status != 0 && length < 128) {
2156 3 0 if (len >= 0) {
2157 0 3 XPUSHs(sv_2mortal(newSVpv(s, len)));
2162 19 2 if ((ix == 0 || ix == 1) && base == 10 && length < 0) {
0 19 if ((ix == 0 || ix == 1) && base == 10 && length < 0) {
1 1 if ((ix == 0 || ix == 1) && base == 10 && length < 0) {
1 0 if ((ix == 0 || ix == 1) && base == 10 && length < 0) {
2164 1 0 str = SvPV(svn, len);
2165 0 1 if (ix == 1) {
2166 0 0 XPUSHs(sv_2mortal(newSVpv(str, len)));
2169 0 1 if (len == 1 && str[0] == '0') XSRETURN(0);
0 0 if (len == 1 && str[0] == '0') XSRETURN(0);
2172 1 0 EXTEND(SP, (IV)len);
0 1 EXTEND(SP, (IV)len);
2173 45 1 for (i = 0; i < (int)len; i++)
2174 45 0 PUSH_NPARITY(str[i]-'0');
45 0 PUSH_NPARITY(str[i]-'0');
2178 19 1 if (ix == 2) { /* fromdigits */
2179 6 13 if (!SvROK(svn)) { /* string */
2180 6 0 if (from_digit_string(&n, SvPV_nolen(svn), base)) {
5 1 if (from_digit_string(&n, SvPV_nolen(svn), base)) {
2183 13 0 } else if (!_is_sv_bigint(aTHX_ svn)) { /* array ref of digits */
2186 13 0 if (from_digit_to_UV(&n, r, len, base)) {
2189 0 0 } else if (from_digit_to_str(&str, r, len, base)){
2191 0 0 XPUSHs( sv_to_bigint(aTHX_ sv_2mortal(newSVpv(str,0))) );
2199 1 0 case 0: _vcallsubn(aTHX_ GIMME_V, VCALL_GMP|VCALL_PP, "todigits", items, 0); break;
2219 1909 57 if (_validate_int(aTHX_ svn, 0)) {
2220 78 1831 if (SvROK(svn)) { /* Convert small Math::BigInt object into scalar */
2221 0 78 UV n = my_svuv(svn);
2228 3 1906 if (items > 1 && ((sv1 = ST(1)), SvOK(sv1))) {
0 3 if (items > 1 && ((sv1 = ST(1)), SvOK(sv1))) {
0 0 if (items > 1 && ((sv1 = ST(1)), SvOK(sv1))) {
0 0 if (items > 1 && ((sv1 = ST(1)), SvOK(sv1))) {
3 0 if (items > 1 && ((sv1 = ST(1)), SvOK(sv1))) {
2229 0 3 UV n = my_svuv(svn);
2230 0 3 UV min = my_svuv(sv1);
2231 0 3 if (n < min)
2233 0 3 if (items > 2 && ((sv2 = ST(2)), SvOK(sv2))) {
0 0 if (items > 2 && ((sv2 = ST(2)), SvOK(sv2))) {
0 0 if (items > 2 && ((sv2 = ST(2)), SvOK(sv2))) {
0 0 if (items > 2 && ((sv2 = ST(2)), SvOK(sv2))) {
0 0 if (items > 2 && ((sv2 = ST(2)), SvOK(sv2))) {
2234 0 0 UV max = my_svuv(sv2);
2235 0 0 if (n > max)
2237 0 0 MPUassert( items <= 3, "_validate_num takes at most 3 parameters");
2251 0 89 if (MY_CXT.forcount == 0) croak("lastfor called outside a loop");
2291 0 73 if (cv == Nullcv)
2294 68 0 if (!_validate_int(aTHX_ svbeg, 0) || (items >= 3 && !_validate_int(aTHX_ svend,0))) {
31 37 if (!_validate_int(aTHX_ svbeg, 0) || (items >= 3 && !_validate_int(aTHX_ svend,0))) {
0 28 if (!_validate_int(aTHX_ svbeg, 0) || (items >= 3 && !_validate_int(aTHX_ svend,0))) {
2299 37 28 if (items < 3) {
2301 0 37 end = my_svuv(svbeg);
2303 0 28 beg = my_svuv(svbeg);
2304 0 28 end = my_svuv(svend);
2312 123 64 while (beg < 6) {
2313 85 38 beg = (beg <= 2) ? 2 : (beg <= 3) ? 3 : 5;
41 44 beg = (beg <= 2) ? 2 : (beg <= 3) ? 3 : 5;
2314 116 7 if (beg <= end) {
2316 0 116 PUSHMARK(SP);
2318 1 115 CHECK_FORCOUNT;
2320 84 38 beg += 1 + (beg > 2);
2323 65 0 if (!CvISXSUB(cv) && beg <= end) {
58 7 if (!CvISXSUB(cv) && beg <= end) {
2326 0 58 PUSH_MULTICALL(cv);
0 58 PUSH_MULTICALL(cv);
2327 0 58 if (
2329 0 0 (beg >= UVCONST( 100000000000000) && end-beg < 100000) ||
0 58 (beg >= UVCONST( 100000000000000) && end-beg < 100000) ||
2330 0 0 (beg >= UVCONST( 10000000000000) && end-beg < 40000) ||
0 58 (beg >= UVCONST( 10000000000000) && end-beg < 40000) ||
2331 0 0 (beg >= UVCONST( 1000000000000) && end-beg < 17000) ||
31 27 (beg >= UVCONST( 1000000000000) && end-beg < 17000) ||
2334 141 30 for (beg = next_prime(beg-1); beg <= end && beg != 0; beg = next_prime(beg)) {
141 0 for (beg = next_prime(beg-1); beg <= end && beg != 0; beg = next_prime(beg)) {
2335 1 140 CHECK_FORCOUNT;
2341 27 2 while (next_segment_primes(ctx, &seg_base, &seg_low, &seg_high)) {
2342 0 27 int crossuv = (seg_high > IV_MAX) && !SvIsUV(svarg);
0 0 int crossuv = (seg_high > IV_MAX) && !SvIsUV(svarg);
2343 1266 0 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
2 1264 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
1261 3 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
1266 17 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
133 27 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
2344 114 1147 CHECK_FORCOUNT;
2346 165 982 if (SvTYPE(svarg) != SVt_IV) { sv_setuv(svarg, p); }
2347 0 982 else if (crossuv && p > IV_MAX) { sv_setuv(svarg, p); crossuv=0; }
0 0 else if (crossuv && p > IV_MAX) { sv_setuv(svarg, p); crossuv=0; }
2351 25 2 CHECK_FORCOUNT;
2356 58 0 POP_MULTICALL;
0 58 POP_MULTICALL;
2360 0 7 if (beg <= end) { /* NO-MULTICALL segment sieve */
2362 0 0 while (next_segment_primes(ctx, &seg_base, &seg_low, &seg_high)) {
2363 0 0 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
0 0 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
0 0 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
0 0 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
0 0 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
2364 0 0 CHECK_FORCOUNT;
2366 0 0 PUSHMARK(SP);
2369 0 0 CHECK_FORCOUNT;
2374 0 65 END_FORCOUNT;
2393 0 58 if (cv == Nullcv)
2396 58 0 if (!_validate_int(aTHX_ svbeg, 0) || (items >= 3 && !_validate_int(aTHX_ svend,0))) {
2 56 if (!_validate_int(aTHX_ svbeg, 0) || (items >= 3 && !_validate_int(aTHX_ svend,0))) {
0 2 if (!_validate_int(aTHX_ svbeg, 0) || (items >= 3 && !_validate_int(aTHX_ svend,0))) {
2397 0 0 _vcallsubn(aTHX_ G_VOID|G_DISCARD, VCALL_ROOT, (ix == 0) ? "_generic_forcomposites" : "_generic_foroddcomposites", items, 0);
2401 56 2 if (items < 3) {
2402 26 30 beg = ix ? 8 : 4;
2403 0 56 end = my_svuv(svbeg);
2405 0 2 beg = my_svuv(svbeg);
2406 0 2 end = my_svuv(svend);
2414 58 0 if (!CvISXSUB(cv) && end >= beg) {
56 2 if (!CvISXSUB(cv) && end >= beg) {
2420 0 56 PUSH_MULTICALL(cv);
0 56 PUSH_MULTICALL(cv);
2421 56 0 if (beg >= MPU_MAX_PRIME ||
0 56 if (beg >= MPU_MAX_PRIME ||
2423 0 0 (beg >= UVCONST( 100000000000000) && end-beg < 120000) ||
0 56 (beg >= UVCONST( 100000000000000) && end-beg < 120000) ||
2424 0 0 (beg >= UVCONST( 10000000000000) && end-beg < 50000) ||
0 56 (beg >= UVCONST( 10000000000000) && end-beg < 50000) ||
2425 0 0 (beg >= UVCONST( 1000000000000) && end-beg < 20000) ||
55 1 (beg >= UVCONST( 1000000000000) && end-beg < 20000) ||
2428 27 28 beg = (beg <= 4) ? 3 : beg-1;
2430 3953 5 while (beg++ < end) {
2431 907 3046 if (beg == nextprime) nextprime = next_prime(beg);
2432 2083 963 else if (!ix || beg & 1) { sv_setuv(svarg, beg); MULTICALL; }
753 1330 else if (!ix || beg & 1) { sv_setuv(svarg, beg); MULTICALL; }
2433 50 3903 CHECK_FORCOUNT;
2436 1 0 if (ix) {
2437 0 1 if (beg < 8) beg = 8;
2438 0 0 } else if (beg <= 4) { /* sieve starts at 7, so handle this here */
2445 1 0 nextprime = (end >= MPU_MAX_PRIME) ? MPU_MAX_PRIME : next_prime(end);
2447 1 1 while (next_segment_primes(ctx, &seg_base, &seg_low, &seg_high)) {
2448 0 1 int crossuv = (seg_high > IV_MAX) && !SvIsUV(svarg);
0 0 int crossuv = (seg_high > IV_MAX) && !SvIsUV(svarg);
2449 6468 0 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
1 6467 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
6466 1 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
6468 269 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
270 1 START_DO_FOR_EACH_SIEVE_PRIME( segment, seg_base, seg_low, seg_high )
2450 0 6466 CHECK_FORCOUNT;
2452 0 6466 if (cbeg < beg)
2453 0 0 cbeg = beg - (ix == 1 && (beg % 2));
0 0 cbeg = beg - (ix == 1 && (beg % 2));
2455 1 6465 cend = prevprime-1; if (cend > end) cend = end;
2457 25872 6466 for (c = cbeg + ix; c <= cend; c=c+1+ix) {
2458 0 25872 if (SvTYPE(svarg) != SVt_IV) { sv_setuv(svarg,c); }
2459 0 25872 else if (crossuv && c > IV_MAX) { sv_setuv(svarg,c); crossuv=0;}
0 0 else if (crossuv && c > IV_MAX) { sv_setuv(svarg,c); crossuv=0;}
2466 0 1 if (end > nextprime) /* Complete the case where end > max_prime */
2467 0 0 while (nextprime++ < end)
2468 0 0 if (!ix || nextprime & 1) {
0 0 if (!ix || nextprime & 1) {
2469 0 0 CHECK_FORCOUNT;
2475 56 0 POP_MULTICALL;
0 56 POP_MULTICALL;
2479 0 2 if (beg <= end) {
2480 0 0 beg = (beg <= 4) ? 3 : beg-1;
2481 0 0 while (beg++ < end) {
2482 0 0 if ((!ix || beg&1) && !is_prob_prime(beg)) {
0 0 if ((!ix || beg&1) && !is_prob_prime(beg)) {
0 0 if ((!ix || beg&1) && !is_prob_prime(beg)) {
2484 0 0 PUSHMARK(SP);
2486 0 0 CHECK_FORCOUNT;
2491 0 58 END_FORCOUNT;
2509 0 71 if (cv == Nullcv)
2512 0 71 if (!_validate_int(aTHX_ svn, 0)) {
2517 0 71 n = my_svuv(svn);
2525 71 0 if (!CvISXSUB(cv)) {
2528 0 71 PUSH_MULTICALL(cv);
0 71 PUSH_MULTICALL(cv);
2529 272 64 for (i = 0; i < ndivisors; i++) {
2532 7 265 CHECK_FORCOUNT;
2535 71 0 POP_MULTICALL;
0 71 POP_MULTICALL;
2540 0 0 for (i = 0; i < ndivisors; i++) {
2542 0 0 PUSHMARK(SP);
2544 0 0 CHECK_FORCOUNT;
2549 0 71 END_FORCOUNT;
2569 0 34 if (cv == Nullcv)
2571 0 34 if (!_validate_int(aTHX_ svn, 0)) {
2575 0 34 n = my_svuv(svn);
2576 0 34 if (n > (UV_MAX-2)) croak("forpart argument overflow");
2578 0 34 New(0, svals, n+1, SV*);
2579 673 34 for (i = 0; i <= n; i++) {
2585 16 18 if (svh != 0) {
2588 16 0 if (!SvROK(svh) || SvTYPE(SvRV(svh)) != SVt_PVHV)
0 16 if (!SvROK(svh) || SvTYPE(SvRV(svh)) != SVt_PVHV)
2591 8 8 if ((svp = hv_fetchs(rhash, "n", 0)) != NULL)
2592 0 8 { nmin = my_svuv(*svp); nmax = nmin; }
2593 9 7 if ((svp = hv_fetchs(rhash, "amin", 0)) != NULL) amin = my_svuv(*svp);
0 9 if ((svp = hv_fetchs(rhash, "amin", 0)) != NULL) amin = my_svuv(*svp);
2594 5 11 if ((svp = hv_fetchs(rhash, "amax", 0)) != NULL) amax = my_svuv(*svp);
0 5 if ((svp = hv_fetchs(rhash, "amax", 0)) != NULL) amax = my_svuv(*svp);
2595 2 14 if ((svp = hv_fetchs(rhash, "nmin", 0)) != NULL) nmin = my_svuv(*svp);
0 2 if ((svp = hv_fetchs(rhash, "nmin", 0)) != NULL) nmin = my_svuv(*svp);
2596 2 14 if ((svp = hv_fetchs(rhash, "nmax", 0)) != NULL) nmax = my_svuv(*svp);
0 2 if ((svp = hv_fetchs(rhash, "nmax", 0)) != NULL) nmax = my_svuv(*svp);
2597 3 13 if ((svp = hv_fetchs(rhash, "prime",0)) != NULL) primeq=my_svuv(*svp);
0 3 if ((svp = hv_fetchs(rhash, "prime",0)) != NULL) primeq=my_svuv(*svp);
2599 0 16 if (amin < 1) amin = 1;
2600 0 16 if (amax > n) amax = n;
2601 0 16 if (nmin < 1) nmin = 1;
2602 0 16 if (nmax > n) nmax = n;
2603 15 1 if (primeq != 0 && primeq != -1) primeq = 2; /* -1, 0, or 2 */
2 13 if (primeq != 0 && primeq != -1) primeq = 2; /* -1, 0, or 2 */
2606 2 32 if (primeq == 2) {
2608 1 1 UV next = amin <= 2 ? 2 : next_prime(amin-1);
2609 0 2 if (amin < next) amin = next;
2610 0 2 if (amax > prev) amax = prev;
2613 2 32 if (n==0 && nmin <= 1) {
2 0 if (n==0 && nmin <= 1) {
2614 0 2 { dSP; ENTER; PUSHMARK(SP);
2619 32 2 if (n >= nmin && nmin <= nmax && amin <= amax && nmax > 0 && amax > 0)
32 0 if (n >= nmin && nmin <= nmax && amin <= amax && nmax > 0 && amax > 0)
31 1 if (n >= nmin && nmin <= nmax && amin <= amax && nmax > 0 && amax > 0)
31 0 if (n >= nmin && nmin <= nmax && amin <= amax && nmax > 0 && amax > 0)
31 0 if (n >= nmin && nmin <= nmax && amin <= amax && nmax > 0 && amax > 0)
2622 0 31 New(0, a, n+1, UV);
2627 15843 17 while (k != 0) {
2631 15786 57 r = (ix == 0) ? x : 1;
2632 20374 15843 while (r <= y) {
2640 4548 15843 while (k+1 > nmax) { /* Skip range if over max size */
2645 3617 12226 if (k+1 < nmin) { /* Skip if not over min size */
2646 9 3608 if (a[0] >= n-nmin+1 && a[k] > 1) break; /* early exit check */
9 0 if (a[0] >= n-nmin+1 && a[k] > 1) break; /* early exit check */
2651 9389 2837 if (amin > 1 || amax < n) {
615 8774 if (amin > 1 || amax < n) {
2653 3 3449 if (a[0] > amax) break;
2655 3428 21 if (ix == 0) { /* value restrictions for partitions */
2656 578 2850 if (a[k] > amax) continue;
2659 51 7 for (i = 0; i <= k; i++)
2660 44 7 if (a[i] < amin || a[i] > amax)
37 7 if (a[i] < amin || a[i] > amax)
2662 14 7 if (i <= k) continue;
2665 2602 9029 if (primeq != -1) {
2666 2510 1189 for (i = 0; i <= k; i++) if (is_prime(a[i]) != primeq) break;
3699 92 for (i = 0; i <= k; i++) if (is_prime(a[i]) != primeq) break;
2667 2510 92 if (i <= k) continue;
2670 0 9121 { dSP; ENTER; PUSHMARK(SP);
2671 9121 0 EXTEND(SP, (IV)k); for (i = 0; i <= k; i++) { PUSHs(svals[a[i]]); }
0 9121 EXTEND(SP, (IV)k); for (i = 0; i <= k; i++) { PUSHs(svals[a[i]]); }
75999 9121 EXTEND(SP, (IV)k); for (i = 0; i <= k; i++) { PUSHs(svals[a[i]]); }
2674 2 9119 CHECK_FORCOUNT;
2677 0 31 END_FORCOUNT;
2679 673 34 for (i = 0; i <= n; i++)
2702 0 24 if (cv == Nullcv)
2704 13 11 if (ix > 0 && svk != 0)
0 13 if (ix > 0 && svk != 0)
2707 24 0 if (!_validate_int(aTHX_ svn, 0) || (svk != 0 && !_validate_int(aTHX_ svk, 0))) {
8 16 if (!_validate_int(aTHX_ svn, 0) || (svk != 0 && !_validate_int(aTHX_ svk, 0))) {
0 8 if (!_validate_int(aTHX_ svn, 0) || (svk != 0 && !_validate_int(aTHX_ svk, 0))) {
2708 0 0 _vcallsub_with_pp( (ix == 0) ? "forcomb"
0 0 _vcallsub_with_pp( (ix == 0) ? "forcomb"
2714 0 24 n = my_svuv(svn);
2715 16 8 if (svk == 0) {
2716 13 3 begk = (ix == 0) ? 0 : n;
2719 0 8 begk = endk = my_svuv(svk);
2720 1 7 if (begk > n)
2724 0 23 New(0, svals, n, SV*);
2725 92 23 for (i = 0; i < n; i++) {
2729 0 23 New(0, cm, endk+1, UV);
2732 27 20 for (k = begk; k <= endk; k++) {
2734 80 27 for (i = 0; i < k; i++)
2736 6 21 if (ix == 2 && k >= 2) { /* Make derangements start deranged */
4 2 if (ix == 2 && k >= 2) { /* Make derangements start deranged */
2737 19 4 for (i = 0; i < k; i++)
2738 11 8 cm[k-i-1] = (i&1) ? i : i+2;
2739 3 1 if (k & 1) {
2745 1865 20622 if (ix < 2 || k != 1) {
1864 1 if (ix < 2 || k != 1) {
2746 0 22486 dSP; ENTER; PUSHMARK(SP);
2747 22486 0 EXTEND(SP, ((IV)k));
0 22486 EXTEND(SP, ((IV)k));
2748 281154 22486 for (i = 0; i < k; i++) { PUSHs(svals[ cm[k-i-1]-1 ]); }
2750 3 22483 CHECK_FORCOUNT;
2752 15534 6950 if (ix == 0) {
2753 3887 11647 if (cm[0]++ < n) continue; /* Increment last value */
2754 38777 13 for (i = 1; i < k && cm[i] >= n-i; i++) ; /* Find next index to incr */
27143 11634 for (i = 1; i < k && cm[i] >= n-i; i++) ; /* Find next index to incr */
2755 13 11634 if (i >= k) break; /* Done! */
2757 38753 11634 while (i-- > 0) cm[i] = cm[i+1] + 1; /* Set the rest */
2758 5086 1864 } else if (ix == 1) {
2759 8730 6 for (j = 1; j < k && cm[j] > cm[j-1]; j++) ; /* Find last decrease */
3650 5080 for (j = 1; j < k && cm[j] > cm[j-1]; j++) ; /* Find last decrease */
2760 6 5080 if (j >= k) break; /* Done! */
2761 1818 5080 for (m = 0; cm[j] > cm[m]; m++) ; /* Find next greater */
2763 2753 5080 for (i = j-1, m = 0; m < i; i--, m++) /* Reverse the end */
2767 5000 5 for (j = 1; j < k && cm[j] > cm[j-1]; j++) ; /* Find last decrease */
2268 2732 for (j = 1; j < k && cm[j] > cm[j-1]; j++) ; /* Find last decrease */
2768 5 2732 if (j >= k) break; /* Done! */
2769 1134 2732 for (m = 0; cm[j] > cm[m]; m++) ; /* Find next greater */
2771 536 2196 if (cm[j] == k-j) goto REDERANGE; /* Skip? */
2772 1371 2196 for (i = j-1, m = 0; m < i; i--, m++) /* Reverse the end */
2774 15261 1859 for (i = 0; i < k; i++) /* Check deranged */
2775 337 14924 if (cm[k-i-1]-1 == i)
2777 337 1859 if (i != k) goto REDERANGE;
2780 3 24 CHECK_FORCOUNT;
2784 92 23 for (i = 0; i < n; i++)
2787 0 23 END_FORCOUNT;
2801 0 4 if (cv == Nullcv) croak("Not a subroutine reference");
2802 1 3 if (items <= 1) XSRETURN_UNDEF;
2809 3 0 SvSetMagicSV(ret, args[1]);
0 3 SvSetMagicSV(ret, args[1]);
2811 3 0 if (!CvISXSUB(cv)) {
2814 0 3 PUSH_MULTICALL(cv);
0 3 PUSH_MULTICALL(cv);
2815 4 3 for (i = 2; i < items; i++) {
2818 4 0 SvSetMagicSV(ret, *PL_stack_sp);
0 4 SvSetMagicSV(ret, *PL_stack_sp);
2821 3 0 POP_MULTICALL;
0 3 POP_MULTICALL;
2826 0 0 for (i = 2; i < items; i++) {
2829 0 0 PUSHMARK(SP);
2831 0 0 SvSetMagicSV(ret, *PL_stack_sp);
0 0 SvSetMagicSV(ret, *PL_stack_sp);
2857 0 27 if (cv == Nullcv) croak("Not a subroutine reference");
2861 27 0 if (!CvISXSUB(cv)) {
2865 0 27 PUSH_MULTICALL(cv);
0 27 PUSH_MULTICALL(cv);
2866 5040 17 for (index = 1; index < items; index++) {
2869 5040 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 5040 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 5040 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
5032 8 if (SvTRUEx(*PL_stack_sp) ^ invert)
5032 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
5032 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
5016 16 if (SvTRUEx(*PL_stack_sp) ^ invert)
5016 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
5016 16 if (SvTRUEx(*PL_stack_sp) ^ invert)
8 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
8 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
8 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 8 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 8 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
10 5030 if (SvTRUEx(*PL_stack_sp) ^ invert)
2873 27 0 POP_MULTICALL;
0 27 POP_MULTICALL;
2878 0 0 for (index = 1; index < items; index++) {
2881 0 0 PUSHMARK(SP);
2883 0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
0 0 if (SvTRUEx(*PL_stack_sp) ^ invert)
2888 5 22 if (ix == 4) {
2889 2 3 if (index == items)
2894 5 17 if (ix == 6) {
2895 2 3 if (index == items)
2900 4 13 if (index != items) /* We exited the loop early */
2903 11 6 if (ret_true) XSRETURN_YES;