static void add_to_pool(BufferPoolEntry *buf)

{

    AVBufferPool *pool;

    BufferPoolEntry *cur, *end = buf;



    if (!buf)

        return;

    pool = buf->pool;



    while (end->next)

        end = end->next;



    while ((cur = avpriv_atomic_ptr_cas((void * volatile *)&pool->pool, NULL, buf))) {

        /* pool is not empty, retrieve it and append it to our list */

        cur = get_pool(pool);

        end->next = cur;

        while (end->next)

            end = end->next;

    }

}

static void add_to_pool(BufferPoolEntry *buf)

{

    AVBufferPool *pool;

    BufferPoolEntry *cur, *end = buf;



    if (!buf)

        return;

    pool = buf->pool;



    while (end->next)

        end = end->next;



    while ((cur = avpriv_atomic_ptr_cas((void * volatile *)&pool->pool, NULL, buf))) {

        

        cur = get_pool(pool);

        end->next = cur;

        while (end->next)

            end = end->next;

    }

}

static void add_to_pool(BufferPoolEntry *buf)     AVBufferPool *pool;     BufferPoolEntry *cur, *end = buf;     if (!buf)     pool = buf->pool;     while (end->next)         end = end->next;     while ((cur = avpriv_atomic_ptr_cas((void * volatile *)&pool->pool, NULL, buf))) {         cur = get_pool(pool);         end->next = cur;         while (end->next)             end = end->next;     if (!buf)
static void FUNC_0(BufferPoolEntry *VAR_0)

{

    AVBufferPool *pool;

    BufferPoolEntry *cur, *end = VAR_0;



    if (!VAR_0)

        return;

    pool = VAR_0->pool;



    while (end->next)

        end = end->next;



    while ((cur = avpriv_atomic_ptr_cas((void * volatile *)&pool->pool, NULL, VAR_0))) {

        

        cur = get_pool(pool);

        end->next = cur;

        while (end->next)

            end = end->next;

    }

}

static void FUNC_0(BufferPoolEntry *VAR_0)
{ AVBufferPool *pool; BufferPoolEntry *cur, *end = VAR_0; if (!VAR_0)
return; pool = VAR_0->pool; while (end->next)
end = end->next; while ((cur = avpriv_atomic_ptr_cas((void * volatile *)&pool->pool, NULL, VAR_0))) { cur = get_pool(pool); end->next = cur; while (end->next)
end = end->next; } }