	.file	"extr_iflib.c__iflib_irq_alloc.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"unknown"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"failed to allocate IRQ for rid %d, name %s.\n"
	.align 8
.LC2:
	.string	"filter and handler can't both be non-NULL"
	.align 8
.LC3:
	.string	"failed to setup interrupt for rid %d, name %s: %d\n"
	.section	.rodata.str1.1
.LC4:
	.string	"%s"
	.text
	.p2align 4
	.type	_iflib_irq_alloc, @function
_iflib_irq_alloc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, r8
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	r14d, DWORD PTR 4[rdi]
	mov	ebp, DWORD PTR RF_ACTIVE[rip]
	mov	QWORD PTR [rsp], rsi
	mov	r15, QWORD PTR 112[rsp]
	mov	QWORD PTR 8[rsp], r9
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rdi]
	mov	QWORD PTR 32[rsp], 0
	test	DWORD PTR IFC_LEGACY[rip], eax
	je	.L2
	or	ebp, DWORD PTR RF_SHAREABLE[rip]
.L2:
	xor	edi, edi
	cmp	r12d, 511
	setle	dil
	call	MPASS@PLT
	mov	esi, DWORD PTR SYS_RES_IRQ[rip]
	mov	ecx, ebp
	mov	edi, r14d
	lea	rdx, 28[rsp]
	mov	DWORD PTR 28[rsp], r12d
	call	bus_alloc_resource_any@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L17
	mov	rax, QWORD PTR [rsp]
	test	r13, r13
	lea	rsi, .LC2[rip]
	sete	dil
	test	rbx, rbx
	mov	QWORD PTR 8[rax], rbp
	sete	al
	or	edi, eax
	movzx	edi, dil
	call	KASSERT@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 120
	mov	rcx, r13
	mov	r8, rbx
	lea	rax, 40[rsp]
	mov	edx, DWORD PTR INTR_MPSAFE[rip]
	mov	rsi, rbp
	mov	edi, r14d
	push	rax
	.cfi_def_cfa_offset 128
	mov	r9, QWORD PTR 24[rsp]
	or	edx, DWORD PTR INTR_TYPE_NET[rip]
	call	bus_setup_intr@PLT
	mov	r13d, eax
	pop	rax
	.cfi_def_cfa_offset 120
	pop	rdx
	.cfi_def_cfa_offset 112
	test	r13d, r13d
	jne	.L18
	mov	rdx, QWORD PTR 32[rsp]
	test	r15, r15
	je	.L7
	mov	r8, r15
	lea	rcx, .LC4[rip]
	mov	rsi, rbp
	mov	edi, r14d
	call	bus_describe_intr@PLT
	mov	rdx, QWORD PTR 32[rsp]
.L7:
	mov	rax, QWORD PTR [rsp]
	mov	QWORD PTR [rax], rdx
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	test	r15, r15
	lea	rax, .LC0[rip]
	mov	r8d, r13d
	mov	edx, r12d
	cmove	r15, rax
	lea	rsi, .LC3[rip]
	mov	edi, r14d
	xor	eax, eax
	mov	rcx, r15
	call	device_printf@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rcx, r15
	mov	edx, r12d
	lea	rsi, .LC1[rip]
	mov	edi, r14d
	xor	eax, eax
	call	device_printf@PLT
	mov	r13d, DWORD PTR ENOMEM[rip]
	jmp	.L1
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	_iflib_irq_alloc, .-_iflib_irq_alloc
	.comm	SYS_RES_IRQ,4,4
	.comm	RF_SHAREABLE,4,4
	.comm	RF_ACTIVE,4,4
	.comm	INTR_TYPE_NET,4,4
	.comm	INTR_MPSAFE,4,4
	.comm	IFC_LEGACY,4,4
	.comm	ENOMEM,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_iflib.c__iflib_irq_alloc.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"unknown\000"
	.align	2
.LC1:
	.ascii	"failed to allocate IRQ for rid %d, name %s.\012\000"
	.align	2
.LC2:
	.ascii	"filter and handler can't both be non-NULL\000"
	.align	2
.LC3:
	.ascii	"failed to setup interrupt for rid %d, name %s: %d\012"
	.ascii	"\000"
	.align	2
.LC4:
	.ascii	"%s\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_iflib_irq_alloc, %function
_iflib_irq_alloc:
	@ args = 12, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r3
	ldr	r3, .L20
	sub	sp, sp, #36
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	ldr	ip, .L20+4
	mov	lr, #0
	ldr	r5, [r0]
	ldr	r4, [ip]
	ldr	ip, .L20+8
	tst	r5, r4
	mov	r5, r2
	ldrne	r3, .L20+12
	ldr	r4, [ip]
	ldrne	r3, [r3]
	ldr	r8, [r0, #4]
	orrne	r4, r4, r3
	cmp	r2, #512
	movge	r0, #0
	movlt	r0, #1
	mov	r7, r1
	str	lr, [sp, #20]
	ldr	r10, [sp, #72]
	ldr	fp, [sp, #76]
	ldr	r9, [sp, #80]
	bl	MPASS
	ldr	r2, .L20+16
	mov	r3, r4
	ldr	r1, [r2]
	mov	r0, r8
	add	r2, sp, #24
	str	r5, [sp, #24]
	bl	bus_alloc_resource_any
	subs	r4, r0, #0
	beq	.L17
	clz	r0, r10
	cmp	r6, #0
	ldr	r1, .L20+20
	lsr	r0, r0, #5
	str	r4, [r7, #4]
	moveq	r0, #1
	bl	KASSERT
	ldr	r2, .L20+24
	ldr	r3, .L20+28
	ldr	r0, [r2]
	ldr	r2, [r3]
	add	r1, sp, #20
	mov	r3, r6
	orr	r2, r0, r2
	str	r1, [sp, #8]
	mov	r0, r8
	mov	r1, r4
	stm	sp, {r10, fp}
	bl	bus_setup_intr
	subs	r6, r0, #0
	bne	.L18
	cmp	r9, #0
	ldr	r2, [sp, #20]
	beq	.L7
	mov	r1, r4
	mov	r0, r8
	ldr	r3, .L20+32
	str	r9, [sp]
	bl	bus_describe_intr
	ldr	r2, [sp, #20]
.L7:
	str	r2, [r7]
.L1:
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	mov	r0, r6
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	cmp	r9, #0
	ldr	r3, .L20+36
	mov	r2, r5
	mov	r0, r8
	movne	r3, r9
	ldr	r1, .L20+40
	str	r6, [sp]
	bl	device_printf
	b	.L1
.L17:
	mov	r3, r9
	mov	r2, r5
	mov	r0, r8
	ldr	r1, .L20+44
	bl	device_printf
	ldr	r3, .L20+48
	ldr	r6, [r3]
	b	.L1
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC5
	.word	IFC_LEGACY
	.word	RF_ACTIVE
	.word	RF_SHAREABLE
	.word	SYS_RES_IRQ
	.word	.LC2
	.word	INTR_MPSAFE
	.word	INTR_TYPE_NET
	.word	.LC4
	.word	.LC0
	.word	.LC3
	.word	.LC1
	.word	ENOMEM
	.size	_iflib_irq_alloc, .-_iflib_irq_alloc
	.comm	SYS_RES_IRQ,4,4
	.comm	RF_SHAREABLE,4,4
	.comm	RF_ACTIVE,4,4
	.comm	INTR_TYPE_NET,4,4
	.comm	INTR_MPSAFE,4,4
	.comm	IFC_LEGACY,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
