goto CLEANUP;
continue;
mp_err  mpp_pprime(mp_int *a, int nt){  mp_err   res;  mp_int   x, amo, m, z;  int      iter, jx, b;  ARGCHK(a != NULL, MP_BADARG);  /* Initialize temporaries... */  if((res = mp_init_copy(&amo, a)) != MP_OKAY)    return res;  if((res = mp_init_size(&x, USED(a))) != MP_OKAY)    goto X;  if((res = mp_init(&z)) != MP_OKAY)    goto Z;  /* Compute m = a - 1 for what follows...    */  mp_sub_d(&amo, 1, &amo);  if((res = mp_init_copy(&m, &amo)) != MP_OKAY)    goto M;  /* How many times does 2 divide (a - 1)?    */  b = 0;  while((DIGIT(&m, 0) & 1) == 0) {    mp_div_2(&m, &m);    ++b;  }  /* Do the test nt times... */  for(iter = 0; iter < nt; iter++) {    /* Choose a random value for x < a          */    s_mp_pad(&x, USED(a));    mpp_random(&x);    if((res = mp_mod(&x, a, &x)) != MP_OKAY)      goto CLEANUP;    /* Compute z = (x ** m) mod a               */    if((res = mp_exptmod(&x, &m, a, &z)) != MP_OKAY)      goto CLEANUP;        jx = 0;        if(mp_cmp_d(&z, 1) == 0 || mp_cmp(&z, &amo) == 0) {      res = MP_YES;      goto CLEANUP;    }        for(;;) {      if(jx > 0 && mp_cmp_d(&z, 1) == 0) {	res = MP_NO;	break;      }            ++jx;            if(jx < b && mp_cmp(&z, &amo) != 0) {	/* z = z^2 (mod a) */	if((res = mp_sqrmod(&z, a, &z)) != MP_OKAY)	  goto CLEANUP;	      } else if(mp_cmp(&z, &amo) == 0) {	res = MP_YES;	break;	      } else if(jx == b && mp_cmp(&z, &amo) != 0) {	res = MP_NO;	break;	      }    } /* end testing loop */    /* If the test passes, we will continue iterating, but a failed       test means the candidate is definitely NOT prime, so we will       immediately break out of this loop     */    if(res == MP_NO)      break;  } /* end iterations loop */  CLEANUP:  mp_clear(&m);M:  mp_clear(&z);Z:  mp_clear(&x);X:  mp_clear(&amo);  return res;} /* end mpp_pprime() */