	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9003_hw_configpcipowersave
_ar9003_hw_configpcipowersave:          ## @ar9003_hw_configpcipowersave
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_AR_SREV_9462
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movl	12(%r15), %edx
	movl	%edx, %eax
	andl	$-16777216, %eax                ## imm = 0xFF000000
	cmpl	$385875968, %eax                ## imm = 0x17000000
	jne	LBB0_3
## %bb.2:
	andl	$16777215, %edx                 ## imm = 0xFFFFFF
	orl	$654311424, %edx                ## imm = 0x27000000
	movq	%r15, %rdi
	movl	$22284, %esi                    ## imm = 0x570C
	callq	_REG_WRITE
LBB0_3:
	testl	%r14d, %r14d
	jne	LBB0_5
## %bb.4:
	movq	_AR_PCIE_PM_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PCIE_PM_CTRL_ENA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_REG_SET_BIT
	movq	_AR_WA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r15, %rdi
	callq	_REG_WRITE
LBB0_5:
	xorl	%eax, %eax
	testl	%r14d, %r14d
	setne	%al
	cmpl	$0, 4(%r15,%rax,4)
	je	LBB0_8
## %bb.6:
	leaq	(%r15,%rax,4), %r14
	addq	$4, %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_INI_RA
	movl	%eax, %r12d
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_INI_RA
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_REG_WRITE
	incl	%ebx
	cmpl	(%r14), %ebx
	jb	LBB0_7
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_PCIE_PM_CTRL,4,2            ## @AR_PCIE_PM_CTRL
	.comm	_AR_PCIE_PM_CTRL_ENA,4,2        ## @AR_PCIE_PM_CTRL_ENA
	.comm	_AR_WA,4,2                      ## @AR_WA
	.no_dead_strip	_ar9003_hw_configpcipowersave
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9003_hw_configpcipowersave
_ar9003_hw_configpcipowersave:          ; @ar9003_hw_configpcipowersave
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_AR_SREV_9462
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x19, #12]
	lsr	w9, w8, #24
	cmp	w9, #23
	b.ne	LBB0_3
; %bb.2:
	mov	w2, #654311424
	bfxil	w2, w8, #0, #24
	mov	x0, x19
	mov	w1, #22284
	bl	_REG_WRITE
LBB0_3:
	cbnz	w20, LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _AR_PCIE_PM_CTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR_PCIE_PM_CTRL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _AR_PCIE_PM_CTRL_ENA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR_PCIE_PM_CTRL_ENA@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_SET_BIT
Lloh6:
	adrp	x8, _AR_WA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AR_WA@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_REG_WRITE
LBB0_5:
	add	x8, x19, #8
	add	x9, x19, #4
	cmp	w20, #0
	csel	x20, x9, x8, eq
	ldr	w8, [x20]
	cbz	w8, LBB0_8
; %bb.6:
	mov	w21, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_INI_RA
	mov	x22, x0
	mov	x0, x20
	mov	x1, x21
	mov	w2, #1
	bl	_INI_RA
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_REG_WRITE
	add	w21, w21, #1
	ldr	w8, [x20]
	cmp	w21, w8
	b.lo	LBB0_7
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_PCIE_PM_CTRL,4,2            ; @AR_PCIE_PM_CTRL
	.comm	_AR_PCIE_PM_CTRL_ENA,4,2        ; @AR_PCIE_PM_CTRL_ENA
	.comm	_AR_WA,4,2                      ; @AR_WA
	.no_dead_strip	_ar9003_hw_configpcipowersave
.subsections_via_symbols
