get_field (const unsigned char *data, enum floatformat_byteorders order,

           unsigned int total_len, unsigned int start, unsigned int len)

{

  unsigned long result;

  unsigned int cur_byte;

  int cur_bitshift;



  /* Start at the least significant part of the field.  */

  cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT;

  if (order == floatformat_little)

    cur_byte = (total_len / FLOATFORMAT_CHAR_BIT) - cur_byte - 1;

  cur_bitshift =

    ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT;

  result = *(data + cur_byte) >> (-cur_bitshift);

  cur_bitshift += FLOATFORMAT_CHAR_BIT;

  if (order == floatformat_little)

    ++cur_byte;

  else

    --cur_byte;



  /* Move towards the most significant part of the field.  */

  while ((unsigned int) cur_bitshift < len)

    {

      if (len - cur_bitshift < FLOATFORMAT_CHAR_BIT)

	/* This is the last byte; zero out the bits which are not part of

	   this field.  */

	result |=

	  (*(data + cur_byte) & ((1 << (len - cur_bitshift)) - 1))

	    << cur_bitshift;

      else

	result |= *(data + cur_byte) << cur_bitshift;

      cur_bitshift += FLOATFORMAT_CHAR_BIT;

      if (order == floatformat_little)

	++cur_byte;

      else

	--cur_byte;

    }

  return result;

}

get_field (const unsigned char *data, enum floatformat_byteorders order,

           unsigned int total_len, unsigned int start, unsigned int len)

{

  unsigned long result;

  unsigned int cur_byte;

  int cur_bitshift;



  

  cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT;

  if (order == floatformat_little)

    cur_byte = (total_len / FLOATFORMAT_CHAR_BIT) - cur_byte - 1;

  cur_bitshift =

    ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT;

  result = *(data + cur_byte) >> (-cur_bitshift);

  cur_bitshift += FLOATFORMAT_CHAR_BIT;

  if (order == floatformat_little)

    ++cur_byte;

  else

    --cur_byte;



  

  while ((unsigned int) cur_bitshift < len)

    {

      if (len - cur_bitshift < FLOATFORMAT_CHAR_BIT)

	



	result |=

	  (*(data + cur_byte) & ((1 << (len - cur_bitshift)) - 1))

	    << cur_bitshift;

      else

	result |= *(data + cur_byte) << cur_bitshift;

      cur_bitshift += FLOATFORMAT_CHAR_BIT;

      if (order == floatformat_little)

	++cur_byte;

      else

	--cur_byte;

    }

  return result;

}

FUNC_0 (const unsigned char *VAR_0, enum floatformat_byteorders VAR_1,

           unsigned int VAR_2, unsigned int VAR_3, unsigned int VAR_4)

{

  unsigned long VAR_5;

  unsigned int VAR_6;

  int VAR_7;



  

  VAR_6 = (VAR_3 + VAR_4) / FLOATFORMAT_CHAR_BIT;

  if (VAR_1 == floatformat_little)

    VAR_6 = (VAR_2 / FLOATFORMAT_CHAR_BIT) - VAR_6 - 1;

  VAR_7 =

    ((VAR_3 + VAR_4) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT;

  VAR_5 = *(VAR_0 + VAR_6) >> (-VAR_7);

  VAR_7 += FLOATFORMAT_CHAR_BIT;

  if (VAR_1 == floatformat_little)

    ++VAR_6;

  else

    --VAR_6;



  

  while ((unsigned int) VAR_7 < VAR_4)

    {

      if (VAR_4 - VAR_7 < FLOATFORMAT_CHAR_BIT)

	



	VAR_5 |=

	  (*(VAR_0 + VAR_6) & ((1 << (VAR_4 - VAR_7)) - 1))

	    << VAR_7;

      else

	VAR_5 |= *(VAR_0 + VAR_6) << VAR_7;

      VAR_7 += FLOATFORMAT_CHAR_BIT;

      if (VAR_1 == floatformat_little)

	++VAR_6;

      else

	--VAR_6;

    }

  return VAR_5;

}

FUNC_0 (const unsigned char *VAR_0, enum floatformat_byteorders VAR_1,
unsigned int VAR_2, unsigned int VAR_3, unsigned int VAR_4)
{ unsigned long VAR_5; unsigned int VAR_6; int VAR_7; VAR_6 = (VAR_3 + VAR_4) / FLOATFORMAT_CHAR_BIT; if (VAR_1 == floatformat_little)
VAR_6 = (VAR_2 / FLOATFORMAT_CHAR_BIT) - VAR_6 - 1; VAR_7 =
((VAR_3 + VAR_4) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT; VAR_5 = *(VAR_0 + VAR_6) >> (-VAR_7); VAR_7 += FLOATFORMAT_CHAR_BIT; if (VAR_1 == floatformat_little)
++VAR_6; else
--VAR_6; while ((unsigned int) VAR_7 < VAR_4)
{ if (VAR_4 - VAR_7 < FLOATFORMAT_CHAR_BIT)
VAR_5 |=
(*(VAR_0 + VAR_6) & ((1 << (VAR_4 - VAR_7)) - 1))
<< VAR_7; else
VAR_5 |= *(VAR_0 + VAR_6) << VAR_7; VAR_7 += FLOATFORMAT_CHAR_BIT; if (VAR_1 == floatformat_little)
++VAR_6; else
--VAR_6; } return VAR_5; }