	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9003_hw_spur_mitigate_ofdm
_ar9003_hw_spur_mitigate_ofdm:          ## @ar9003_hw_spur_mitigate_ofdm
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_IS_CHAN_5GHZ
	xorl	%ecx, %ecx
	xorl	%r12d, %r12d
	testq	%rax, %rax
	setne	%cl
	sete	%r15b
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx,%rcx,8), %r14
	cmpq	$0, (%r14)
	je	LBB0_16
## %bb.1:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_IS_CHAN_HT40
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	_AR_PHY_GEN_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PHY_GC_DYN2040_PRI_CH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_REG_READ_FIELD
	movl	(%rbx), %ebx
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	addl	$10, %ebx
	jmp	LBB0_6
LBB0_4:
	movl	(%rbx), %ebx
	movl	$10, %r13d
	jmp	LBB0_7
LBB0_5:
	addl	$-10, %ebx
LBB0_6:
	movl	$19, %r13d
LBB0_7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ar9003_hw_spur_ofdm_clear
	movq	_AR_EEPROM_MODAL_SPURS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_16
## %bb.8:
	movb	%r15b, %r12b
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %eax
	movq	(%r14,%rax,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%r12d, %esi
	callq	_ath9k_hw_fbin2freq
	subl	%ebx, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	cmpl	%r13d, %ecx
	jb	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%r15
	movq	_AR_EEPROM_MODAL_SPURS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jb	LBB0_9
	jmp	LBB0_16
LBB0_12:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	callq	_ar9003_hw_spur_ofdm_work
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_AR_SREV_9565
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	cmpl	$3, %r15d
	ja	LBB0_16
## %bb.14:
	movq	8(%r14,%r15,8), %rdi
	movl	%r12d, %esi
	callq	_ath9k_hw_fbin2freq
	subl	%ebx, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	cmpl	%r13d, %ecx
	jae	LBB0_16
## %bb.15:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ar9003_hw_spur_ofdm_9565       ## TAILCALL
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_PHY_GEN_CTRL,4,2            ## @AR_PHY_GEN_CTRL
	.comm	_AR_PHY_GC_DYN2040_PRI_CH,4,2   ## @AR_PHY_GC_DYN2040_PRI_CH
	.comm	_AR_EEPROM_MODAL_SPURS,4,2      ## @AR_EEPROM_MODAL_SPURS
	.no_dead_strip	_ar9003_hw_spur_mitigate_ofdm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9003_hw_spur_mitigate_ofdm
_ar9003_hw_spur_mitigate_ofdm:          ; @ar9003_hw_spur_mitigate_ofdm
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x19, x0
	mov	x0, x1
	bl	_IS_CHAN_5GHZ
	cmp	x0, #0
	cset	w8, ne
	cset	w20, eq
	ldr	x24, [x19, w8, uxtw #3]
	ldr	x8, [x24]
	cbz	x8, LBB0_13
; %bb.1:
	mov	x0, x21
	bl	_IS_CHAN_HT40
	cbz	x0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _AR_PHY_GEN_CTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR_PHY_GEN_CTRL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _AR_PHY_GC_DYN2040_PRI_CH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR_PHY_GC_DYN2040_PRI_CH@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_READ_FIELD
	ldr	w8, [x21]
	add	w9, w8, #10
	mov	w10, #19
	sub	w8, w8, #10
	mov	w11, #19
	cmp	w0, #0
	csel	w22, w10, w11, ne
	csel	w23, w9, w8, ne
	b	LBB0_4
LBB0_3:
	ldr	w23, [x21]
	mov	w22, #10
LBB0_4:
	mov	x0, x19
	bl	_ar9003_hw_spur_ofdm_clear
Lloh6:
	adrp	x26, _AR_EEPROM_MODAL_SPURS@GOTPAGE
Lloh7:
	ldr	x26, [x26, _AR_EEPROM_MODAL_SPURS@GOTPAGEOFF]
	ldr	w8, [x26]
	cbz	w8, LBB0_13
; %bb.5:
	mov	x25, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24, w25, uxtw #3]
	cbz	x0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x1, x20
	bl	_ath9k_hw_fbin2freq
	subs	w2, w0, w23
	cneg	w8, w2, mi
	cmp	w8, w22
	b.lo	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x26]
	add	x25, x25, #1
	cmp	w25, w8
	b.lo	LBB0_6
	b	LBB0_13
LBB0_9:
	mov	x0, x19
	mov	x1, x21
	mov	x3, x22
	mov	x4, x23
	bl	_ar9003_hw_spur_ofdm_work
	mov	x0, x19
	bl	_AR_SREV_9565
	cbz	x0, LBB0_13
; %bb.10:
	cmp	w25, #3
	b.hi	LBB0_13
; %bb.11:
	add	x8, x24, x25, lsl #3
	ldr	x0, [x8, #8]
	mov	x1, x20
	bl	_ath9k_hw_fbin2freq
	subs	w1, w0, w23
	cneg	w8, w1, mi
	cmp	w8, w22
	b.hs	LBB0_13
; %bb.12:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ar9003_hw_spur_ofdm_9565
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_PHY_GEN_CTRL,4,2            ; @AR_PHY_GEN_CTRL
	.comm	_AR_PHY_GC_DYN2040_PRI_CH,4,2   ; @AR_PHY_GC_DYN2040_PRI_CH
	.comm	_AR_EEPROM_MODAL_SPURS,4,2      ; @AR_EEPROM_MODAL_SPURS
	.no_dead_strip	_ar9003_hw_spur_mitigate_ofdm
.subsections_via_symbols
