	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_hw_ar9330_reset_war
_ath9k_hw_ar9330_reset_war:             ## @ath9k_hw_ar9330_reset_war
	.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, %r15d
	movq	%rdi, %r12
	movq	_AR_NUM_QCU@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_ath9k_hw_numtxpending
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	(%r14), %ebx
	jl	LBB0_2
LBB0_5:
	xorl	%eax, %eax
LBB0_6:
	movl	$1, %r14d
	cmpq	$0, (%r12)
	je	LBB0_12
## %bb.7:
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	_ATH9K_RESET_COLD@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_12
LBB0_9:
	movq	%r12, %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	%r14d, %r14d
	xorl	%eax, %eax
	callq	*(%r12)
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_ath9k_hw_common
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	movl	%ebx, %edx
	callq	_ath_err
	jmp	LBB0_12
LBB0_11:
	movq	_AR_RTC_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %r14d
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_REG_WRITE
LBB0_12:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_NUM_QCU,4,2                 ## @AR_NUM_QCU
	.comm	_ATH9K_RESET_COLD,4,2           ## @ATH9K_RESET_COLD
	.comm	_RESET,4,2                      ## @RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset MAC via external reset\n"

L_.str.1:                               ## @.str.1
	.asciz	"External reset failed, err=%d\n"

	.comm	_AR_RTC_RESET,4,2               ## @AR_RTC_RESET
	.no_dead_strip	_ath9k_hw_ar9330_reset_war
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_hw_ar9330_reset_war
_ath9k_hw_ar9330_reset_war:             ; @ath9k_hw_ar9330_reset_war
	.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
Lloh0:
	adrp	x22, _AR_NUM_QCU@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AR_NUM_QCU@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_ath9k_hw_numtxpending
	cbnz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w21, w21, #1
	ldr	w8, [x22]
	cmp	w21, w8
	b.lt	LBB0_2
; %bb.4:
	mov	w0, #0
LBB0_5:
	ldr	x8, [x19]
	cbnz	x8, LBB0_7
	b	LBB0_9
LBB0_6:
	mov	w0, #0
	ldr	x8, [x19]
	cbz	x8, LBB0_9
LBB0_7:
	cbnz	w0, LBB0_10
; %bb.8:
Lloh2:
	adrp	x8, _ATH9K_RESET_COLD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ATH9K_RESET_COLD@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w20
	b.eq	LBB0_10
LBB0_9:
	mov	w20, #1
	b	LBB0_13
LBB0_10:
	mov	x0, x19
	bl	_ath9k_hw_common
Lloh5:
	adrp	x8, _RESET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RESET@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	bl	_ath_dbg
	ldr	x8, [x19]
	blr	x8
	cbz	w0, LBB0_12
; %bb.11:
	mov	x20, x0
	mov	x0, x19
	bl	_ath9k_hw_common
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_ath_err
	mov	w20, #0
	b	LBB0_13
LBB0_12:
Lloh12:
	adrp	x8, _AR_RTC_RESET@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AR_RTC_RESET@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	w20, #1
	mov	x0, x19
	mov	w2, #1
	bl	_REG_WRITE
LBB0_13:
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_NUM_QCU,4,2                 ; @AR_NUM_QCU
	.comm	_ATH9K_RESET_COLD,4,2           ; @ATH9K_RESET_COLD
	.comm	_RESET,4,2                      ; @RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset MAC via external reset\n"

l_.str.1:                               ; @.str.1
	.asciz	"External reset failed, err=%d\n"

	.comm	_AR_RTC_RESET,4,2               ; @AR_RTC_RESET
	.no_dead_strip	_ath9k_hw_ar9330_reset_war
.subsections_via_symbols
