	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_hw_chip_reset
_ath9k_hw_chip_reset:                   ## @ath9k_hw_chip_reset
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_ATH9K_RESET_WARM@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	callq	_AR_SREV_9280
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	8(%rbx), %rax
	movq	_EEP_OL_PWRCTRL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	_ATH9K_RESET_POWER_ON@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	cmpl	$0, (%rbx)
	jne	LBB0_6
## %bb.4:
	movq	_AR_Q_TXE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_REG_READ
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	_AR_CR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_REG_READ
	movq	_AR_CR_RXE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
LBB0_6:
	movq	_ATH9K_RESET_COLD@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %r15d
LBB0_8:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_ath9k_hw_set_reset_reg
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	movq	_ATH9K_PM_AWAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ath9k_hw_setpower
	testl	%eax, %eax
	je	LBB0_13
## %bb.10:
	movl	$0, (%rbx)
	movq	%rbx, %rdi
	callq	_AR_SREV_9330
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	callq	_ar9003_hw_internal_regulator_apply
LBB0_12:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ath9k_hw_init_pll
	movl	$1, %r15d
LBB0_13:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH9K_RESET_WARM,4,2           ## @ATH9K_RESET_WARM
	.comm	_EEP_OL_PWRCTRL,4,2             ## @EEP_OL_PWRCTRL
	.comm	_ATH9K_RESET_POWER_ON,4,2       ## @ATH9K_RESET_POWER_ON
	.comm	_ATH9K_RESET_COLD,4,2           ## @ATH9K_RESET_COLD
	.comm	_AR_Q_TXE,4,2                   ## @AR_Q_TXE
	.comm	_AR_CR,4,2                      ## @AR_CR
	.comm	_AR_CR_RXE,4,2                  ## @AR_CR_RXE
	.comm	_ATH9K_PM_AWAKE,4,2             ## @ATH9K_PM_AWAKE
	.no_dead_strip	_ath9k_hw_chip_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_hw_chip_reset
_ath9k_hw_chip_reset:                   ; @ath9k_hw_chip_reset
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _ATH9K_RESET_WARM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH9K_RESET_WARM@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	bl	_AR_SREV_9280
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _EEP_OL_PWRCTRL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EEP_OL_PWRCTRL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
	mov	x0, x20
	blr	x8
	cbz	x0, LBB0_6
; %bb.2:
Lloh6:
	adrp	x8, _ATH9K_RESET_POWER_ON@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATH9K_RESET_POWER_ON@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
	ldr	w8, [x20]
	cbnz	w8, LBB0_6
; %bb.4:
Lloh8:
	adrp	x8, _AR_Q_TXE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AR_Q_TXE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_REG_READ
	cbnz	w0, LBB0_6
; %bb.5:
Lloh11:
	adrp	x8, _AR_CR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AR_CR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_REG_READ
Lloh14:
	adrp	x8, _AR_CR_RXE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AR_CR_RXE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_8
LBB0_6:
Lloh17:
	adrp	x8, _ATH9K_RESET_COLD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ATH9K_RESET_COLD@GOTPAGEOFF]
LBB0_7:
	ldr	w21, [x8]
LBB0_8:
	mov	x0, x20
	mov	x1, x21
	bl	_ath9k_hw_set_reset_reg
	cbz	w0, LBB0_13
; %bb.9:
Lloh19:
	adrp	x8, _ATH9K_PM_AWAKE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ATH9K_PM_AWAKE@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ath9k_hw_setpower
	cbz	w0, LBB0_13
; %bb.10:
	str	wzr, [x20]
	mov	x0, x20
	bl	_AR_SREV_9330
	cbz	x0, LBB0_12
; %bb.11:
	mov	x0, x20
	bl	_ar9003_hw_internal_regulator_apply
LBB0_12:
	mov	x0, x20
	mov	x1, x19
	bl	_ath9k_hw_init_pll
	mov	w0, #1
LBB0_13:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH9K_RESET_WARM,4,2           ; @ATH9K_RESET_WARM
	.comm	_EEP_OL_PWRCTRL,4,2             ; @EEP_OL_PWRCTRL
	.comm	_ATH9K_RESET_POWER_ON,4,2       ; @ATH9K_RESET_POWER_ON
	.comm	_ATH9K_RESET_COLD,4,2           ; @ATH9K_RESET_COLD
	.comm	_AR_Q_TXE,4,2                   ; @AR_Q_TXE
	.comm	_AR_CR,4,2                      ; @AR_CR
	.comm	_AR_CR_RXE,4,2                  ; @AR_CR_RXE
	.comm	_ATH9K_PM_AWAKE,4,2             ; @ATH9K_PM_AWAKE
	.no_dead_strip	_ath9k_hw_chip_reset
.subsections_via_symbols
