move irq.c from patch into own file