sdcc.exe -mz80 --nostdlib --nostdinc --fverbose-asm -I../include -c buggy_dequeue.c
SDCC : z80/r2k/r4k/pic16/pic14/hc08 3.0.4 #6784 (Aug 30 2011) (CYGWIN)
see ASSERTS in the source code
I suspect it is a bug in an optimization pass. A wrong value gets store in a file scope variable, and
the array update is lost.