"""Guarded Hard-only defender containment and slot protection."""
ORIGIN=0x2DC000

def install(data,assemble,patch):
    code=assemble('ai_gap',ORIGIN)
    assert len(code)<=0x280,'defensive gap overlaps keeper-pass module at2DC280'
    patch(ORIGIN,b'\xff'*len(code),code)
    patch(0xCF8A,bytes.fromhex('207c0000e59461003436'),b'\x4e\xb9'+ORIGIN.to_bytes(4,'big')+bytes.fromhex('4e714e71'))
