"""Guarded native coach goalie correction."""
ORIGIN=0x2DC800
def install(data,assemble,patch):
    code=assemble('coach_goalie',ORIGIN)
    assert 0<len(code)<0x400,'helper exceeds reserved ROM block'
    patch(ORIGIN,b'\xff'*len(code),code)
    patch(0x15AA4,bytes.fromhex('08ab00060063'),b'\x4e\xf9'+ORIGIN.to_bytes(4,'big'))
