	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7615_dfs_init_radar_detector ## -- Begin function mt7615_dfs_init_radar_detector
	.p2align	4, 0x90
_mt7615_dfs_init_radar_detector:        ## @mt7615_dfs_init_radar_detector
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	8(%rdi), %rax
	movq	_NL80211_DFS_UNSET@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	movq	_MT76_SCANNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%rbx), %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_8
## %bb.2:
	movq	24(%rbx), %rcx
	movq	(%rcx), %rax
	cmpq	%rax, (%rbx)
	jne	LBB0_3
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movq	%rax, (%rbx)
	movq	_IEEE80211_CHAN_RADAR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 8(%rcx)
	je	LBB0_6
## %bb.4:
	movq	_NL80211_DFS_AVAILABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.5:
	movq	_RDD_CAC_END@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MT_HW_RDD0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MT_RX_SEL0@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mt7615_mcu_rdd_cmd             ## TAILCALL
LBB0_6:
	movq	_RDD_NORMAL_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MT_HW_RDD0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MT_RX_SEL0@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	callq	_mt7615_mcu_rdd_cmd
	testl	%eax, %eax
	js	LBB0_7
## %bb.10:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mt7615_dfs_stop_radar_detector ## TAILCALL
LBB0_9:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mt7615_dfs_start_radar_detector ## TAILCALL
LBB0_7:
	movl	%eax, %r14d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_NL80211_DFS_UNSET,8,3          ## @NL80211_DFS_UNSET
	.comm	_MT76_SCANNING,4,2              ## @MT76_SCANNING
	.comm	_IEEE80211_CHAN_RADAR,4,2       ## @IEEE80211_CHAN_RADAR
	.comm	_NL80211_DFS_AVAILABLE,8,3      ## @NL80211_DFS_AVAILABLE
	.comm	_RDD_CAC_END,4,2                ## @RDD_CAC_END
	.comm	_MT_HW_RDD0,4,2                 ## @MT_HW_RDD0
	.comm	_MT_RX_SEL0,4,2                 ## @MT_RX_SEL0
	.comm	_RDD_NORMAL_START,4,2           ## @RDD_NORMAL_START
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7615_dfs_init_radar_detector ; -- Begin function mt7615_dfs_init_radar_detector
	.p2align	2
_mt7615_dfs_init_radar_detector:        ; @mt7615_dfs_init_radar_detector
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _NL80211_DFS_UNSET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NL80211_DFS_UNSET@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _MT76_SCANNING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT76_SCANNING@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, x19, #16
	bl	_test_bit
	cbnz	x0, LBB0_3
; %bb.2:
	ldr	x10, [x19]
	ldr	x9, [x19, #24]
	ldr	x8, [x9]
	cmp	x10, x8
	b.ne	LBB0_5
LBB0_3:
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	str	x8, [x19]
	ldr	w9, [x9, #8]
Lloh6:
	adrp	x10, _IEEE80211_CHAN_RADAR@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IEEE80211_CHAN_RADAR@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_8
; %bb.6:
Lloh9:
	adrp	x9, _NL80211_DFS_AVAILABLE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _NL80211_DFS_AVAILABLE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.7:
Lloh12:
	adrp	x8, _RDD_CAC_END@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RDD_CAC_END@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _MT_HW_RDD0@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MT_HW_RDD0@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
Lloh18:
	adrp	x8, _MT_RX_SEL0@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MT_RX_SEL0@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w4, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mt7615_mcu_rdd_cmd
LBB0_8:
Lloh21:
	adrp	x8, _RDD_NORMAL_START@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RDD_NORMAL_START@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _MT_HW_RDD0@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MT_HW_RDD0@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
Lloh27:
	adrp	x8, _MT_RX_SEL0@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MT_RX_SEL0@GOTPAGEOFF]
Lloh29:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w4, #0
	bl	_mt7615_mcu_rdd_cmd
	tbnz	w0, #31, LBB0_4
; %bb.9:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mt7615_dfs_stop_radar_detector
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mt7615_dfs_start_radar_detector
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_NL80211_DFS_UNSET,8,3          ; @NL80211_DFS_UNSET
	.comm	_MT76_SCANNING,4,2              ; @MT76_SCANNING
	.comm	_IEEE80211_CHAN_RADAR,4,2       ; @IEEE80211_CHAN_RADAR
	.comm	_NL80211_DFS_AVAILABLE,8,3      ; @NL80211_DFS_AVAILABLE
	.comm	_RDD_CAC_END,4,2                ; @RDD_CAC_END
	.comm	_MT_HW_RDD0,4,2                 ; @MT_HW_RDD0
	.comm	_MT_RX_SEL0,4,2                 ; @MT_RX_SEL0
	.comm	_RDD_NORMAL_START,4,2           ; @RDD_NORMAL_START
.subsections_via_symbols
