x86-64: write IO APIC irq routing entries in correct order