	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pri_reset_while_enabled
_pri_reset_while_enabled:               ## @pri_reset_while_enabled
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_PCI_EXT_CAP_ID_PRI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pci_find_ext_capability
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movslq	%eax, %rbx
	movq	_PCI_PRI_CTRL@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	%rbx, %rsi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_read_config_word
	movq	_PCI_PRI_CTRL_RESET@GOTPCREL(%rip), %rax
	movl	-28(%rbp), %edx
	orl	(%rax), %edx
	movl	%edx, -28(%rbp)
	addq	(%r15), %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_pci_write_config_word
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_EXT_CAP_ID_PRI,4,2         ## @PCI_EXT_CAP_ID_PRI
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PCI_PRI_CTRL,8,3               ## @PCI_PRI_CTRL
	.comm	_PCI_PRI_CTRL_RESET,4,2         ## @PCI_PRI_CTRL_RESET
	.no_dead_strip	_pri_reset_while_enabled
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pri_reset_while_enabled
_pri_reset_while_enabled:               ; @pri_reset_while_enabled
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _PCI_EXT_CAP_ID_PRI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_EXT_CAP_ID_PRI@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_pci_find_ext_capability
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_2
; %bb.1:
	sxtw	x20, w0
Lloh3:
	adrp	x21, _PCI_PRI_CTRL@GOTPAGE
Lloh4:
	ldr	x21, [x21, _PCI_PRI_CTRL@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x1, x8, x20
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_word
Lloh5:
	adrp	x8, _PCI_PRI_CTRL_RESET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PCI_PRI_CTRL_RESET@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	x8, [x21]
	add	x1, x8, x20
	mov	x0, x19
	bl	_pci_write_config_word
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_EXT_CAP_ID_PRI,4,2         ; @PCI_EXT_CAP_ID_PRI
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PCI_PRI_CTRL,8,3               ; @PCI_PRI_CTRL
	.comm	_PCI_PRI_CTRL_RESET,4,2         ; @PCI_PRI_CTRL_RESET
	.no_dead_strip	_pri_reset_while_enabled
.subsections_via_symbols
