	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcie_get_aspm_reg
_pcie_get_aspm_reg:                     ## @pcie_get_aspm_reg
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_PCI_EXP_LNKCAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_pcie_capability_read_dword
	movl	-36(%rbp), %eax
	movq	_PCI_EXP_LNKCAP_ASPMS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	sarl	$10, %ecx
	movl	%ecx, (%rbx)
	movq	_PCI_EXP_LNKCAP_L0SEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	sarl	$12, %ecx
	movl	%ecx, 4(%rbx)
	movq	_PCI_EXP_LNKCAP_L1EL@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	sarl	$15, %eax
	movl	%eax, 8(%rbx)
	movq	_PCI_EXP_LNKCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pcie_capability_read_word
	movq	_PCI_EXP_LNKCTL_ASPMC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-40(%rbp), %eax
	movl	%eax, 12(%rbx)
	movl	$0, 24(%rbx)
	movq	$0, 16(%rbx)
	movq	_PCI_EXT_CAP_ID_L1SS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pci_find_ext_capability
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	leaq	16(%rbx), %r12
	movq	_PCI_L1SS_CAP@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%r12, %rdx
	callq	_pci_read_config_dword
	movl	(%r12), %eax
	movq	_PCI_L1SS_CAP_L1_PM_SS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.3:
	leaq	24(%rbx), %r15
	leaq	20(%rbx), %rdx
	cmpl	$0, (%r14)
	jne	LBB0_5
## %bb.4:
	movq	_PCI_L1SS_CAP_ASPM_L1_2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%r12)
LBB0_5:
	movq	_PCI_L1SS_CTL1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	32(%rbx), %rsi
	movq	%r14, %rdi
	callq	_pci_read_config_dword
	movq	_PCI_L1SS_CTL2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	32(%rbx), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_pci_read_config_dword
	jmp	LBB0_6
LBB0_2:
	movl	$0, (%r12)
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_EXP_LNKCAP,4,2             ## @PCI_EXP_LNKCAP
	.comm	_PCI_EXP_LNKCAP_ASPMS,4,2       ## @PCI_EXP_LNKCAP_ASPMS
	.comm	_PCI_EXP_LNKCAP_L0SEL,4,2       ## @PCI_EXP_LNKCAP_L0SEL
	.comm	_PCI_EXP_LNKCAP_L1EL,4,2        ## @PCI_EXP_LNKCAP_L1EL
	.comm	_PCI_EXP_LNKCTL,4,2             ## @PCI_EXP_LNKCTL
	.comm	_PCI_EXP_LNKCTL_ASPMC,4,2       ## @PCI_EXP_LNKCTL_ASPMC
	.comm	_PCI_EXT_CAP_ID_L1SS,4,2        ## @PCI_EXT_CAP_ID_L1SS
	.comm	_PCI_L1SS_CAP,8,3               ## @PCI_L1SS_CAP
	.comm	_PCI_L1SS_CAP_L1_PM_SS,4,2      ## @PCI_L1SS_CAP_L1_PM_SS
	.comm	_PCI_L1SS_CAP_ASPM_L1_2,4,2     ## @PCI_L1SS_CAP_ASPM_L1_2
	.comm	_PCI_L1SS_CTL1,8,3              ## @PCI_L1SS_CTL1
	.comm	_PCI_L1SS_CTL2,8,3              ## @PCI_L1SS_CTL2
	.no_dead_strip	_pcie_get_aspm_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcie_get_aspm_reg
_pcie_get_aspm_reg:                     ; @pcie_get_aspm_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PCI_EXP_LNKCAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_EXP_LNKCAP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_pcie_capability_read_dword
	ldr	w8, [sp, #8]
Lloh3:
	adrp	x9, _PCI_EXP_LNKCAP_ASPMS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PCI_EXP_LNKCAP_ASPMS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w9, w9, w8
	asr	w9, w9, #10
	str	w9, [x20]
Lloh6:
	adrp	x9, _PCI_EXP_LNKCAP_L0SEL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PCI_EXP_LNKCAP_L0SEL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w9, w9, w8
Lloh9:
	adrp	x10, _PCI_EXP_LNKCAP_L1EL@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PCI_EXP_LNKCAP_L1EL@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	and	w8, w10, w8
	asr	w9, w9, #12
	asr	w8, w8, #15
	stp	w9, w8, [x20, #4]
Lloh12:
	adrp	x8, _PCI_EXP_LNKCTL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCI_EXP_LNKCTL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pcie_capability_read_word
	ldr	w8, [sp, #12]
Lloh15:
	adrp	x9, _PCI_EXP_LNKCTL_ASPMC@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PCI_EXP_LNKCTL_ASPMC@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	and	w8, w9, w8
	mov	x23, x20
	str	wzr, [x23, #16]!
	stur	w8, [x23, #-4]
	mov	x21, x23
	str	wzr, [x21, #8]!
	mov	x22, x23
	str	wzr, [x22, #4]!
Lloh18:
	adrp	x8, _PCI_EXT_CAP_ID_L1SS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCI_EXT_CAP_ID_L1SS@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pci_find_ext_capability
	str	x0, [x23, #16]
	cbz	x0, LBB0_6
; %bb.1:
Lloh21:
	adrp	x8, _PCI_L1SS_CAP@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PCI_L1SS_CAP@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	add	x1, x8, x0
	mov	x0, x19
	mov	x2, x23
	bl	_pci_read_config_dword
	ldr	w8, [x23]
Lloh24:
	adrp	x9, _PCI_L1SS_CAP_L1_PM_SS@GOTPAGE
Lloh25:
	ldr	x9, [x9, _PCI_L1SS_CAP_L1_PM_SS@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
	ldr	w9, [x19]
	cbnz	w9, LBB0_4
; %bb.3:
Lloh27:
	adrp	x9, _PCI_L1SS_CAP_ASPM_L1_2@GOTPAGE
Lloh28:
	ldr	x9, [x9, _PCI_L1SS_CAP_ASPM_L1_2@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x23]
LBB0_4:
	ldr	x8, [x20, #32]
Lloh30:
	adrp	x9, _PCI_L1SS_CTL1@GOTPAGE
Lloh31:
	ldr	x9, [x9, _PCI_L1SS_CTL1@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x19
	mov	x2, x22
	bl	_pci_read_config_dword
	ldr	x8, [x20, #32]
Lloh33:
	adrp	x9, _PCI_L1SS_CTL2@GOTPAGE
Lloh34:
	ldr	x9, [x9, _PCI_L1SS_CTL2@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x19
	mov	x2, x21
	bl	_pci_read_config_dword
	b	LBB0_6
LBB0_5:
	str	wzr, [x23]
LBB0_6:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_EXP_LNKCAP,4,2             ; @PCI_EXP_LNKCAP
	.comm	_PCI_EXP_LNKCAP_ASPMS,4,2       ; @PCI_EXP_LNKCAP_ASPMS
	.comm	_PCI_EXP_LNKCAP_L0SEL,4,2       ; @PCI_EXP_LNKCAP_L0SEL
	.comm	_PCI_EXP_LNKCAP_L1EL,4,2        ; @PCI_EXP_LNKCAP_L1EL
	.comm	_PCI_EXP_LNKCTL,4,2             ; @PCI_EXP_LNKCTL
	.comm	_PCI_EXP_LNKCTL_ASPMC,4,2       ; @PCI_EXP_LNKCTL_ASPMC
	.comm	_PCI_EXT_CAP_ID_L1SS,4,2        ; @PCI_EXT_CAP_ID_L1SS
	.comm	_PCI_L1SS_CAP,8,3               ; @PCI_L1SS_CAP
	.comm	_PCI_L1SS_CAP_L1_PM_SS,4,2      ; @PCI_L1SS_CAP_L1_PM_SS
	.comm	_PCI_L1SS_CAP_ASPM_L1_2,4,2     ; @PCI_L1SS_CAP_ASPM_L1_2
	.comm	_PCI_L1SS_CTL1,8,3              ; @PCI_L1SS_CTL1
	.comm	_PCI_L1SS_CTL2,8,3              ; @PCI_L1SS_CTL2
	.no_dead_strip	_pcie_get_aspm_reg
.subsections_via_symbols
