	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pic32_set_irq_priority
_pic32_set_irq_priority:                ## @pic32_set_irq_priority
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
                                        ## kill: def $edi killed $edi def $rdi
	leal	3(%rdi), %eax
	testl	%edi, %edi
	cmovnsl	%edi, %eax
	movl	%eax, %edx
	andl	$-4, %eax
	subl	%eax, %edi
	leal	(,%rdi,8), %r15d
	movq	_PRIORITY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r15d, %ecx
	shll	%cl, %r12d
	sarl	$2, %edx
	movq	_evic_base@GOTPCREL(%rip), %rbx
	movq	(%rbx), %r13
	movq	_REG_IPC_OFFSET@GOTPCREL(%rip), %rax
	shll	$4, %edx
	movslq	%edx, %r14
	movq	(%rax), %rdi
	addq	%r14, %rdi
	callq	_PIC32_CLR
	addq	%rax, %r13
	movl	%r12d, %edi
	movq	%r13, %rsi
	callq	_writel
	movl	%r15d, %ecx
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	shll	%cl, %r15d
	movq	(%rbx), %rbx
	movq	_REG_IPC_OFFSET@GOTPCREL(%rip), %rax
	addq	(%rax), %r14
	movq	%r14, %rdi
	callq	_PIC32_SET
	addq	%rax, %rbx
	movl	%r15d, %edi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PRIORITY_MASK,4,2              ## @PRIORITY_MASK
	.comm	_evic_base,8,3                  ## @evic_base
	.comm	_REG_IPC_OFFSET,8,3             ## @REG_IPC_OFFSET
	.no_dead_strip	_pic32_set_irq_priority
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pic32_set_irq_priority
_pic32_set_irq_priority:                ; @pic32_set_irq_priority
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	add	w8, w0, #3
	cmp	w0, #0
	csel	w8, w8, w0, lt
	lsl	w9, w8, #2
	and	w9, w9, #0xfffffff0
	and	w8, w8, #0x1ffffffc
	sub	w8, w0, w8
	lsl	w21, w8, #3
Lloh0:
	adrp	x8, _PRIORITY_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PRIORITY_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w20, w8, w21
Lloh3:
	adrp	x22, _evic_base@GOTPAGE
Lloh4:
	ldr	x22, [x22, _evic_base@GOTPAGEOFF]
	ldr	x23, [x22]
Lloh5:
	adrp	x24, _REG_IPC_OFFSET@GOTPAGE
Lloh6:
	ldr	x24, [x24, _REG_IPC_OFFSET@GOTPAGEOFF]
	ldr	x8, [x24]
	sxtw	x25, w9
	add	x0, x8, x25
	bl	_PIC32_CLR
	add	x1, x0, x23
	mov	x0, x20
	bl	_writel
	lsl	w19, w19, w21
	ldr	x20, [x22]
	ldr	x8, [x24]
	add	x0, x8, x25
	bl	_PIC32_SET
	add	x1, x0, x20
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_writel
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PRIORITY_MASK,4,2              ; @PRIORITY_MASK
	.comm	_evic_base,8,3                  ; @evic_base
	.comm	_REG_IPC_OFFSET,8,3             ; @REG_IPC_OFFSET
	.no_dead_strip	_pic32_set_irq_priority
.subsections_via_symbols
