	.file	"extr_subr_intr.c_isrc_alloc_irq.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	isrc_alloc_irq, @function
isrc_alloc_irq:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	esi, DWORD PTR MA_OWNED[rip]
	mov	rbx, rdi
	lea	rdi, isrc_table_lock[rip]
	call	mtx_assert@PLT
	mov	rdi, QWORD PTR irq_sources[rip]
	call	nitems@PLT
	mov	r9, QWORD PTR irq_next_free[rip]
	cmp	r9, rax
	jnb	.L16
	mov	rsi, QWORD PTR irq_sources[rip]
	mov	rdx, r9
	lea	rcx, [rsi+r9*8]
	.p2align 4,,10
	.p2align 3
.L5:
	mov	r8, rdx
	add	rdx, 1
	cmp	QWORD PTR [rcx], 0
	mov	rdi, rcx
	je	.L4
	add	rcx, 8
	cmp	rax, rdx
	jne	.L5
	test	r9, r9
	je	.L6
	mov	rcx, rsi
	xor	esi, esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L18:
	add	rcx, 8
	cmp	r9, rsi
	je	.L6
.L7:
	mov	r8, rsi
	add	rsi, 1
	cmp	QWORD PTR [rcx], 0
	mov	rdi, rcx
	jne	.L18
	mov	rdx, rsi
.L4:
	mov	QWORD PTR [rbx], r8
	mov	QWORD PTR [rdi], rbx
	cmp	rax, rdx
	jbe	.L8
	xor	eax, eax
	mov	QWORD PTR irq_next_free[rip], rdx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	QWORD PTR irq_next_free[rip], rdx
.L16:
	mov	eax, DWORD PTR ENOSPC[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	QWORD PTR irq_next_free[rip], 0
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	isrc_alloc_irq, .-isrc_alloc_irq
	.comm	isrc_table_lock,4,4
	.comm	irq_sources,8,8
	.comm	irq_next_free,8,8
	.comm	MA_OWNED,4,4
	.comm	ENOSPC,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_subr_intr.c_isrc_alloc_irq.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	isrc_alloc_irq, %function
isrc_alloc_irq:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L22
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r5, .L22+4
	ldr	r1, [r3]
	mov	r4, r0
	ldr	r0, .L22+8
	bl	mtx_assert
	ldr	r0, [r5]
	bl	nitems
	ldr	r7, .L22+12
	ldr	r6, [r7]
	cmp	r6, r0
	bcs	.L20
	mov	r3, r6
	ldr	lr, [r5]
	add	r2, lr, r6, lsl #2
.L5:
	ldr	ip, [r2]
	mov	r1, r2
	cmp	ip, #0
	mov	r5, r3
	add	r2, r2, #4
	add	r3, r3, #1
	beq	.L4
	cmp	r0, r3
	bne	.L5
	cmp	r6, #0
	beq	.L6
	mov	ip, lr
	mov	r2, #0
	b	.L7
.L21:
	cmp	r6, r2
	beq	.L6
.L7:
	ldr	lr, [ip]
	mov	r1, ip
	cmp	lr, #0
	mov	r5, r2
	add	ip, ip, #4
	add	r2, r2, #1
	bne	.L21
	mov	r3, r2
.L4:
	cmp	r0, r3
	movls	r3, #0
	str	r5, [r4]
	movhi	r0, #0
	str	r4, [r1]
	movls	r0, r3
	strhi	r3, [r7]
	strls	r3, [r7]
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	ldr	r3, .L22+16
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	ldr	r2, .L22+16
	str	r3, [r7]
	ldr	r0, [r2]
	pop	{r4, r5, r6, r7, r8, pc}
.L23:
	.align	2
.L22:
	.word	MA_OWNED
	.word	irq_sources
	.word	isrc_table_lock
	.word	irq_next_free
	.word	ENOSPC
	.size	isrc_alloc_irq, .-isrc_alloc_irq
	.comm	isrc_table_lock,4,4
	.comm	irq_sources,4,4
	.comm	irq_next_free,4,4
	.comm	MA_OWNED,4,4
	.comm	ENOSPC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
