	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8821ae_dm_dynamic_atc_switch
_rtl8821ae_dm_dynamic_atc_switch:       ## @rtl8821ae_dm_dynamic_atc_switch
	.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
	callq	_rtl_priv
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_dm
	movq	%rax, %r13
	movq	40(%r14), %rax
	movq	_MAC80211_LINKED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_6
## %bb.1:
	movq	(%r13), %rax
	movq	_ATC_STATUS_OFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	_RFC_AREA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	$14, %edi
	callq	_BIT
	movq	_ATC_STATUS_ON@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_rtl_set_bbreg
	movslq	(%r15), %rax
	movq	%rax, (%r13)
LBB0_3:
	movq	_COMP_DIG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
	movl	(%r15), %esi
	movl	(%r12), %edx
	movq	(%r13), %r8
	leaq	L_.str.1(%rip), %rcx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
	movl	32(%r14), %eax
	cmpl	%eax, 8(%r13)
	je	LBB0_5
## %bb.4:
	movl	%eax, 8(%r13)
	andl	$63, %eax
	movq	(%r14), %rdx
	movq	_HARDWARE_TYPE_RTL8812AE@GOTPCREL(%rip), %rsi
	movl	%eax, %ecx
	shll	$6, %ecx
	orl	%eax, %ecx
	cmpq	(%rsi), %rdx
	movq	_REG_MAC_PHY_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2146959360, %eax               ## imm = 0x7FF80000
	movl	$16773120, %edx                 ## imm = 0xFFF000
	cmovel	%eax, %edx
	movq	%rbx, %rdi
	callq	_rtl_set_bbreg
LBB0_5:
	movl	(%r15), %esi
	movl	(%r12), %edx
	movl	8(%r13), %r8d
	leaq	L_.str.2(%rip), %rcx
	jmp	LBB0_33
LBB0_6:
	movq	24(%r13), %r8
	cmpq	32(%r13), %r8
	jne	LBB0_8
## %bb.7:
	movq	_COMP_DIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rcx
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RT_TRACE                       ## TAILCALL
LBB0_8:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	16(%r13), %rax
	imull	$3125, 4(%rax), %ecx            ## imm = 0xC35
	movslq	%ecx, %rcx
	imulq	$1717986919, %rcx, %r12         ## imm = 0x66666667
	movq	%r12, %rcx
	shrq	$63, %rcx
	shrq	$32, %r12
	sarl	$9, %r12d
	imull	$3125, (%rax), %eax             ## imm = 0xC35
	addl	%ecx, %r12d
	cltq
	imulq	$1717986919, %rax, %rbx         ## imm = 0x66666667
	movq	%rbx, %rax
	shrq	$63, %rax
	shrq	$32, %rbx
	sarl	$9, %ebx
	addl	%eax, %ebx
	movq	%r8, 32(%r13)
	movq	_COMP_DIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.4(%rip), %rcx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
	movq	24(%r14), %rax
	movq	_RF_1T1R@GOTPCREL(%rip), %rcx
	leal	(%rbx,%r12), %r15d
	sarl	%r15d
	cmpq	(%rcx), %rax
	cmovel	%ebx, %r15d
	movq	_COMP_DIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, (%rsp)
	leaq	L_.str.5(%rip), %rcx
	movq	%r14, %rdi
	movl	%ebx, %r8d
	movl	%r12d, %r9d
	xorl	%eax, %eax
	callq	_RT_TRACE
	movl	40(%r13), %eax
	movl	%eax, %ecx
	subl	%r15d, %ecx
	negl	%ecx
	subl	%r15d, %eax
	cmovll	%ecx, %eax
	cmpl	$21, %eax
	jl	LBB0_10
## %bb.9:
	cmpl	$0, 44(%r13)
	je	LBB0_16
LBB0_10:
	movl	$0, 44(%r13)
	movl	%r15d, 40(%r13)
	movl	48(%r13), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmpl	%ecx, %r15d
	jl	LBB0_14
## %bb.11:
	cmpl	%eax, %r15d
	movq	_COMP_DIG@GOTPCREL(%rip), %rbx
	jg	LBB0_15
## %bb.12:
	cmpl	$0, 52(%r13)
	je	LBB0_17
LBB0_15:
	movl	%eax, %r8d
	jmp	LBB0_20
LBB0_14:
	movl	%eax, %r8d
	movq	_COMP_DIG@GOTPCREL(%rip), %rbx
	jmp	LBB0_20
LBB0_16:
	movq	_COMP_DIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.6(%rip), %rcx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
	movl	$1, 44(%r13)
	jmp	LBB0_34
LBB0_17:
	movq	_CFO_THRESHOLD_XTAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	cmpl	%r8d, %eax
	jne	LBB0_19
## %bb.18:
	addl	$10, %eax
	movl	%eax, 48(%r13)
	movl	$1, 52(%r13)
	movl	%eax, %r8d
	jmp	LBB0_20
LBB0_19:
	movl	%r8d, 48(%r13)
LBB0_20:
	movl	(%rbx), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.7(%rip), %rcx
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
	cmpl	48(%r13), %r15d
	jle	LBB0_23
## %bb.21:
	cmpl	$62, 8(%r13)
	jg	LBB0_23
## %bb.22:
	movq	_CFO_THRESHOLD_XTAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	sarl	$2, %r15d
	incl	%r15d
	jmp	LBB0_26
LBB0_23:
	xorl	%eax, %eax
	subl	8(%r14), %eax
	cmpl	%eax, %r15d
	jge	LBB0_27
## %bb.24:
	cmpq	$0, 16(%r14)
	jle	LBB0_27
## %bb.25:
	movq	_CFO_THRESHOLD_XTAL@GOTPCREL(%rip), %rax
	addl	(%rax), %r15d
	sarl	$2, %r15d
	decl	%r15d
LBB0_26:
	movl	%r15d, %r12d
LBB0_27:
	movl	(%rbx), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	8(%r13), %r8d
	leaq	L_.str.8(%rip), %rcx
	movq	%r14, %rdi
	movl	%r12d, %r9d
	xorl	%eax, %eax
	callq	_RT_TRACE
	testl	%r12d, %r12d
	je	LBB0_34
## %bb.28:
	movl	$0, 52(%r13)
	addl	8(%r13), %r12d
	movl	%r12d, 8(%r13)
	movl	$63, %eax
	cmpl	$63, %r12d
	jg	LBB0_31
## %bb.29:
	testl	%r12d, %r12d
	jns	LBB0_32
## %bb.30:
	xorl	%eax, %eax
LBB0_31:
	movl	%eax, 8(%r13)
	movl	%eax, %r12d
LBB0_32:
	movq	(%r14), %rax
	movq	_HARDWARE_TYPE_RTL8812AE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	$2146959360, %eax               ## imm = 0x7FF80000
	movl	$16773120, %edx                 ## imm = 0xFFF000
	cmovel	%eax, %edx
	movq	_REG_MAC_PHY_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %ecx
	shll	$6, %ecx
	addl	%r12d, %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_rtl_set_bbreg
	movl	(%rbx), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	8(%r13), %r8d
	leaq	L_.str.9(%rip), %rcx
LBB0_33:
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RT_TRACE                       ## TAILCALL
LBB0_34:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAC80211_LINKED,8,3            ## @MAC80211_LINKED
	.comm	_ATC_STATUS_OFF,8,3             ## @ATC_STATUS_OFF
	.comm	_RFC_AREA,4,2                   ## @RFC_AREA
	.comm	_ATC_STATUS_ON,4,2              ## @ATC_STATUS_ON
	.comm	_COMP_DIG,4,2                   ## @COMP_DIG
	.comm	_DBG_LOUD,4,2                   ## @DBG_LOUD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No link!!\n"

L_.str.1:                               ## @.str.1
	.asciz	"atc_status = %d\n"

	.comm	_HARDWARE_TYPE_RTL8812AE,8,3    ## @HARDWARE_TYPE_RTL8812AE
	.comm	_REG_MAC_PHY_CTRL,4,2           ## @REG_MAC_PHY_CTRL
L_.str.2:                               ## @.str.2
	.asciz	"crystal_cap = 0x%x\n"

L_.str.3:                               ## @.str.3
	.asciz	"packet counter doesn't change\n"

L_.str.4:                               ## @.str.4
	.asciz	"packet counter = %d\n"

	.comm	_RF_1T1R,8,3                    ## @RF_1T1R
L_.str.5:                               ## @.str.5
	.asciz	"cfo_khz_a = %dkHz, cfo_khz_b = %dkHz, cfo_ave = %dkHz\n"

L_.str.6:                               ## @.str.6
	.asciz	"first large CFO hit\n"

	.comm	_CFO_THRESHOLD_XTAL,4,2         ## @CFO_THRESHOLD_XTAL
L_.str.7:                               ## @.str.7
	.asciz	"Dynamic threshold = %d\n"

L_.str.8:                               ## @.str.8
	.asciz	"Crystal cap = 0x%x, Crystal cap offset = %d\n"

L_.str.9:                               ## @.str.9
	.asciz	"New crystal cap = 0x%x\n"

	.no_dead_strip	_rtl8821ae_dm_dynamic_atc_switch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8821ae_dm_dynamic_atc_switch
_rtl8821ae_dm_dynamic_atc_switch:       ; @rtl8821ae_dm_dynamic_atc_switch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x0
	bl	_rtl_priv
	mov	x19, x0
	mov	x0, x21
	bl	_rtl_priv
	bl	_rtl_dm
	mov	x20, x0
	ldr	x8, [x19, #40]
Lloh0:
	adrp	x9, _MAC80211_LINKED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAC80211_LINKED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.1:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _ATC_STATUS_OFF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATC_STATUS_OFF@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _RFC_AREA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RFC_AREA@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
	mov	w0, #14
	bl	_BIT
	mov	x2, x0
Lloh9:
	adrp	x23, _ATC_STATUS_ON@GOTPAGE
Lloh10:
	ldr	x23, [x23, _ATC_STATUS_ON@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x0, x21
	mov	x1, x22
	bl	_rtl_set_bbreg
	ldrsw	x8, [x23]
	str	x8, [x20]
LBB0_3:
Lloh11:
	adrp	x22, _COMP_DIG@GOTPAGE
Lloh12:
	ldr	x22, [x22, _COMP_DIG@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh13:
	adrp	x23, _DBG_LOUD@GOTPAGE
Lloh14:
	ldr	x23, [x23, _DBG_LOUD@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh15:
	adrp	x3, l_.str@PAGE
Lloh16:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	ldr	w1, [x22]
	ldr	w2, [x23]
	ldr	x8, [x20]
	str	x8, [sp]
Lloh17:
	adrp	x3, l_.str.1@PAGE
Lloh18:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	ldr	w9, [x20, #8]
	ldr	w8, [x19, #32]
	cmp	w9, w8
	b.eq	LBB0_5
; %bb.4:
	str	w8, [x20, #8]
	and	w3, w8, #0x3f
	ldr	x8, [x19]
Lloh19:
	adrp	x9, _HARDWARE_TYPE_RTL8812AE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _HARDWARE_TYPE_RTL8812AE@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
Lloh22:
	adrp	x10, _REG_MAC_PHY_CTRL@GOTPAGE
Lloh23:
	ldr	x10, [x10, _REG_MAC_PHY_CTRL@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x10]
	bfi	w3, w3, #6, #6
	cmp	x8, x9
	mov	w8, #16773120
	mov	w9, #2146959360
	csel	w2, w9, w8, eq
	mov	x0, x21
	bl	_rtl_set_bbreg
LBB0_5:
	ldr	w1, [x22]
	ldr	w2, [x23]
	ldr	w8, [x20, #8]
	str	x8, [sp]
Lloh25:
	adrp	x3, l_.str.2@PAGE
Lloh26:
	add	x3, x3, l_.str.2@PAGEOFF
	b	LBB0_30
LBB0_6:
	ldp	x8, x9, [x20, #24]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
Lloh27:
	adrp	x8, _COMP_DIG@GOTPAGE
Lloh28:
	ldr	x8, [x8, _COMP_DIG@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x8, _DBG_LOUD@GOTPAGE
Lloh31:
	ldr	x8, [x8, _DBG_LOUD@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
Lloh33:
	adrp	x3, l_.str.3@PAGE
Lloh34:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_RT_TRACE
LBB0_8:
	ldr	x9, [x20, #16]
	mov	w10, #3125
	ldp	w9, w11, [x9]
	mul	w11, w11, w10
	mov	w12, #26215
	movk	w12, #26214, lsl #16
	smull	x11, w11, w12
	lsr	x13, x11, #32
	lsr	x11, x11, #63
	add	w25, w11, w13, asr #9
	mul	w9, w9, w10
	smull	x9, w9, w12
	lsr	x10, x9, #32
	lsr	x9, x9, #63
	add	w26, w9, w10, asr #9
	str	x8, [x20, #32]
Lloh35:
	adrp	x22, _COMP_DIG@GOTPAGE
Lloh36:
	ldr	x22, [x22, _COMP_DIG@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh37:
	adrp	x23, _DBG_LOUD@GOTPAGE
Lloh38:
	ldr	x23, [x23, _DBG_LOUD@GOTPAGEOFF]
	ldr	w2, [x23]
	str	x8, [sp]
Lloh39:
	adrp	x3, l_.str.4@PAGE
Lloh40:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	ldr	x8, [x19, #24]
Lloh41:
	adrp	x9, _RF_1T1R@GOTPAGE
Lloh42:
	ldr	x9, [x9, _RF_1T1R@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	add	w10, w26, w25
	asr	w10, w10, #1
	cmp	x8, x9
	csel	w24, w26, w10, eq
	ldr	w1, [x22]
	ldr	w2, [x23]
	stp	x26, x25, [sp]
	str	x24, [sp, #16]
Lloh44:
	adrp	x3, l_.str.5@PAGE
Lloh45:
	add	x3, x3, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	ldr	w8, [x20, #40]
	sub	w9, w24, w8
	subs	w8, w8, w24
	csel	w8, w9, w8, lt
	cmp	w8, #21
	b.lt	LBB0_10
; %bb.9:
	ldr	w8, [x20, #44]
	cbz	w8, LBB0_14
LBB0_10:
	stp	w24, wzr, [x20, #40]
	ldr	w8, [x20, #48]
	neg	w9, w8
	cmp	w24, w9
	ccmp	w24, w8, #0, ge
	b.gt	LBB0_16
; %bb.11:
	ldr	w9, [x20, #52]
	cbnz	w9, LBB0_16
; %bb.12:
Lloh46:
	adrp	x9, _CFO_THRESHOLD_XTAL@GOTPAGE
Lloh47:
	ldr	x9, [x9, _CFO_THRESHOLD_XTAL@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_15
; %bb.13:
	add	w8, w8, #10
	mov	w9, #1
	stp	w8, w9, [x20, #48]
	b	LBB0_16
LBB0_14:
	ldr	w1, [x22]
	ldr	w2, [x23]
Lloh49:
	adrp	x3, l_.str.6@PAGE
Lloh50:
	add	x3, x3, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	mov	w8, #1
	str	w8, [x20, #44]
	b	LBB0_31
LBB0_15:
	str	w9, [x20, #48]
	mov	x8, x9
LBB0_16:
	ldr	w1, [x22]
	ldr	w2, [x23]
	str	x8, [sp]
Lloh51:
	adrp	x3, l_.str.7@PAGE
Lloh52:
	add	x3, x3, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	ldr	w8, [x20, #48]
	cmp	w24, w8
	b.le	LBB0_19
; %bb.17:
	ldr	w8, [x20, #8]
	cmp	w8, #62
	b.gt	LBB0_19
; %bb.18:
Lloh53:
	adrp	x8, _CFO_THRESHOLD_XTAL@GOTPAGE
Lloh54:
	ldr	x8, [x8, _CFO_THRESHOLD_XTAL@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	sub	w8, w24, w8
	asr	w8, w8, #2
	add	w25, w8, #1
	b	LBB0_23
LBB0_19:
	mov	w25, #0
	ldr	w8, [x19, #8]
	neg	w8, w8
	cmp	w24, w8
	b.ge	LBB0_23
; %bb.20:
	ldr	x8, [x19, #16]
	cmp	x8, #1
	b.lt	LBB0_22
; %bb.21:
Lloh56:
	adrp	x8, _CFO_THRESHOLD_XTAL@GOTPAGE
Lloh57:
	ldr	x8, [x8, _CFO_THRESHOLD_XTAL@GOTPAGEOFF]
Lloh58:
	ldr	w8, [x8]
	add	w8, w8, w24
	asr	w8, w8, #2
	sub	w25, w8, #1
	b	LBB0_23
LBB0_22:
	mov	w25, #0
LBB0_23:
	ldr	w1, [x22]
	ldr	w2, [x23]
	ldr	w8, [x20, #8]
	stp	x8, x25, [sp]
Lloh59:
	adrp	x3, l_.str.8@PAGE
Lloh60:
	add	x3, x3, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	cbz	w25, LBB0_31
; %bb.24:
	str	wzr, [x20, #52]
	ldr	w8, [x20, #8]
	add	w8, w8, w25
	str	w8, [x20, #8]
	cmp	w8, #63
	b.le	LBB0_26
; %bb.25:
	mov	w8, #63
	b	LBB0_28
LBB0_26:
	tbz	w8, #31, LBB0_29
; %bb.27:
	mov	w8, #0
LBB0_28:
	str	w8, [x20, #8]
LBB0_29:
	ldr	x9, [x19]
Lloh61:
	adrp	x10, _HARDWARE_TYPE_RTL8812AE@GOTPAGE
Lloh62:
	ldr	x10, [x10, _HARDWARE_TYPE_RTL8812AE@GOTPAGEOFF]
Lloh63:
	ldr	x10, [x10]
	cmp	x9, x10
	mov	w9, #16773120
	mov	w10, #2146959360
	csel	w2, w10, w9, eq
Lloh64:
	adrp	x9, _REG_MAC_PHY_CTRL@GOTPAGE
Lloh65:
	ldr	x9, [x9, _REG_MAC_PHY_CTRL@GOTPAGEOFF]
Lloh66:
	ldr	w1, [x9]
	add	w3, w8, w8, lsl #6
	mov	x0, x21
	bl	_rtl_set_bbreg
	ldr	w1, [x22]
	ldr	w2, [x23]
	ldr	w8, [x20, #8]
	str	x8, [sp]
Lloh67:
	adrp	x3, l_.str.9@PAGE
Lloh68:
	add	x3, x3, l_.str.9@PAGEOFF
LBB0_30:
	mov	x0, x19
	bl	_RT_TRACE
LBB0_31:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpAdd	Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.cfi_endproc
                                        ; -- End function
	.comm	_MAC80211_LINKED,8,3            ; @MAC80211_LINKED
	.comm	_ATC_STATUS_OFF,8,3             ; @ATC_STATUS_OFF
	.comm	_RFC_AREA,4,2                   ; @RFC_AREA
	.comm	_ATC_STATUS_ON,4,2              ; @ATC_STATUS_ON
	.comm	_COMP_DIG,4,2                   ; @COMP_DIG
	.comm	_DBG_LOUD,4,2                   ; @DBG_LOUD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No link!!\n"

l_.str.1:                               ; @.str.1
	.asciz	"atc_status = %d\n"

	.comm	_HARDWARE_TYPE_RTL8812AE,8,3    ; @HARDWARE_TYPE_RTL8812AE
	.comm	_REG_MAC_PHY_CTRL,4,2           ; @REG_MAC_PHY_CTRL
l_.str.2:                               ; @.str.2
	.asciz	"crystal_cap = 0x%x\n"

l_.str.3:                               ; @.str.3
	.asciz	"packet counter doesn't change\n"

l_.str.4:                               ; @.str.4
	.asciz	"packet counter = %d\n"

	.comm	_RF_1T1R,8,3                    ; @RF_1T1R
l_.str.5:                               ; @.str.5
	.asciz	"cfo_khz_a = %dkHz, cfo_khz_b = %dkHz, cfo_ave = %dkHz\n"

l_.str.6:                               ; @.str.6
	.asciz	"first large CFO hit\n"

	.comm	_CFO_THRESHOLD_XTAL,4,2         ; @CFO_THRESHOLD_XTAL
l_.str.7:                               ; @.str.7
	.asciz	"Dynamic threshold = %d\n"

l_.str.8:                               ; @.str.8
	.asciz	"Crystal cap = 0x%x, Crystal cap offset = %d\n"

l_.str.9:                               ; @.str.9
	.asciz	"New crystal cap = 0x%x\n"

	.no_dead_strip	_rtl8821ae_dm_dynamic_atc_switch
.subsections_via_symbols
