	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcie_set_mps                   ## -- Begin function pcie_set_mps
	.p2align	4, 0x90
_pcie_set_mps:                          ## @pcie_set_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
	leal	-4097(%rbx), %eax
	cmpl	$-3969, %eax                    ## imm = 0xF07F
	jb	LBB0_3
## %bb.1:
	movq	%rdi, %r14
	movl	%ebx, %edi
	callq	_is_power_of_2
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	bsfl	%ebx, %ecx
	addl	$-7, %ecx
	cmpl	(%r14), %ecx
	jle	LBB0_4
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	shll	$5, %ecx
	movq	_PCI_EXP_DEVCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PCI_EXP_DEVCTL_PAYLOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pcie_capability_clear_and_set_word ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PCI_EXP_DEVCTL,4,2             ## @PCI_EXP_DEVCTL
	.comm	_PCI_EXP_DEVCTL_PAYLOAD,4,2     ## @PCI_EXP_DEVCTL_PAYLOAD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcie_set_mps                   ; -- Begin function pcie_set_mps
	.p2align	2
_pcie_set_mps:                          ; @pcie_set_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	w8, #-4097
	add	w8, w1, w8
	cmn	w8, #3969
	b.lo	LBB0_3
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_is_power_of_2
	cbz	w0, LBB0_3
; %bb.2:
	rbit	w8, w20
	clz	w8, w8
	sub	w8, w8, #7
	ldr	w9, [x19]
	cmp	w8, w9
	b.le	LBB0_4
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	lsl	w3, w8, #5
Lloh3:
	adrp	x8, _PCI_EXP_DEVCTL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_EXP_DEVCTL@GOTPAGEOFF]
Lloh5:
	adrp	x9, _PCI_EXP_DEVCTL_PAYLOAD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PCI_EXP_DEVCTL_PAYLOAD@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	ldr	w2, [x9]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pcie_capability_clear_and_set_word
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PCI_EXP_DEVCTL,4,2             ; @PCI_EXP_DEVCTL
	.comm	_PCI_EXP_DEVCTL_PAYLOAD,4,2     ; @PCI_EXP_DEVCTL_PAYLOAD
.subsections_via_symbols
