	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_hw_reset_calvalid        ## -- Begin function ath9k_hw_reset_calvalid
	.p2align	4, 0x90
_ath9k_hw_reset_calvalid:               ## @ath9k_hw_reset_calvalid
	.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
	movq	%rdi, %rbx
	callq	_ath9k_hw_common
	movl	$1, %r14d
	cmpq	$0, 8(%rbx)
	je	LBB0_8
## %bb.1:
	movq	%rax, %r15
	movq	24(%rbx), %r12
	movq	%rbx, %rdi
	callq	_AR_SREV_9100
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_AR_SREV_9160_10_OR_LATER
	testl	%eax, %eax
	je	LBB0_8
LBB0_3:
	testq	%r12, %r12
	je	LBB0_8
## %bb.4:
	movq	(%r12), %rcx
	movq	_CAL_DONE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_5
## %bb.6:
	movq	8(%r12), %rax
	movl	(%rax), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_8
## %bb.7:
	movq	_CALIBRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %r8d
	leaq	L_.str.1(%rip), %rdx
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_ath_dbg
	movq	8(%r12), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	8(%rbx), %rcx
	andl	%eax, (%rcx)
	movq	_CAL_WAITING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	jmp	LBB0_8
LBB0_5:
	movq	_CALIBRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_ath_dbg
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CAL_DONE,8,3                   ## @CAL_DONE
	.comm	_CALIBRATE,4,2                  ## @CALIBRATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Calibration state incorrect, %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Resetting Cal %d state for channel %u\n"

	.comm	_CAL_WAITING,8,3                ## @CAL_WAITING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_hw_reset_calvalid        ; -- Begin function ath9k_hw_reset_calvalid
	.p2align	2
_ath9k_hw_reset_calvalid:               ; @ath9k_hw_reset_calvalid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	bl	_ath9k_hw_common
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_9
; %bb.1:
	mov	x20, x0
	ldr	x21, [x19, #24]
	mov	x0, x19
	bl	_AR_SREV_9100
	cbz	w0, LBB0_3
; %bb.2:
	cbnz	x21, LBB0_5
	b	LBB0_9
LBB0_3:
	mov	x0, x19
	bl	_AR_SREV_9160_10_OR_LATER
	mov	x8, x0
	mov	w0, #1
	cbz	w8, LBB0_10
; %bb.4:
	cbz	x21, LBB0_10
LBB0_5:
	ldr	x3, [x21]
Lloh0:
	adrp	x8, _CAL_DONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAL_DONE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x3, x8
	b.ne	LBB0_8
; %bb.6:
	ldr	w8, [x19]
	ldr	x9, [x21, #8]
	ldr	w3, [x9]
	tst	w3, w8
	b.eq	LBB0_9
; %bb.7:
Lloh3:
	adrp	x8, _CALIBRATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CALIBRATE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_ath_dbg
	mov	w0, #0
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	ldr	w10, [x9]
	bic	w8, w10, w8
	str	w8, [x9]
Lloh8:
	adrp	x8, _CAL_WAITING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CAL_WAITING@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x21]
	b	LBB0_10
LBB0_8:
Lloh11:
	adrp	x8, _CALIBRATE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CALIBRATE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_ath_dbg
LBB0_9:
	mov	w0, #1
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_CAL_DONE,8,3                   ; @CAL_DONE
	.comm	_CALIBRATE,4,2                  ; @CALIBRATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Calibration state incorrect, %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Resetting Cal %d state for channel %u\n"

	.comm	_CAL_WAITING,8,3                ; @CAL_WAITING
.subsections_via_symbols
