Your "error" lies here : *item = buffer[bufferCount - 1];
When you remove an item, you popped the furthest in the array , which is also the last inserted (thus LIFO behaviour). You need to pop the first one (and memcpy/index-keeping to shift the start of the buffer).
What you do :
begin <-end
-------------------
| | | | | | | | |x|
-------------------
|
-> *item
What you want to do :
begin-> end
-------------------
|x| | | | | | | | |
-------------------
|
-> *item
PS : there are performance penalty to memcpy the buffer to realign the beginning of the data array, which is why circular buffers are often used.