	.file	"extr_vioapic.c_vioapic_send_intr.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"vioapic_set_pinstate: vioapic is not locked"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"ioapic pin%d: masked"
	.text
	.p2align 4
	.type	vioapic_send_intr, @function
vioapic_send_intr:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	xor	edi, edi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movsx	rbx, esi
	mov	r12, rbx
	test	ebx, ebx
	js	.L2
	xor	edi, edi
	cmp	DWORD PTR REDIR_ENTRIES[rip], ebx
	setg	dil
.L2:
	mov	rsi, rbx
	call	KASSERT@PLT
	mov	rdi, rbp
	call	VIOAPIC_LOCKED@PLT
	lea	rsi, .LC0[rip]
	mov	edi, eax
	call	KASSERT@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	ecx, 32
	lea	rax, [rax+rbx*4]
	mov	r9d, DWORD PTR [rax]
	mov	edx, r9d
	sar	edx, cl
	mov	ecx, DWORD PTR IOART_INTMASK[rip]
	and	ecx, r9d
	cmp	ecx, DWORD PTR IOART_INTMSET[rip]
	je	.L12
	mov	ecx, DWORD PTR IOART_DESTMOD[rip]
	mov	r8d, DWORD PTR IOART_DELMOD[rip]
	xor	r10d, r10d
	and	ecx, r9d
	cmp	ecx, DWORD PTR IOART_DESTPHY[rip]
	mov	ecx, r9d
	sete	r10b
	xor	esi, esi
	and	r8d, r9d
	and	ecx, DWORD PTR IOART_TRGRLVL[rip]
	setne	sil
	je	.L4
	mov	ecx, DWORD PTR IOART_REM_IRR[rip]
	or	ecx, r9d
	mov	DWORD PTR [rax], ecx
.L4:
	mov	ecx, DWORD PTR APIC_ID_SHIFT[rip]
	mov	edi, DWORD PTR 0[rbp]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	and	r9d, DWORD PTR IOART_INTVEC[rip]
	sar	edx, cl
	pop	rbp
	.cfi_def_cfa_offset 16
	mov	ecx, r10d
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	vlapic_deliver_intr@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	pop	rbx
	.cfi_def_cfa_offset 24
	mov	edx, r12d
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	VIOAPIC_CTR1@PLT
	.cfi_endproc
.LFE0:
	.size	vioapic_send_intr, .-vioapic_send_intr
	.comm	REDIR_ENTRIES,4,4
	.comm	IOART_TRGRLVL,4,4
	.comm	IOART_REM_IRR,4,4
	.comm	IOART_INTVEC,4,4
	.comm	IOART_INTMSET,4,4
	.comm	IOART_INTMASK,4,4
	.comm	IOART_DESTPHY,4,4
	.comm	IOART_DESTMOD,4,4
	.comm	IOART_DELMOD,4,4
	.comm	APIC_ID_SHIFT,4,4
	.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_vioapic.c_vioapic_send_intr.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"vioapic_set_pinstate: vioapic is not locked\000"
	.align	2
.LC1:
	.ascii	"ioapic pin%d: masked\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vioapic_send_intr, %function
vioapic_send_intr:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	subs	r4, r1, #0
	mov	r5, r0
	sub	sp, sp, #8
	movlt	r0, #0
	blt	.L2
	ldr	r3, .L12
	ldr	r0, [r3]
	cmp	r0, r4
	movle	r0, #0
	movgt	r0, #1
.L2:
	mov	r1, r4
	bl	KASSERT
	mov	r0, r5
	bl	VIOAPIC_LOCKED
	ldr	r1, .L12+4
	bl	KASSERT
	mov	r2, #32
	ldr	lr, [r5, #4]
	ldr	r3, .L12+8
	ldr	r1, .L12+12
	ldr	ip, [lr, r4, lsl #2]
	ldr	r3, [r3]
	ldr	r1, [r1]
	and	r3, r3, ip
	cmp	r3, r1
	asr	r2, ip, r2
	beq	.L11
	ldr	r3, .L12+16
	ldr	r6, .L12+20
	ldr	r3, [r3]
	ldr	r6, [r6]
	and	r3, r3, ip
	sub	r3, r3, r6
	clz	r3, r3
	ldr	r1, .L12+24
	ldr	r0, .L12+28
	ldr	r1, [r1]
	ldr	r0, [r0]
	and	r1, r1, ip
	cmp	r1, #0
	ldrne	r6, .L12+32
	and	r0, r0, ip
	ldrne	r6, [r6]
	movne	r1, #1
	orrne	r6, r6, ip
	strne	r6, [lr, r4, lsl #2]
	ldr	r4, .L12+36
	ldr	lr, .L12+40
	ldr	r4, [r4]
	ldr	lr, [lr]
	and	ip, ip, r4
	str	r0, [sp]
	ldr	r0, [r5]
	moveq	r1, #0
	lsr	r3, r3, #5
	str	ip, [sp, #4]
	asr	r2, r2, lr
	bl	vlapic_deliver_intr
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L11:
	mov	r2, r4
	mov	r0, r5
	ldr	r1, .L12+44
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, lr}
	b	VIOAPIC_CTR1
.L13:
	.align	2
.L12:
	.word	REDIR_ENTRIES
	.word	.LC0
	.word	IOART_INTMASK
	.word	IOART_INTMSET
	.word	IOART_DESTMOD
	.word	IOART_DESTPHY
	.word	IOART_TRGRLVL
	.word	IOART_DELMOD
	.word	IOART_REM_IRR
	.word	IOART_INTVEC
	.word	APIC_ID_SHIFT
	.word	.LC1
	.size	vioapic_send_intr, .-vioapic_send_intr
	.comm	REDIR_ENTRIES,4,4
	.comm	IOART_TRGRLVL,4,4
	.comm	IOART_REM_IRR,4,4
	.comm	IOART_INTVEC,4,4
	.comm	IOART_INTMSET,4,4
	.comm	IOART_INTMASK,4,4
	.comm	IOART_DESTPHY,4,4
	.comm	IOART_DESTMOD,4,4
	.comm	IOART_DELMOD,4,4
	.comm	APIC_ID_SHIFT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
