int avio_check(const char *url, int flags)

{

    URLContext *h;

    int ret = ffurl_alloc(&h, url, flags, NULL);

    if (ret)

        return ret;



    if (h->prot->url_check) {

        ret = h->prot->url_check(h, flags);

    } else {

        ret = ffurl_connect(h, NULL);

        if (ret >= 0)

            ret = flags;

    }



    ffurl_close(h);

    return ret;

}

int avio_check(const char *url, int flags)

{

    URLContext *h;

    int ret = ffurl_alloc(&h, url, flags, NULL);

    if (ret)

        return ret;



    if (h->prot->url_check) {

        ret = h->prot->url_check(h, flags);

    } else {

        ret = ffurl_connect(h, NULL);

        if (ret >= 0)

            ret = flags;

    }



    ffurl_close(h);

    return ret;

}

int FUNC_0(const char *VAR_0, int VAR_1)

{

    URLContext *h;

    int VAR_2 = ffurl_alloc(&h, VAR_0, VAR_1, NULL);

    if (VAR_2)

        return VAR_2;



    if (h->prot->url_check) {

        VAR_2 = h->prot->url_check(h, VAR_1);

    } else {

        VAR_2 = ffurl_connect(h, NULL);

        if (VAR_2 >= 0)

            VAR_2 = VAR_1;

    }



    ffurl_close(h);

    return VAR_2;

}

int FUNC_0(const char *VAR_0, int VAR_1)
{ URLContext *h; int VAR_2 = ffurl_alloc(&h, VAR_0, VAR_1, NULL); if (VAR_2)
return VAR_2; if (h->prot->url_check) { VAR_2 = h->prot->url_check(h, VAR_1); } else { VAR_2 = ffurl_connect(h, NULL); if (VAR_2 >= 0)
VAR_2 = VAR_1; } ffurl_close(h); return VAR_2; }