	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_hw_ani_monitor           ## -- Begin function ath9k_hw_ani_monitor
	.p2align	4, 0x90
_ath9k_hw_ani_monitor:                  ## @ath9k_hw_ani_monitor
	.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
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_ath9k_hw_ani_read_counters
	testl	%eax, %eax
	je	LBB0_10
## %bb.1:
	imull	$1000, 40(%rbx), %eax           ## imm = 0x3E8
	movl	44(%rbx), %ecx
	movl	52(%rbx), %r10d
	cltd
	idivl	%ecx
	imull	$1000, 48(%rbx), %edx           ## imm = 0x3E8
	movslq	%eax, %r14
	movl	%edx, %eax
	cltd
	idivl	%ecx
	movslq	%eax, %r12
	movq	_ANI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	60(%rbx), %r8d
	movl	56(%rbx), %eax
	subq	$8, %rsp
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movq	%r14, %r9
	pushq	%r10
	pushq	%r12
	pushq	%rax
	callq	_ath_dbg
	addq	$32, %rsp
	movl	44(%rbx), %eax
	cmpl	(%rbx), %eax
	jle	LBB0_10
## %bb.2:
	cmpq	%r12, 8(%rbx)
	jle	LBB0_5
## %bb.3:
	cmpq	%r14, 16(%rbx)
	jle	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_ath9k_hw_ani_lower_immunity
	xorl	%eax, %eax
	cmpl	$0, 52(%rbx)
	sete	%al
	jmp	LBB0_9
LBB0_5:
	cmpq	%r14, 24(%rbx)
	jge	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_ath9k_hw_ani_ofdm_err_trigger
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_7:
	cmpq	%r12, 32(%rbx)
	jge	LBB0_10
## %bb.8:
	movq	%rbx, %rdi
	callq	_ath9k_hw_ani_cck_err_trigger
	movl	$1, %eax
LBB0_9:
	movl	%eax, 52(%rbx)
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath9k_ani_restart              ## TAILCALL
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ANI,4,2                        ## @ANI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"listenTime=%d OFDM:%d errs=%d/s CCK:%d errs=%d/s ofdm_turn=%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_hw_ani_monitor           ; -- Begin function ath9k_hw_ani_monitor
	.p2align	2
_ath9k_hw_ani_monitor:                  ; @ath9k_hw_ani_monitor
	.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
	mov	x22, x0
	mov	x0, x19
	bl	_ath9k_hw_ani_read_counters
	cbz	w0, LBB0_10
; %bb.1:
	mov	w8, #1000
	ldp	w9, w3, [x19, #40]
	mul	w9, w9, w8
	sdiv	w9, w9, w3
	sxtw	x20, w9
	ldp	w9, w10, [x19, #48]
	mul	w8, w9, w8
	sdiv	w8, w8, w3
	sxtw	x21, w8
Lloh0:
	adrp	x8, _ANI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ANI@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldp	w6, w4, [x19, #56]
	str	w10, [sp]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	mov	x5, x20
	mov	x7, x21
	bl	_ath_dbg
	ldr	w8, [x19, #44]
	ldr	w9, [x19]
	cmp	w8, w9
	b.le	LBB0_10
; %bb.2:
	ldr	x8, [x19, #8]
	cmp	x8, x21
	b.le	LBB0_5
; %bb.3:
	ldr	x8, [x19, #16]
	cmp	x8, x20
	b.le	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_ath9k_hw_ani_lower_immunity
	ldr	w8, [x19, #52]
	cmp	w8, #0
	cset	w8, eq
	b	LBB0_9
LBB0_5:
	ldr	x8, [x19, #24]
	cmp	x8, x20
	b.ge	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_ath9k_hw_ani_ofdm_err_trigger
	mov	w8, #0
	b	LBB0_9
LBB0_7:
	ldr	x8, [x19, #32]
	cmp	x8, x21
	b.ge	LBB0_10
; %bb.8:
	mov	x0, x19
	bl	_ath9k_hw_ani_cck_err_trigger
	mov	w8, #1
LBB0_9:
	str	w8, [x19, #52]
	mov	x0, x19
	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
	b	_ath9k_ani_restart
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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ANI,4,2                        ; @ANI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"listenTime=%d OFDM:%d errs=%d/s CCK:%d errs=%d/s ofdm_turn=%d\n"

.subsections_via_symbols
