	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rts5260_set_aspm
_rts5260_set_aspm:                      ## @rts5260_set_aspm
	.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
	cmpl	%esi, (%rdi)
	je	LBB0_9
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	_DEV_ASPM_DYNAMIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.2:
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.4:
	movl	4(%rbx), %ecx
	jmp	LBB0_5
LBB0_6:
	movq	_DEV_ASPM_BACKDOOR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	_FORCE_ASPM_VAL_MASK@GOTPCREL(%rip), %rax
	movq	_FORCE_ASPM_CTL0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%rax), %edx
	orl	%esi, %edx
	xorl	%ecx, %ecx
	testl	%r14d, %r14d
	cmovel	%esi, %ecx
	movq	_ASPM_FORCE_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rtsx_pci_write_register
	jmp	LBB0_8
LBB0_3:
	xorl	%ecx, %ecx
LBB0_5:
	movq	_PCI_EXP_LNKCTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movq	_ASPM_MASK_NEG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_rtsx_pci_update_cfg_byte
LBB0_8:
	movl	%r14d, (%rbx)
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEV_ASPM_DYNAMIC,8,3           ## @DEV_ASPM_DYNAMIC
	.comm	_PCI_EXP_LNKCTL,8,3             ## @PCI_EXP_LNKCTL
	.comm	_ASPM_MASK_NEG,4,2              ## @ASPM_MASK_NEG
	.comm	_DEV_ASPM_BACKDOOR,8,3          ## @DEV_ASPM_BACKDOOR
	.comm	_FORCE_ASPM_VAL_MASK,4,2        ## @FORCE_ASPM_VAL_MASK
	.comm	_FORCE_ASPM_CTL0,4,2            ## @FORCE_ASPM_CTL0
	.comm	_ASPM_FORCE_CTL,4,2             ## @ASPM_FORCE_CTL
	.no_dead_strip	_rts5260_set_aspm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rts5260_set_aspm
_rts5260_set_aspm:                      ; @rts5260_set_aspm
	.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
	ldr	w8, [x0]
	cmp	w8, w1
	b.eq	LBB0_9
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x9, _DEV_ASPM_DYNAMIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DEV_ASPM_DYNAMIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	cbz	w19, LBB0_6
; %bb.3:
	ldr	w3, [x20, #4]
	b	LBB0_7
LBB0_4:
Lloh3:
	adrp	x9, _DEV_ASPM_BACKDOOR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DEV_ASPM_BACKDOOR@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.5:
Lloh6:
	adrp	x8, _FORCE_ASPM_VAL_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FORCE_ASPM_VAL_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _FORCE_ASPM_CTL0@GOTPAGE
Lloh10:
	ldr	x9, [x9, _FORCE_ASPM_CTL0@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w2, w9, w8
	cmp	w19, #0
	csel	w3, w9, wzr, eq
Lloh12:
	adrp	x8, _ASPM_FORCE_CTL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ASPM_FORCE_CTL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rtsx_pci_write_register
	b	LBB0_8
LBB0_6:
	mov	w3, #0
LBB0_7:
Lloh15:
	adrp	x8, _PCI_EXP_LNKCTL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PCI_EXP_LNKCTL@GOTPAGEOFF]
	ldr	x9, [x20, #8]
Lloh17:
	ldr	x8, [x8]
	add	x1, x8, x9
Lloh18:
	adrp	x8, _ASPM_MASK_NEG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ASPM_MASK_NEG@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_rtsx_pci_update_cfg_byte
LBB0_8:
	str	w19, [x20]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DEV_ASPM_DYNAMIC,8,3           ; @DEV_ASPM_DYNAMIC
	.comm	_PCI_EXP_LNKCTL,8,3             ; @PCI_EXP_LNKCTL
	.comm	_ASPM_MASK_NEG,4,2              ; @ASPM_MASK_NEG
	.comm	_DEV_ASPM_BACKDOOR,8,3          ; @DEV_ASPM_BACKDOOR
	.comm	_FORCE_ASPM_VAL_MASK,4,2        ; @FORCE_ASPM_VAL_MASK
	.comm	_FORCE_ASPM_CTL0,4,2            ; @FORCE_ASPM_CTL0
	.comm	_ASPM_FORCE_CTL,4,2             ; @ASPM_FORCE_CTL
	.no_dead_strip	_rts5260_set_aspm
.subsections_via_symbols
