	.file	"extr_local_apic.c_apic_idt_to_irq.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	apic_idt_to_irq, @function
apic_idt_to_irq:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	xor	edi, edi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rax, QWORD PTR APIC_IO_INTS[rip]
	cmp	rax, rsi
	jg	.L2
	cmp	QWORD PTR IDT_SYSCALL[rip], rsi
	je	.L2
	add	rax, QWORD PTR APIC_NUM_IOINTS[rip]
	xor	edi, edi
	cmp	rax, rsi
	setge	dil
.L2:
	mov	rsi, rbx
	call	KASSERT@PLT
	mov	rax, QWORD PTR lapics[rip]
	mov	edx, 0
	sub	rbx, QWORD PTR APIC_IO_INTS[rip]
	mov	rax, QWORD PTR [rax+rbp*8]
	movsx	rax, DWORD PTR [rax+rbx*4]
	test	eax, eax
	cmovs	rax, rdx
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	apic_idt_to_irq, .-apic_idt_to_irq
	.comm	lapics,8,8
	.comm	IDT_SYSCALL,8,8
	.comm	IDT_DTRACE_RET,8,8
	.comm	APIC_NUM_IOINTS,8,8
	.comm	APIC_IO_INTS,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_local_apic.c_apic_idt_to_irq.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	apic_idt_to_irq, %function
apic_idt_to_irq:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r5, .L7
	mov	r4, r1
	ldr	r3, [r5]
	mov	r6, r0
	cmp	r3, r1
	bgt	.L4
	ldr	r2, .L7+4
	ldr	r2, [r2]
	cmp	r2, r1
	beq	.L4
	ldr	r2, .L7+8
	ldr	r0, [r2]
	add	r3, r3, r0
	cmp	r3, r1
	movlt	r0, #0
	movge	r0, #1
	b	.L2
.L4:
	mov	r0, #0
.L2:
	mov	r1, r4
	bl	KASSERT
	ldr	r3, .L7+12
	ldr	r1, [r5]
	ldr	r3, [r3]
	sub	r4, r4, r1
	ldr	r3, [r3, r6, lsl #2]
	ldr	r0, [r3, r4, lsl #2]
	bic	r0, r0, r0, asr #31
	pop	{r4, r5, r6, pc}
.L8:
	.align	2
.L7:
	.word	APIC_IO_INTS
	.word	IDT_SYSCALL
	.word	APIC_NUM_IOINTS
	.word	lapics
	.size	apic_idt_to_irq, .-apic_idt_to_irq
	.comm	lapics,4,4
	.comm	IDT_SYSCALL,4,4
	.comm	IDT_DTRACE_RET,4,4
	.comm	APIC_NUM_IOINTS,4,4
	.comm	APIC_IO_INTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
