	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9003_hw_spectral_scan_config
_ar9003_hw_spectral_scan_config:        ## @ar9003_hw_spectral_scan_config
	.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
	cmpl	$0, 32(%rsi)
	je	LBB0_7
## %bb.1:
	movq	%rsi, %r14
	movq	_AR_PHY_RADAR_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PHY_RADAR_0_FFT_ENA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_REG_SET_BIT
	movq	_AR_PHY_SPECTRAL_SCAN@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_AR_PHY_SPECTRAL_SCAN_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_REG_SET_BIT
	xorl	%r15d, %r15d
	cmpq	$0, 24(%r14)
	jne	LBB0_3
## %bb.2:
	movl	(%r14), %eax
	testl	%eax, %eax
	movl	$1, %r15d
	cmovnel	%eax, %r15d
LBB0_3:
	cmpq	$0, 16(%r14)
	movl	(%r12), %esi
	movq	_AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	je	LBB0_5
## %bb.4:
	callq	_REG_SET_BIT
	jmp	LBB0_6
LBB0_7:
	movq	_AR_PHY_SPECTRAL_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PHY_SPECTRAL_SCAN_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_CLR_BIT                    ## TAILCALL
LBB0_5:
	callq	_REG_CLR_BIT
LBB0_6:
	movl	(%r12), %esi
	movq	_AR_PHY_SPECTRAL_SCAN_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	callq	_REG_RMW_FIELD
	movl	(%r12), %esi
	movq	_AR_PHY_SPECTRAL_SCAN_PERIOD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	4(%r14), %ecx
	movq	%rbx, %rdi
	callq	_REG_RMW_FIELD
	movl	(%r12), %esi
	movq	_AR_PHY_SPECTRAL_SCAN_FFT_PERIOD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	8(%r14), %ecx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_RMW_FIELD                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_PHY_SPECTRAL_SCAN,4,2       ## @AR_PHY_SPECTRAL_SCAN
	.comm	_AR_PHY_SPECTRAL_SCAN_ENABLE,4,2 ## @AR_PHY_SPECTRAL_SCAN_ENABLE
	.comm	_AR_PHY_RADAR_0,4,2             ## @AR_PHY_RADAR_0
	.comm	_AR_PHY_RADAR_0_FFT_ENA,4,2     ## @AR_PHY_RADAR_0_FFT_ENA
	.comm	_AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT,4,2 ## @AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT
	.comm	_AR_PHY_SPECTRAL_SCAN_COUNT,4,2 ## @AR_PHY_SPECTRAL_SCAN_COUNT
	.comm	_AR_PHY_SPECTRAL_SCAN_PERIOD,4,2 ## @AR_PHY_SPECTRAL_SCAN_PERIOD
	.comm	_AR_PHY_SPECTRAL_SCAN_FFT_PERIOD,4,2 ## @AR_PHY_SPECTRAL_SCAN_FFT_PERIOD
	.no_dead_strip	_ar9003_hw_spectral_scan_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9003_hw_spectral_scan_config
_ar9003_hw_spectral_scan_config:        ; @ar9003_hw_spectral_scan_config
	.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, x0
	ldr	w8, [x1, #32]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x20, x1
Lloh0:
	adrp	x8, _AR_PHY_RADAR_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR_PHY_RADAR_0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _AR_PHY_RADAR_0_FFT_ENA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR_PHY_RADAR_0_FFT_ENA@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_SET_BIT
Lloh6:
	adrp	x22, _AR_PHY_SPECTRAL_SCAN@GOTPAGE
Lloh7:
	ldr	x22, [x22, _AR_PHY_SPECTRAL_SCAN@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh8:
	adrp	x8, _AR_PHY_SPECTRAL_SCAN_ENABLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AR_PHY_SPECTRAL_SCAN_ENABLE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_SET_BIT
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_4
; %bb.2:
	mov	w21, #0
	b	LBB0_5
LBB0_3:
Lloh11:
	adrp	x8, _AR_PHY_SPECTRAL_SCAN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AR_PHY_SPECTRAL_SCAN@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _AR_PHY_SPECTRAL_SCAN_ENABLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AR_PHY_SPECTRAL_SCAN_ENABLE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, 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	_REG_CLR_BIT
LBB0_4:
	ldr	w8, [x20]
	cmp	w8, #0
	csinc	w21, w8, wzr, ne
LBB0_5:
	ldr	x8, [x20, #16]
	ldr	w1, [x22]
Lloh17:
	adrp	x9, _AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x9]
	mov	x0, x19
	cbz	x8, LBB0_7
; %bb.6:
	bl	_REG_SET_BIT
	b	LBB0_8
LBB0_7:
	bl	_REG_CLR_BIT
LBB0_8:
	ldr	w1, [x22]
Lloh20:
	adrp	x8, _AR_PHY_SPECTRAL_SCAN_COUNT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AR_PHY_SPECTRAL_SCAN_COUNT@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x21
	bl	_REG_RMW_FIELD
	ldr	w1, [x22]
Lloh23:
	adrp	x8, _AR_PHY_SPECTRAL_SCAN_PERIOD@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AR_PHY_SPECTRAL_SCAN_PERIOD@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	ldr	w3, [x20, #4]
	mov	x0, x19
	bl	_REG_RMW_FIELD
	ldr	w1, [x22]
Lloh26:
	adrp	x8, _AR_PHY_SPECTRAL_SCAN_FFT_PERIOD@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AR_PHY_SPECTRAL_SCAN_FFT_PERIOD@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	ldr	w3, [x20, #8]
	mov	x0, 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	_REG_RMW_FIELD
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_PHY_SPECTRAL_SCAN,4,2       ; @AR_PHY_SPECTRAL_SCAN
	.comm	_AR_PHY_SPECTRAL_SCAN_ENABLE,4,2 ; @AR_PHY_SPECTRAL_SCAN_ENABLE
	.comm	_AR_PHY_RADAR_0,4,2             ; @AR_PHY_RADAR_0
	.comm	_AR_PHY_RADAR_0_FFT_ENA,4,2     ; @AR_PHY_RADAR_0_FFT_ENA
	.comm	_AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT,4,2 ; @AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT
	.comm	_AR_PHY_SPECTRAL_SCAN_COUNT,4,2 ; @AR_PHY_SPECTRAL_SCAN_COUNT
	.comm	_AR_PHY_SPECTRAL_SCAN_PERIOD,4,2 ; @AR_PHY_SPECTRAL_SCAN_PERIOD
	.comm	_AR_PHY_SPECTRAL_SCAN_FFT_PERIOD,4,2 ; @AR_PHY_SPECTRAL_SCAN_FFT_PERIOD
	.no_dead_strip	_ar9003_hw_spectral_scan_config
.subsections_via_symbols
