def dequeue(addrs, start, end):
    """
    dequeue address and return vaddr in interval ( Config.WORDSIZE ) from a list of vaddr
    dequeue addrs from 0 to start.
      dequeue all value between start and end in retval2
    return remaining after end, retval2
    """
    ret = []
    while len(addrs) > 0 and addrs[0] < start:
        addrs.pop(0)
    WORDSIZE = 4
    while len(addrs) > 0 and addrs[0] >= start and addrs[0] <= end - WORDSIZE:
        ret.append(addrs.pop(0))
    return addrs, ret
