	.file	"extr_leon_kernel.c_leon_set_affinity.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	leon_set_affinity, @function
leon_set_affinity:
.LFB0:
	.cfi_startproc
	endbr64
	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	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, QWORD PTR [rdi]
	call	irq_data_get_affinity_mask@PLT
	mov	rdi, rax
	call	irq_choose_cpu@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	irq_choose_cpu@PLT
	cmp	r12d, eax
	je	.L2
	xor	r14d, r14d
	lea	rdi, leon_irq_lock[rip]
	mov	ebp, eax
	mov	r13, rbx
	mov	rsi, r14
	not	r13
	call	spin_lock_irqsave@PLT
	mov	edi, r12d
	call	LEON_IMASK@PLT
	mov	edi, eax
	call	LEON3_BYPASS_LOAD_PA@PLT
	mov	edi, r12d
	and	r13, rax
	call	LEON_IMASK@PLT
	mov	rsi, r13
	mov	edi, eax
	call	LEON3_BYPASS_STORE_PA@PLT
	mov	edi, ebp
	call	LEON_IMASK@PLT
	mov	edi, eax
	call	LEON3_BYPASS_LOAD_PA@PLT
	mov	edi, ebp
	or	rbx, rax
	call	LEON_IMASK@PLT
	mov	rsi, rbx
	mov	edi, eax
	call	LEON3_BYPASS_STORE_PA@PLT
	mov	rsi, r14
	lea	rdi, leon_irq_lock[rip]
	call	spin_unlock_irqrestore@PLT
.L2:
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	eax, DWORD PTR IRQ_SET_MASK_OK[rip]
	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	leon_set_affinity, .-leon_set_affinity
	.comm	leon_irq_lock,4,4
	.comm	IRQ_SET_MASK_OK,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_leon_kernel.c_leon_set_affinity.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	leon_set_affinity, %function
leon_set_affinity:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	ldr	r6, [r0]
	bl	irq_data_get_affinity_mask
	bl	irq_choose_cpu
	mov	r5, r0
	mov	r0, r4
	bl	irq_choose_cpu
	cmp	r5, r0
	beq	.L2
	mov	r8, #0
	mov	r4, r0
	mov	r1, r8
	ldr	r0, .L5
	bl	spin_lock_irqsave
	mov	r0, r5
	bl	LEON_IMASK
	bl	LEON3_BYPASS_LOAD_PA
	mov	r7, r0
	mov	r0, r5
	bl	LEON_IMASK
	bic	r1, r7, r6
	bl	LEON3_BYPASS_STORE_PA
	mov	r0, r4
	bl	LEON_IMASK
	bl	LEON3_BYPASS_LOAD_PA
	mov	r5, r0
	mov	r0, r4
	bl	LEON_IMASK
	orr	r1, r6, r5
	bl	LEON3_BYPASS_STORE_PA
	mov	r1, r8
	ldr	r0, .L5
	bl	spin_unlock_irqrestore
.L2:
	ldr	r3, .L5+4
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	.align	2
.L5:
	.word	leon_irq_lock
	.word	IRQ_SET_MASK_OK
	.size	leon_set_affinity, .-leon_set_affinity
	.comm	leon_irq_lock,4,4
	.comm	IRQ_SET_MASK_OK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
