	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcie_write_mps
_pcie_write_mps:                        ## @pcie_write_mps
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_pcie_bus_config@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PCIE_BUS_PERFORMANCE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movb	(%r14), %cl
	movl	$128, %ebx
	shll	%cl, %ebx
	movq	%r14, %rdi
	callq	_pci_pcie_type
	movq	_PCI_EXP_TYPE_ROOT_PORT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.2:
	movq	8(%r14), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_pcie_get_mps
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_min
	movl	%eax, %ebx
LBB0_4:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_pcie_set_mps
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pci_err                        ## TAILCALL
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pcie_bus_config,8,3            ## @pcie_bus_config
	.comm	_PCIE_BUS_PERFORMANCE,8,3       ## @PCIE_BUS_PERFORMANCE
	.comm	_PCI_EXP_TYPE_ROOT_PORT,8,3     ## @PCI_EXP_TYPE_ROOT_PORT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed attempting to set the MPS\n"

	.no_dead_strip	_pcie_write_mps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcie_write_mps
_pcie_write_mps:                        ; @pcie_write_mps
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _pcie_bus_config@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pcie_bus_config@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _PCIE_BUS_PERFORMANCE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PCIE_BUS_PERFORMANCE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	w8, [x19]
	mov	w9, #128
	lsl	w20, w9, w8
	mov	x0, x19
	bl	_pci_pcie_type
Lloh6:
	adrp	x8, _PCI_EXP_TYPE_ROOT_PORT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCI_EXP_TYPE_ROOT_PORT@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_4
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_pcie_get_mps
	mov	x1, x0
	mov	x0, x20
	bl	_min
	mov	x20, x0
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	bl	_pcie_set_mps
	cbz	w0, LBB0_6
; %bb.5:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pci_err
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_pcie_bus_config,8,3            ; @pcie_bus_config
	.comm	_PCIE_BUS_PERFORMANCE,8,3       ; @PCIE_BUS_PERFORMANCE
	.comm	_PCI_EXP_TYPE_ROOT_PORT,8,3     ; @PCI_EXP_TYPE_ROOT_PORT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed attempting to set the MPS\n"

	.no_dead_strip	_pcie_write_mps
.subsections_via_symbols
