static void dtls1_record_bitmap_update(SSL *s, DTLS1_BITMAP *bitmap)
	{
	unsigned int shift;
	PQ_64BIT rcd_num;
	PQ_64BIT tmp;
	PQ_64BIT_CTX *ctx;

	pq_64bit_init(&rcd_num);
	pq_64bit_init(&tmp);

	pq_64bit_bin2num(&rcd_num, s->s3->read_sequence, 8);

	/* unfortunate code complexity due to 64-bit manipulation support
	 * on 32-bit machines */
	if ( pq_64bit_gt(&rcd_num, &(bitmap->max_seq_num)) ||
		pq_64bit_eq(&rcd_num, &(bitmap->max_seq_num)))
		{
		pq_64bit_sub(&tmp, &rcd_num, &(bitmap->max_seq_num));
		pq_64bit_add_word(&tmp, 1);

		shift = (unsigned int)pq_64bit_get_word(&tmp);

		pq_64bit_lshift(&(tmp), &(bitmap->map), shift);
		pq_64bit_assign(&(bitmap->map), &tmp);

		pq_64bit_set_bit(&(bitmap->map), 0);
		pq_64bit_add_word(&rcd_num, 1);
		pq_64bit_assign(&(bitmap->max_seq_num), &rcd_num);

		pq_64bit_assign_word(&tmp, 1);
		pq_64bit_lshift(&tmp, &tmp, bitmap->length);
		ctx = pq_64bit_ctx_new(&ctx);
		pq_64bit_mod(&(bitmap->map), &(bitmap->map), &tmp, ctx);
		pq_64bit_ctx_free(ctx);
		}
	else
		{
		pq_64bit_sub(&tmp, &(bitmap->max_seq_num), &rcd_num);
		pq_64bit_sub_word(&tmp, 1);
		shift = (unsigned int)pq_64bit_get_word(&tmp);

		pq_64bit_set_bit(&(bitmap->map), shift);
		}

	pq_64bit_free(&rcd_num);
	pq_64bit_free(&tmp);
	}
static void dtls1_record_bitmap_update(SSL *s, DTLS1_BITMAP *bitmap)
	{
	unsigned int shift;
	PQ_64BIT rcd_num;
	PQ_64BIT tmp;
	PQ_64BIT_CTX *ctx;

	pq_64bit_init(&rcd_num);
	pq_64bit_init(&tmp);

	pq_64bit_bin2num(&rcd_num, s->s3->read_sequence, 8);

	 
	if ( pq_64bit_gt(&rcd_num, &(bitmap->max_seq_num)) ||
		pq_64bit_eq(&rcd_num, &(bitmap->max_seq_num)))
		{
		pq_64bit_sub(&tmp, &rcd_num, &(bitmap->max_seq_num));
		pq_64bit_add_word(&tmp, 1);

		shift = (unsigned int)pq_64bit_get_word(&tmp);

		pq_64bit_lshift(&(tmp), &(bitmap->map), shift);
		pq_64bit_assign(&(bitmap->map), &tmp);

		pq_64bit_set_bit(&(bitmap->map), 0);
		pq_64bit_add_word(&rcd_num, 1);
		pq_64bit_assign(&(bitmap->max_seq_num), &rcd_num);

		pq_64bit_assign_word(&tmp, 1);
		pq_64bit_lshift(&tmp, &tmp, bitmap->length);
		ctx = pq_64bit_ctx_new(&ctx);
		pq_64bit_mod(&(bitmap->map), &(bitmap->map), &tmp, ctx);
		pq_64bit_ctx_free(ctx);
		}
	else
		{
		pq_64bit_sub(&tmp, &(bitmap->max_seq_num), &rcd_num);
		pq_64bit_sub_word(&tmp, 1);
		shift = (unsigned int)pq_64bit_get_word(&tmp);

		pq_64bit_set_bit(&(bitmap->map), shift);
		}

	pq_64bit_free(&rcd_num);
	pq_64bit_free(&tmp);
	}