    if (key->asyncDev.marker != WOLFSSL_ASYNC_MARKER_ECC)
    #endif
    {
#ifndef WOLFSSL_SP_NO_256
        if (key->idx != ECC_CUSTOM_IDX &&
                                       ecc_sets[key->idx].id == ECC_SECP256R1) {
            return sp_ecc_verify_256(hash, hashlen, key->pubkey.x,
                                         key->pubkey.y, key->pubkey.z,r, s, res,
                                         key->heap);
        }
#endif /* WOLFSSL_SP_NO_256 */
#ifdef WOLFSSL_SP_384
        if (key->idx != ECC_CUSTOM_IDX &&
                                       ecc_sets[key->idx].id == ECC_SECP384R1) {
            return sp_ecc_verify_384(hash, hashlen, key->pubkey.x,
                                         key->pubkey.y, key->pubkey.z,r, s, res,
                                         key->heap);
        }
#endif /* WOLFSSL_SP_384 */
    }
    if (key->asyncDev.marker != WOLFSSL_ASYNC_MARKER_ECC)
    #endif
    {
#ifndef WOLFSSL_SP_NO_256
        if (key->idx != ECC_CUSTOM_IDX &&
                                       ecc_sets[key->idx].id == ECC_SECP256R1) {
            return sp_ecc_verify_256(hash, hashlen, key->pubkey.x,
                                         key->pubkey.y, key->pubkey.z,r, s, res,
                                         key->heap);
        }
#endif  
#ifdef WOLFSSL_SP_384
        if (key->idx != ECC_CUSTOM_IDX &&
                                       ecc_sets[key->idx].id == ECC_SECP384R1) {
            return sp_ecc_verify_384(hash, hashlen, key->pubkey.x,
                                         key->pubkey.y, key->pubkey.z,r, s, res,
                                         key->heap);
        }
#endif  
    }