// Path: src/main/java/eu/rekawek/coffeegb/AddressSpace.java
// public interface AddressSpace {
// 
//     boolean accepts(int address);
// 
//     void setByte(int address, int value);
// 
//     int getByte(int address);
// 
// }


import eu.rekawek.coffeegb.AddressSpace;
        if (pendingEnableInterrupts != -1) {
            if (pendingEnableInterrupts-- == 0) {
                enableInterrupts(false);
            }
        }
        if (pendingDisableInterrupts != -1) {
            if (pendingDisableInterrupts-- == 0) {
                disableInterrupts(false);
            }
        }
    }

    public boolean isIme() {
        return ime;
    }

    public boolean isInterruptRequested() {
        return (interruptFlag & interruptEnabled) != 0;
    }

    public boolean isHaltBug() {
        return (interruptFlag & interruptEnabled & 0x1f) != 0 && !ime;
    }

    @Override
    public boolean accepts(int address) {
        return address == 0xff0f || address == 0xffff;
    }

    @Override
// Path: src/main/java/eu/rekawek/coffeegb/AddressSpace.java
// public interface AddressSpace {
// 
//     boolean accepts(int address);
// 
//     void setByte(int address, int value);
// 
//     int getByte(int address);
// 
// }


// Path: src/main/java/eu/rekawek/coffeegb/cpu/InterruptManager.java
import eu.rekawek.coffeegb.AddressSpace;

        if (pendingEnableInterrupts != -1) {
            if (pendingEnableInterrupts-- == 0) {
                enableInterrupts(false);
            }
        }
        if (pendingDisableInterrupts != -1) {
            if (pendingDisableInterrupts-- == 0) {
                disableInterrupts(false);
            }
        }
    }

    public boolean isIme() {
        return ime;
    }

    public boolean isInterruptRequested() {
        return (interruptFlag & interruptEnabled) != 0;
    }

    public boolean isHaltBug() {
        return (interruptFlag & interruptEnabled & 0x1f) != 0 && !ime;
    }

    @Override
    public boolean accepts(int address) {
        return address == 0xff0f || address == 0xffff;
    }

    @Override
    public void setByte(int address, int value) {