int type; int degree; int separation;
weak_alias (__srandom_r, srandom_r)/* Initialize the state information in the given array of N bytes for   future random number generation.  Based on the number of bytes we   are given, and the break values for the different R.N.G.'s, we choose   the best (largest) one we can and set things up for it.  srandom is   then called to initialize the state information.  Note that on return   from srandom, we set state[-1] to be the type multiplexed with the current   value of the rear pointer; this is so successive calls to initstate won't   lose this information and will be able to restart with setstate.   Note: The first thing we do is save the current state, if any, just like   setstate so that it doesn't matter when initstate is called.   Returns a pointer to the old state.  */int__initstate_r (seed, arg_state, n, buf)     unsigned int seed;     char *arg_state;     size_t n;     struct random_data *buf;{  int type;  int degree;  int separation;  int32_t *state;  if (buf == NULL)    goto fail;  if (n >= BREAK_3)    type = n < BREAK_4 ? TYPE_3 : TYPE_4;  else if (n < BREAK_1)    {      if (n < BREAK_0)	{	  __set_errno (EINVAL);	  goto fail;	}      type = TYPE_0;    }  else    type = n < BREAK_2 ? TYPE_1 : TYPE_2;  degree = random_poly_info.degrees[type];  separation = random_poly_info.seps[type];  buf->rand_type = type;  buf->rand_sep = separation;  buf->rand_deg = degree;  state = &((int32_t *) arg_state)[1];	/* First location.  */  /* Must set END_PTR before srandom.  */  buf->end_ptr = &state[degree];  buf->state = state;  __srandom_r (seed, buf);  state[-1] = TYPE_0;  if (type != TYPE_0)    state[-1] = (buf->rptr - state) * MAX_TYPES + type;  return 0; fail:  __set_errno (EINVAL);  return -1;}