	.file	"extr_apic.c_reserve_eilvt_offset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"LVT offset %d assigned for vector 0x%02x\n"
	.text
	.p2align 4
	.type	reserve_eilvt_offset, @function
reserve_eilvt_offset:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	DWORD PTR APIC_EILVT_NR_MAX[rip], edi
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, -1
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	jle	.L1
	movsx	rbx, edi
	mov	r12d, edi
	mov	rdi, QWORD PTR eilvt_offsets[rip]
	mov	r14d, esi
	sal	rbx, 2
	add	rdi, rbx
	call	atomic_read@PLT
	mov	ebp, eax
	.p2align 4,,10
	.p2align 3
.L4:
	mov	eax, DWORD PTR APIC_EILVT_MASKED[rip]
	not	eax
	and	eax, ebp
	mov	r13d, eax
	je	.L6
	mov	esi, r14d
	mov	edi, eax
	call	eilvt_entry_is_changeable@PLT
	test	eax, eax
	je	.L1
.L6:
	mov	rdi, QWORD PTR eilvt_offsets[rip]
	mov	esi, ebp
	mov	edx, r14d
	add	rdi, rbx
	call	atomic_cmpxchg@PLT
	mov	ebp, eax
	cmp	r14d, eax
	jne	.L4
	mov	edx, DWORD PTR APIC_EILVT_MASKED[rip]
	not	edx
	and	edx, eax
	je	.L1
	cmp	r13d, edx
	jne	.L21
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, ebp
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	mov	esi, r12d
	lea	rdi, .LC0[rip]
	call	pr_info@PLT
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	eax, ebp
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	reserve_eilvt_offset, .-reserve_eilvt_offset
	.comm	eilvt_offsets,8,8
	.comm	APIC_EILVT_NR_MAX,4,4
	.comm	APIC_EILVT_MASKED,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_apic.c_reserve_eilvt_offset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"LVT offset %d assigned for vector 0x%02x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	reserve_eilvt_offset, %function
reserve_eilvt_offset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L19
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, [r3]
	cmp	r3, r0
	mvnle	r4, #0
	ble	.L1
	mov	r9, r0
	ldr	r7, .L19+4
	mov	r10, r1
	ldr	r0, [r7]
	ldr	r6, .L19+8
	add	r0, r0, r9, lsl #2
	bl	atomic_read
	mov	r4, r0
	lsl	r8, r9, #2
.L4:
	ldr	r3, [r6]
	bics	r5, r4, r3
	beq	.L6
	mov	r1, r10
	mov	r0, r5
	bl	eilvt_entry_is_changeable
	cmp	r0, #0
	beq	.L1
.L6:
	ldr	r0, [r7]
	mov	r1, r4
	mov	r2, r10
	add	r0, r0, r8
	bl	atomic_cmpxchg
	cmp	r10, r0
	mov	r4, r0
	bne	.L4
	ldr	r2, [r6]
	bics	r2, r0, r2
	movne	r3, #1
	moveq	r3, #0
	cmp	r5, r2
	moveq	r3, #0
	andne	r3, r3, #1
	cmp	r3, #0
	bne	.L18
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L18:
	mov	r1, r9
	ldr	r0, .L19+12
	bl	pr_info
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L20:
	.align	2
.L19:
	.word	APIC_EILVT_NR_MAX
	.word	eilvt_offsets
	.word	APIC_EILVT_MASKED
	.word	.LC0
	.size	reserve_eilvt_offset, .-reserve_eilvt_offset
	.comm	eilvt_offsets,4,4
	.comm	APIC_EILVT_NR_MAX,4,4
	.comm	APIC_EILVT_MASKED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
