static int xan_huffman_decode(unsigned char *dest, const unsigned char *src,

    int dest_len)

{

    unsigned char byte = *src++;

    unsigned char ival = byte + 0x16;

    const unsigned char * ptr = src + byte*2;

    unsigned char val = ival;

    unsigned char *dest_end = dest + dest_len;

    GetBitContext gb;



    init_get_bits(&gb, ptr, 0); // FIXME: no src size available



    while ( val != 0x16 ) {

        val = src[val - 0x17 + get_bits1(&gb) * byte];



        if ( val < 0x16 ) {

            if (dest + 1 > dest_end)

                return 0;

            *dest++ = val;

            val = ival;

        }

    }



    return 0;

}

static int xan_huffman_decode(unsigned char *dest, const unsigned char *src,

    int dest_len)

{

    unsigned char byte = *src++;

    unsigned char ival = byte + 0x16;

    const unsigned char * ptr = src + byte*2;

    unsigned char val = ival;

    unsigned char *dest_end = dest + dest_len;

    GetBitContext gb;



    init_get_bits(&gb, ptr, 0); 



    while ( val != 0x16 ) {

        val = src[val - 0x17 + get_bits1(&gb) * byte];



        if ( val < 0x16 ) {

            if (dest + 1 > dest_end)

                return 0;

            *dest++ = val;

            val = ival;

        }

    }



    return 0;

}

            if (dest + 1 > dest_end)
static int FUNC_0(unsigned char *VAR_0, const unsigned char *VAR_1,

    int VAR_2)

{

    unsigned char VAR_3 = *VAR_1++;

    unsigned char VAR_4 = VAR_3 + 0x16;

    const unsigned char * VAR_5 = VAR_1 + VAR_3*2;

    unsigned char VAR_6 = VAR_4;

    unsigned char *VAR_7 = VAR_0 + VAR_2;

    GetBitContext gb;



    init_get_bits(&gb, VAR_5, 0); 



    while ( VAR_6 != 0x16 ) {

        VAR_6 = VAR_1[VAR_6 - 0x17 + get_bits1(&gb) * VAR_3];



        if ( VAR_6 < 0x16 ) {

            if (VAR_0 + 1 > VAR_7)

                return 0;

            *VAR_0++ = VAR_6;

            VAR_6 = VAR_4;

        }

    }



    return 0;

}

static int FUNC_0(unsigned char *VAR_0, const unsigned char *VAR_1,
int VAR_2)
{ unsigned char VAR_3 = *VAR_1++; unsigned char VAR_4 = VAR_3 + 0x16; const unsigned char * VAR_5 = VAR_1 + VAR_3*2; unsigned char VAR_6 = VAR_4; unsigned char *VAR_7 = VAR_0 + VAR_2; GetBitContext gb; init_get_bits(&gb, VAR_5, 0); while ( VAR_6 != 0x16 ) { VAR_6 = VAR_1[VAR_6 - 0x17 + get_bits1(&gb) * VAR_3]; if ( VAR_6 < 0x16 ) { if (VAR_0 + 1 > VAR_7)
return 0; *VAR_0++ = VAR_6; VAR_6 = VAR_4; } } return 0; }