unsigned long av_adler32_update(unsigned long adler, const uint8_t * buf,

                                unsigned int len)

{

    unsigned long s1 = adler & 0xffff;

    unsigned long s2 = adler >> 16;



    while (len > 0) {

#if CONFIG_SMALL

        while (len > 4  && s2 < (1U << 31)) {

            DO4(buf);

            len -= 4;

        }

#else

        while (len > 16 && s2 < (1U << 31)) {

            DO16(buf);

            len -= 16;

        }

#endif

        DO1(buf); len--;

        s1 %= BASE;

        s2 %= BASE;

    }

    return (s2 << 16) | s1;

}

unsigned long av_adler32_update(unsigned long adler, const uint8_t * buf,

                                unsigned int len)

{

    unsigned long s1 = adler & 0xffff;

    unsigned long s2 = adler >> 16;



    while (len > 0) {

#if CONFIG_SMALL

        while (len > 4  && s2 < (1U << 31)) {

            DO4(buf);

            len -= 4;

        }

#else

        while (len > 16 && s2 < (1U << 31)) {

            DO16(buf);

            len -= 16;

        }

#endif

        DO1(buf); len--;

        s1 %= BASE;

        s2 %= BASE;

    }

    return (s2 << 16) | s1;

}

unsigned long FUNC_0(unsigned long VAR_0, const uint8_t * VAR_1,

                                unsigned int VAR_2)

{

    unsigned long VAR_3 = VAR_0 & 0xffff;

    unsigned long VAR_4 = VAR_0 >> 16;



    while (VAR_2 > 0) {

#if CONFIG_SMALL

        while (VAR_2 > 4  && VAR_4 < (1U << 31)) {

            DO4(VAR_1);

            VAR_2 -= 4;

        }

#else

        while (VAR_2 > 16 && VAR_4 < (1U << 31)) {

            DO16(VAR_1);

            VAR_2 -= 16;

        }

#endif

        DO1(VAR_1); VAR_2--;

        VAR_3 %= BASE;

        VAR_4 %= BASE;

    }

    return (VAR_4 << 16) | VAR_3;

}

unsigned long FUNC_0(unsigned long VAR_0, const uint8_t * VAR_1,
unsigned int VAR_2)
{ unsigned long VAR_3 = VAR_0 & 0xffff; unsigned long VAR_4 = VAR_0 >> 16; while (VAR_2 > 0) { #if CONFIG_SMALL
while (VAR_2 > 4  && VAR_4 < (1U << 31)) { DO4(VAR_1); VAR_2 -= 4; } #else
while (VAR_2 > 16 && VAR_4 < (1U << 31)) { DO16(VAR_1); VAR_2 -= 16; } #endif
DO1(VAR_1); VAR_2--; VAR_3 %= BASE; VAR_4 %= BASE; } return (VAR_4 << 16) | VAR_3; }