	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9003_hw_spur_ofdm_work
_ar9003_hw_spur_ofdm_work:              ## @ar9003_hw_spur_ofdm_work
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r15d
	movl	%ecx, %r14d
	movl	%edx, %ebx
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_IS_CHAN_HT40
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	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	%r12, %rdi
	callq	_REG_READ_FIELD
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	testl	%eax, %eax
	setne	%cl
	sete	%dl
	movl	%ebx, %eax
	shll	$9, %eax
	leal	-5120(%rax), %esi
	addl	$5120, %eax                     ## imm = 0x1400
	testl	%ebx, %ebx
	cmovsl	%edx, %ecx
	cmovnsl	%esi, %eax
	movzbl	%cl, %r8d
	movl	$17, %ecx
	jmp	LBB0_3
LBB0_2:
	movl	%ebx, %eax
	shll	$9, %eax
	xorl	%r8d, %r8d
	movl	$18, %ecx
LBB0_3:
	movl	%ebx, %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	cltq
	imulq	$780903145, %rax, %rdx          ## imm = 0x2E8BA2E9
	movq	%rdx, %rax
	shrq	$63, %rax
	shrq	$33, %rdx
	addl	%eax, %edx
	movslq	%esi, %rax
	imulq	$1717986919, %rax, %rcx         ## imm = 0x66666667
	movq	%rcx, %rax
	shrq	$63, %rax
	shrq	$33, %rcx
	addl	%eax, %ecx
	andl	$1023, %edx                     ## imm = 0x3FF
	andl	$1048575, %ecx                  ## imm = 0xFFFFF
	movl	%r15d, (%rsp)
	movq	%r12, %rdi
	movl	%ebx, %esi
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%r14d, %r9d
	callq	_ar9003_hw_spur_ofdm
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	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
	.no_dead_strip	_ar9003_hw_spur_ofdm_work
.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_ofdm_work
_ar9003_hw_spur_ofdm_work:              ; @ar9003_hw_spur_ofdm_work
	.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	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x0
	mov	x0, x1
	bl	_IS_CHAN_HT40
	cbz	x0, LBB0_2
; %bb.1:
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, x22
	bl	_REG_READ_FIELD
	cmp	w0, #0
	cset	w8, ne
	cset	w9, eq
	mov	w10, #5120
	cmp	w21, #0
	csel	w4, w9, w8, lt
	cneg	w8, w10, ge
	add	w8, w8, w21, lsl #9
	mov	w9, #17
	b	LBB0_3
LBB0_2:
	mov	w4, #0
	lsl	w8, w21, #9
	mov	w9, #18
LBB0_3:
	lsl	w9, w21, w9
	mov	w10, #41705
	movk	w10, #11915, lsl #16
	smull	x8, w8, w10
	lsr	x10, x8, #63
	lsr	x8, x8, #33
	add	w8, w8, w10
	mov	w10, #26215
	movk	w10, #26214, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	lsr	x9, x9, #33
	add	w9, w9, w10
	and	w2, w8, #0x3ff
	and	w3, w9, #0xfffff
	mov	x0, x22
	mov	x1, x21
	mov	x5, x20
	mov	x6, x19
	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
	b	_ar9003_hw_spur_ofdm
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.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
	.no_dead_strip	_ar9003_hw_spur_ofdm_work
.subsections_via_symbols
