	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtsx_comm_set_aspm
_rtsx_comm_set_aspm:                    ## @rtsx_comm_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_11
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	_DEV_ASPM_DYNAMIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.2:
	movq	%rbx, %rdi
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	callq	_rtsx_pci_enable_aspm
	jmp	LBB0_10
LBB0_5:
	movq	_DEV_ASPM_BACKDOOR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.6:
	movq	_FORCE_ASPM_VAL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.8:
	movl	4(%rbx), %ecx
	jmp	LBB0_9
LBB0_4:
	callq	_rtsx_pci_disable_aspm
	jmp	LBB0_10
LBB0_7:
	xorl	%ecx, %ecx
LBB0_9:
	movq	_ASPM_FORCE_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rtsx_pci_write_register
LBB0_10:
	movl	%r14d, (%rbx)
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEV_ASPM_DYNAMIC,8,3           ## @DEV_ASPM_DYNAMIC
	.comm	_DEV_ASPM_BACKDOOR,8,3          ## @DEV_ASPM_BACKDOOR
	.comm	_FORCE_ASPM_VAL_MASK,4,2        ## @FORCE_ASPM_VAL_MASK
	.comm	_ASPM_FORCE_CTL,4,2             ## @ASPM_FORCE_CTL
	.no_dead_strip	_rtsx_comm_set_aspm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtsx_comm_set_aspm
_rtsx_comm_set_aspm:                    ; @rtsx_comm_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_11
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
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:
	mov	x0, x20
	cbz	w19, LBB0_7
; %bb.3:
	bl	_rtsx_pci_enable_aspm
	b	LBB0_10
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_10
; %bb.5:
Lloh6:
	adrp	x8, _FORCE_ASPM_VAL_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FORCE_ASPM_VAL_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	cbz	w19, LBB0_8
; %bb.6:
	ldr	w3, [x20, #4]
	b	LBB0_9
LBB0_7:
	bl	_rtsx_pci_disable_aspm
	b	LBB0_10
LBB0_8:
	mov	w3, #0
LBB0_9:
Lloh9:
	adrp	x8, _ASPM_FORCE_CTL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ASPM_FORCE_CTL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rtsx_pci_write_register
LBB0_10:
	str	w19, [x20]
LBB0_11:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DEV_ASPM_DYNAMIC,8,3           ; @DEV_ASPM_DYNAMIC
	.comm	_DEV_ASPM_BACKDOOR,8,3          ; @DEV_ASPM_BACKDOOR
	.comm	_FORCE_ASPM_VAL_MASK,4,2        ; @FORCE_ASPM_VAL_MASK
	.comm	_ASPM_FORCE_CTL,4,2             ; @ASPM_FORCE_CTL
	.no_dead_strip	_rtsx_comm_set_aspm
.subsections_via_symbols
