// Tests optimizing derefs of *(ptr+b) to ptr[b - even when a noop-cast is needed

byte msg1[] = { 'a', 'b', 'c', 'd' };
byte msg2[] = { '1', '2', '3', '4' };

void main() {
    print(msg1);
    print(msg2);
}

word* const SCREEN = $0400;
byte screen_idx=0;

void print(byte* m) {
    SCREEN[screen_idx++] = *(word*)(m+2);
}