	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8821ae_phy_sw_chnl_callback ## -- Begin function rtl8821ae_phy_sw_chnl_callback
	.p2align	4, 0x90
_rtl8821ae_phy_sw_chnl_callback:        ## @rtl8821ae_phy_sw_chnl_callback
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_rtl_priv
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_hal
	movq	%rax, %r14
	movl	(%rbx), %r12d
	movq	_COMP_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movl	%r12d, %r8d
	xorl	%eax, %eax
	callq	_RT_TRACE
	movq	%r14, %rdi
	callq	_is_hal_stop
	testq	%rax, %rax
	je	LBB0_1
## %bb.12:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	leal	-36(%r12), %r14d
	movl	$1172, %ecx                     ## imm = 0x494
	cmpl	$13, %r14d
	jb	LBB0_5
## %bb.2:
	leal	-50(%r12), %eax
	movl	$1107, %ecx                     ## imm = 0x453
	cmpl	$15, %eax
	jb	LBB0_5
## %bb.3:
	leal	-100(%r12), %eax
	movl	$1106, %ecx                     ## imm = 0x452
	cmpl	$17, %eax
	jb	LBB0_5
## %bb.4:
	cmpl	$118, %r12d
	movl	$1042, %eax                     ## imm = 0x412
	movl	$2410, %ecx                     ## imm = 0x96A
	cmovgel	%eax, %ecx
LBB0_5:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	_RFC_AREA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	$536739840, %edx                ## imm = 0x1FFE0000
	callq	_rtl_set_bbreg
	movq	_RF90_PATH_A@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	cmpl	4(%rbx), %r13d
	jge	LBB0_11
## %bb.6:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	leal	-100(%rdx), %eax
	xorl	%ecx, %ecx
	cmpl	$141, %edx
	movl	$1281, %edx                     ## imm = 0x501
	cmovll	%ecx, %edx
	cmpl	$41, %eax
	movl	$769, %eax                      ## imm = 0x301
	cmovael	%edx, %eax
	xorl	%ecx, %ecx
	cmpl	$29, %r14d
	movl	$257, %edx                      ## imm = 0x101
	cmovael	%eax, %edx
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	setb	%cl
	shll	$10, %ecx
	orl	$69865, %ecx                    ## imm = 0x110E9
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	incl	%r13d
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	cmpl	4(%rbx), %r13d
	jge	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	_RF_CHNLBW@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r14d
	movl	$18, %edi
	callq	_BIT
	movl	%eax, %r15d
	movl	$17, %edi
	callq	_BIT
	orl	%eax, %r15d
	movl	$16, %edi
	callq	_BIT
	movl	%eax, %r12d
	movl	$9, %edi
	callq	_BIT
	orl	%eax, %r12d
	orl	%r15d, %r12d
	movl	$8, %edi
	callq	_BIT
	orl	%eax, %r12d
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	callq	_rtl8821ae_phy_set_rf_reg
	movl	(%rbx), %edx
	movq	_BMASKBYTE0@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r13d, %esi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %r8d
	callq	_rtl8821ae_phy_set_rf_reg
	cmpl	$15, %ebx
	jl	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	_HARDWARE_TYPE_RTL8821AE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_RF_APK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BRFREGOFFSETMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_rtl8821ae_phy_set_rf_reg
	jmp	LBB0_10
LBB0_11:
	movq	_COMP_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RT_TRACE                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_COMP_SCAN,4,2                  ## @COMP_SCAN
	.comm	_DBG_TRACE,4,2                  ## @DBG_TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"switch to channel%d\n"

	.comm	_RFC_AREA,4,2                   ## @RFC_AREA
	.comm	_RF90_PATH_A,4,2                ## @RF90_PATH_A
	.comm	_RF_CHNLBW,4,2                  ## @RF_CHNLBW
	.comm	_BMASKBYTE0,4,2                 ## @BMASKBYTE0
	.comm	_HARDWARE_TYPE_RTL8821AE,8,3    ## @HARDWARE_TYPE_RTL8821AE
	.comm	_RF_APK,4,2                     ## @RF_APK
	.comm	_BRFREGOFFSETMASK,4,2           ## @BRFREGOFFSETMASK
L_.str.1:                               ## @.str.1
	.asciz	"\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8821ae_phy_sw_chnl_callback ; -- Begin function rtl8821ae_phy_sw_chnl_callback
	.p2align	2
_rtl8821ae_phy_sw_chnl_callback:        ; @rtl8821ae_phy_sw_chnl_callback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_rtl_priv
	mov	x20, x0
	mov	x0, x19
	bl	_rtl_priv
	bl	_rtl_hal
	mov	x21, x0
	ldr	w22, [x20]
Lloh0:
	adrp	x8, _COMP_SCAN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COMP_SCAN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _DBG_TRACE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DBG_TRACE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	str	x22, [sp]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	bl	_RT_TRACE
	mov	x0, x21
	bl	_is_hal_stop
	cbz	x0, LBB0_2
; %bb.1:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_2:
	sub	w24, w22, #36
	mov	w8, #1172
	sub	w9, w22, #50
	mov	w10, #1107
	sub	w25, w22, #100
	mov	w11, #1106
	mov	w12, #2410
	mov	w13, #1042
	cmp	w22, #117
	csel	w12, w13, w12, gt
	cmp	w25, #17
	csel	w11, w11, w12, lo
	cmp	w9, #15
	csel	w9, w10, w11, lo
	cmp	w24, #13
	csel	w3, w8, w9, lo
Lloh8:
	adrp	x8, _RFC_AREA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RFC_AREA@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #536739840
	bl	_rtl_set_bbreg
Lloh11:
	adrp	x8, _RF90_PATH_A@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RF90_PATH_A@GOTPAGEOFF]
Lloh13:
	ldr	w23, [x8]
	ldr	w8, [x20, #4]
	cmp	w23, w8
	b.ge	LBB0_8
; %bb.3:
	mov	w8, #1281
	cmp	w22, #140
	csel	w8, w8, wzr, gt
	mov	w9, #4329
	movk	w9, #1, lsl #16
	orr	w10, w9, #0x400
	mov	w11, #769
	cmp	w25, #41
	csel	w8, w11, w8, lo
	cmp	w24, #29
	csel	w9, w10, w9, lo
	str	w9, [sp, #12]                   ; 4-byte Folded Spill
	mov	w9, #257
	csel	w25, w9, w8, lo
Lloh14:
	adrp	x28, _RF_CHNLBW@GOTPAGE
Lloh15:
	ldr	x28, [x28, _RF_CHNLBW@GOTPAGEOFF]
Lloh16:
	adrp	x24, _BMASKBYTE0@GOTPAGE
Lloh17:
	ldr	x24, [x24, _BMASKBYTE0@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w23, w23, #1
	ldr	w8, [x20, #4]
	cmp	w23, w8
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w26, [x28]
	mov	w0, #18
	bl	_BIT
	mov	x27, x0
	mov	w0, #17
	bl	_BIT
	orr	w27, w0, w27
	mov	w0, #16
	bl	_BIT
	orr	w27, w27, w0
	mov	w0, #9
	bl	_BIT
	orr	w27, w27, w0
	mov	w0, #8
	bl	_BIT
	orr	w3, w27, w0
	mov	x0, x19
	mov	x1, x23
	mov	x2, x26
	mov	x4, x25
	bl	_rtl8821ae_phy_set_rf_reg
	ldr	w2, [x28]
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x23
	mov	x4, x22
	bl	_rtl8821ae_phy_set_rf_reg
	cmp	w22, #15
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21]
Lloh18:
	adrp	x9, _HARDWARE_TYPE_RTL8821AE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _HARDWARE_TYPE_RTL8821AE@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh21:
	adrp	x8, _RF_APK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RF_APK@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
Lloh24:
	adrp	x8, _BRFREGOFFSETMASK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _BRFREGOFFSETMASK@GOTPAGEOFF]
Lloh26:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x23
	ldr	w4, [sp, #12]                   ; 4-byte Folded Reload
	bl	_rtl8821ae_phy_set_rf_reg
	b	LBB0_4
LBB0_8:
Lloh27:
	adrp	x8, _COMP_SCAN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _COMP_SCAN@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x8, _DBG_TRACE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _DBG_TRACE@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
Lloh33:
	adrp	x3, l_.str.1@PAGE
Lloh34:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x20
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_RT_TRACE
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_COMP_SCAN,4,2                  ; @COMP_SCAN
	.comm	_DBG_TRACE,4,2                  ; @DBG_TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"switch to channel%d\n"

	.comm	_RFC_AREA,4,2                   ; @RFC_AREA
	.comm	_RF90_PATH_A,4,2                ; @RF90_PATH_A
	.comm	_RF_CHNLBW,4,2                  ; @RF_CHNLBW
	.comm	_BMASKBYTE0,4,2                 ; @BMASKBYTE0
	.comm	_HARDWARE_TYPE_RTL8821AE,8,3    ; @HARDWARE_TYPE_RTL8821AE
	.comm	_RF_APK,4,2                     ; @RF_APK
	.comm	_BRFREGOFFSETMASK,4,2           ; @BRFREGOFFSETMASK
l_.str.1:                               ; @.str.1
	.asciz	"\n"

.subsections_via_symbols
