	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_hw_set_reset_power_on
_ath9k_hw_set_reset_power_on:           ## @ath9k_hw_set_reset_power_on
	.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
	movq	%rdi, %rbx
	callq	_ENABLE_REGWRITE_BUFFER
	movq	%rbx, %rdi
	callq	_AR_SREV_9300_20_OR_LATER
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_AR_WA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%rbx, %rdi
	callq	_REG_WRITE
	movl	$10, %edi
	callq	_udelay
LBB0_2:
	movq	_AR_RTC_FORCE_WAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_RTC_FORCE_WAKE_EN@GOTPCREL(%rip), %rax
	movq	_AR_RTC_FORCE_WAKE_ON_INT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_REG_WRITE
	movq	%rbx, %rdi
	callq	_AR_SREV_9100
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	callq	_AR_SREV_9300_20_OR_LATER
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_AR_RC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_RC_AHB@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_REG_WRITE
LBB0_5:
	movq	_AR_RTC_RESET@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_REG_WRITE
	movq	%rbx, %rdi
	callq	_REGWRITE_BUFFER_FLUSH
	movl	$2, %edi
	callq	_udelay
	movq	%rbx, %rdi
	callq	_AR_SREV_9100
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	callq	_AR_SREV_9300_20_OR_LATER
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	_AR_RC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_REG_WRITE
LBB0_8:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_REG_WRITE
	movq	_AR_RTC_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_RTC_STATUS_M@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_AR_RTC_STATUS_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_AH_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rdi
	callq	_ath9k_hw_wait
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movq	_ATH9K_RESET_WARM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ath9k_hw_set_reset             ## TAILCALL
LBB0_9:
	movq	%rbx, %rdi
	callq	_ath9k_hw_common
	movq	_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movl	%eax, %edi
	callq	_ath_dbg
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_WA,4,2                      ## @AR_WA
	.comm	_AR_RTC_FORCE_WAKE,4,2          ## @AR_RTC_FORCE_WAKE
	.comm	_AR_RTC_FORCE_WAKE_EN,4,2       ## @AR_RTC_FORCE_WAKE_EN
	.comm	_AR_RTC_FORCE_WAKE_ON_INT,4,2   ## @AR_RTC_FORCE_WAKE_ON_INT
	.comm	_AR_RC,4,2                      ## @AR_RC
	.comm	_AR_RC_AHB,4,2                  ## @AR_RC_AHB
	.comm	_AR_RTC_RESET,4,2               ## @AR_RTC_RESET
	.comm	_AR_RTC_STATUS,4,2              ## @AR_RTC_STATUS
	.comm	_AR_RTC_STATUS_M,4,2            ## @AR_RTC_STATUS_M
	.comm	_AR_RTC_STATUS_ON,4,2           ## @AR_RTC_STATUS_ON
	.comm	_AH_WAIT_TIMEOUT,4,2            ## @AH_WAIT_TIMEOUT
	.comm	_RESET,4,2                      ## @RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RTC not waking up\n"

	.comm	_ATH9K_RESET_WARM,4,2           ## @ATH9K_RESET_WARM
	.no_dead_strip	_ath9k_hw_set_reset_power_on
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_hw_set_reset_power_on
_ath9k_hw_set_reset_power_on:           ; @ath9k_hw_set_reset_power_on
	.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
	mov	x19, x0
	bl	_ENABLE_REGWRITE_BUFFER
	mov	x0, x19
	bl	_AR_SREV_9300_20_OR_LATER
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _AR_WA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR_WA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_REG_WRITE
	mov	w0, #10
	bl	_udelay
LBB0_2:
Lloh3:
	adrp	x8, _AR_RTC_FORCE_WAKE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR_RTC_FORCE_WAKE@GOTPAGEOFF]
Lloh5:
	adrp	x9, _AR_RTC_FORCE_WAKE_EN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AR_RTC_FORCE_WAKE_EN@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	ldr	w8, [x9]
Lloh9:
	adrp	x9, _AR_RTC_FORCE_WAKE_ON_INT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AR_RTC_FORCE_WAKE_ON_INT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_REG_WRITE
	mov	x0, x19
	bl	_AR_SREV_9100
	cbnz	w0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_AR_SREV_9300_20_OR_LATER
	cbnz	x0, LBB0_5
; %bb.4:
Lloh12:
	adrp	x8, _AR_RC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AR_RC@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _AR_RC_AHB@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AR_RC_AHB@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_WRITE
LBB0_5:
Lloh18:
	adrp	x20, _AR_RTC_RESET@GOTPAGE
Lloh19:
	ldr	x20, [x20, _AR_RTC_RESET@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_REG_WRITE
	mov	x0, x19
	bl	_REGWRITE_BUFFER_FLUSH
	mov	w0, #2
	bl	_udelay
	mov	x0, x19
	bl	_AR_SREV_9100
	cbnz	w0, LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_AR_SREV_9300_20_OR_LATER
	cbnz	x0, LBB0_8
; %bb.7:
Lloh20:
	adrp	x8, _AR_RC@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AR_RC@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_REG_WRITE
LBB0_8:
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #1
	bl	_REG_WRITE
Lloh23:
	adrp	x8, _AR_RTC_STATUS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AR_RTC_STATUS@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x8, _AR_RTC_STATUS_M@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AR_RTC_STATUS_M@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
Lloh29:
	adrp	x8, _AR_RTC_STATUS_ON@GOTPAGE
Lloh30:
	ldr	x8, [x8, _AR_RTC_STATUS_ON@GOTPAGEOFF]
Lloh31:
	ldr	w3, [x8]
Lloh32:
	adrp	x8, _AH_WAIT_TIMEOUT@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AH_WAIT_TIMEOUT@GOTPAGEOFF]
Lloh34:
	ldr	w4, [x8]
	mov	x0, x19
	bl	_ath9k_hw_wait
	cbz	w0, LBB0_10
; %bb.9:
Lloh35:
	adrp	x8, _ATH9K_RESET_WARM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ATH9K_RESET_WARM@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ath9k_hw_set_reset
LBB0_10:
	mov	x0, x19
	bl	_ath9k_hw_common
Lloh38:
	adrp	x8, _RESET@GOTPAGE
Lloh39:
	ldr	x8, [x8, _RESET@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
Lloh41:
	adrp	x2, l_.str@PAGE
Lloh42:
	add	x2, x2, l_.str@PAGEOFF
	bl	_ath_dbg
	mov	w0, #0
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_WA,4,2                      ; @AR_WA
	.comm	_AR_RTC_FORCE_WAKE,4,2          ; @AR_RTC_FORCE_WAKE
	.comm	_AR_RTC_FORCE_WAKE_EN,4,2       ; @AR_RTC_FORCE_WAKE_EN
	.comm	_AR_RTC_FORCE_WAKE_ON_INT,4,2   ; @AR_RTC_FORCE_WAKE_ON_INT
	.comm	_AR_RC,4,2                      ; @AR_RC
	.comm	_AR_RC_AHB,4,2                  ; @AR_RC_AHB
	.comm	_AR_RTC_RESET,4,2               ; @AR_RTC_RESET
	.comm	_AR_RTC_STATUS,4,2              ; @AR_RTC_STATUS
	.comm	_AR_RTC_STATUS_M,4,2            ; @AR_RTC_STATUS_M
	.comm	_AR_RTC_STATUS_ON,4,2           ; @AR_RTC_STATUS_ON
	.comm	_AH_WAIT_TIMEOUT,4,2            ; @AH_WAIT_TIMEOUT
	.comm	_RESET,4,2                      ; @RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RTC not waking up\n"

	.comm	_ATH9K_RESET_WARM,4,2           ; @ATH9K_RESET_WARM
	.no_dead_strip	_ath9k_hw_set_reset_power_on
.subsections_via_symbols
