	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8821ae_phy_switch_wirelessband ## -- Begin function rtl8821ae_phy_switch_wirelessband
	.p2align	4, 0x90
_rtl8821ae_phy_switch_wirelessband:     ## @rtl8821ae_phy_switch_wirelessband
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r12
	callq	_rtl_priv
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_hal
	movq	%rax, %r15
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_rtl_dm
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	_RTXPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$240, %edx
	callq	_rtl8821ae_phy_query_bb_reg
	movq	_RCCK_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$251658240, %edx                ## imm = 0xF000000
	callq	_rtl8821ae_phy_query_bb_reg
	movl	%r13d, %eax
	movq	%rax, (%r15)
	movq	_BAND_ON_2_4G@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.1:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	_ROFDMCCKEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BOFDMEN@GOTPCREL(%rip), %rax
	movq	_BCCKEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r12, %rdi
	movl	$3, %ecx
	callq	_rtl_set_bbreg
	movq	%r15, %r13
	movq	8(%r15), %rax
	movq	_HARDWARE_TYPE_RTL8821AE@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_3
## %bb.2:
	movq	_RA_RFE_PINMUX@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	$61440, %edx                    ## imm = 0xF000
	movl	$7, %ecx
	callq	_rtl_set_bbreg
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	$240, %edx
	movl	$7, %ecx
	callq	_rtl_set_bbreg
	movq	8(%r13), %rax
LBB0_3:
	movq	_HARDWARE_TYPE_RTL8812AE@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	movl	$2100, %esi                     ## imm = 0x834
	movl	$3, %edx
	movl	$1, %ecx
	callq	_rtl_set_bbreg
	movq	8(%r13), %rax
LBB0_5:
	cmpq	(%r14), %rax
	jne	LBB0_7
## %bb.6:
	movq	_RA_TXSCALE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$3840, %edx                     ## imm = 0xF00
	jmp	LBB0_8
LBB0_11:
	movq	8(%r15), %rax
	movq	_HARDWARE_TYPE_RTL8821AE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	movq	_RA_RFE_PINMUX@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r12, %rdi
	movl	$61440, %edx                    ## imm = 0xF000
	movl	$5, %ecx
	callq	_rtl_set_bbreg
	movl	(%r14), %esi
	movq	%r12, %rdi
	movl	$240, %edx
	movl	$4, %ecx
	callq	_rtl_set_bbreg
LBB0_13:
	movq	_REG_CCK_CHECK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	$128, %edx
	callq	_rtl_write_byte
	movq	_REG_TXPKT_EMPTY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rtl_read_word
	movl	%eax, %r14d
	movq	_COMP_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movl	%r14d, %r8d
	xorl	%eax, %eax
	callq	_RT_TRACE
	notl	%r14d
	testb	$48, %r14b
	je	LBB0_18
## %bb.14:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	$50, %edi
	callq	_udelay
	movq	_COMP_SCAN@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rcx
	xorl	%eax, %eax
	callq	_RT_TRACE
	movq	_REG_TXPKT_EMPTY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rtl_read_word
	movl	%eax, %r13d
	andl	$48, %r13d
	leal	1(%r12), %r14d
	movl	(%r15), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	leaq	L_.str(%rip), %rcx
	movl	%r13d, %r8d
	xorl	%eax, %eax
	callq	_RT_TRACE
	cmpl	$48, %r13d
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	cmpl	$49, %r12d
	movl	%r14d, %r12d
	jb	LBB0_15
LBB0_17:
	movq	_COMP_MLME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rcx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %r8d
	movl	%r13d, %r9d
	xorl	%eax, %eax
	callq	_RT_TRACE
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_18:
	movq	_ROFDMCCKEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BOFDMEN@GOTPCREL(%rip), %rax
	movq	_BCCKEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r12, %rdi
	movl	$3, %ecx
	callq	_rtl_set_bbreg
	movq	8(%r15), %rax
	movq	_HARDWARE_TYPE_RTL8812AE@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_20
## %bb.19:
	movq	%r12, %rdi
	movl	$2100, %esi                     ## imm = 0x834
	movl	$3, %edx
	movl	$2, %ecx
	callq	_rtl_set_bbreg
	movq	8(%r15), %rax
LBB0_20:
	movq	_HARDWARE_TYPE_RTL8821AE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_22
## %bb.21:
	movq	_RA_TXSCALE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$3840, %edx                     ## imm = 0xF00
	jmp	LBB0_23
LBB0_7:
	movq	%r12, %rdi
	movl	$2092, %esi                     ## imm = 0x82C
	movl	$3, %edx
LBB0_8:
	xorl	%ecx, %ecx
	callq	_rtl_set_bbreg
	movq	8(%r13), %rax
	cmpq	(%r15), %rax
	jne	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	callq	__rtl8812ae_phy_set_rfe_reg_24g
LBB0_10:
	movq	_RTXPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$240, %edx
	movl	$1, %ecx
	callq	_rtl_set_bbreg
	movq	_RCCK_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$251658240, %edx                ## imm = 0xF000000
	movl	$1, %ecx
	callq	_rtl_set_bbreg
	movq	_REG_CCK_CHECK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%edx, %edx
	callq	_rtl_write_byte
	movq	%r13, %r15
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_26
LBB0_22:
	movq	%r12, %rdi
	movl	$2092, %esi                     ## imm = 0x82C
	movl	$3, %edx
LBB0_23:
	movl	$1, %ecx
	callq	_rtl_set_bbreg
	movq	8(%r15), %rax
	cmpq	(%r14), %rax
	jne	LBB0_25
## %bb.24:
	movq	%r12, %rdi
	callq	__rtl8812ae_phy_set_rfe_reg_5g
LBB0_25:
	movq	_RTXPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$240, %edx
	xorl	%ecx, %ecx
	callq	_rtl_set_bbreg
	movq	_RCCK_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$251658240, %edx                ## imm = 0xF000000
	movl	$15, %ecx
	callq	_rtl_set_bbreg
	movq	_COMP_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	movq	_RF90_PATH_A@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %r8d
	leaq	L_.str.3(%rip), %rcx
	xorl	%eax, %eax
	callq	_RT_TRACE
LBB0_26:
	movq	8(%r15), %rax
	movq	_HARDWARE_TYPE_RTL8821AE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_28
## %bb.27:
	movq	_HARDWARE_TYPE_RTL8812AE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_31
LBB0_28:
	movq	_RA_TXSCALE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_RF90_PATH_A@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_phy_get_tx_swing_8812A
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	$-2097152, %edx                 ## imm = 0xFFE00000
	movl	%eax, %ecx
	callq	_rtl_set_bbreg
	movq	_RB_TXSCALE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_RF90_PATH_B@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_phy_get_tx_swing_8812A
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	$-2097152, %edx                 ## imm = 0xFFE00000
	movl	%eax, %ecx
	callq	_rtl_set_bbreg
	cmpq	%r13, -88(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_30
## %bb.29:
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx), %eax
	subl	4(%rdx), %eax
	movl	%eax, %ecx
	negl	%ecx
	movq	_BAND_ON_2_4G@GOTPCREL(%rip), %rsi
	cmpq	%r13, (%rsi)
	cmovel	%eax, %ecx
	addl	%ecx, %ecx
	addl	%ecx, 8(%rdx)
LBB0_30:
	movq	%r12, %rdi
	callq	_rtl8821ae_dm_clear_txpower_tracking_state
LBB0_31:
	movq	_COMP_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.4(%rip), %rcx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RT_TRACE                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RTXPATH,4,2                    ## @RTXPATH
	.comm	_RCCK_RX,4,2                    ## @RCCK_RX
	.comm	_BAND_ON_2_4G,8,3               ## @BAND_ON_2_4G
	.comm	_ROFDMCCKEN,4,2                 ## @ROFDMCCKEN
	.comm	_BOFDMEN,4,2                    ## @BOFDMEN
	.comm	_BCCKEN,4,2                     ## @BCCKEN
	.comm	_HARDWARE_TYPE_RTL8821AE,8,3    ## @HARDWARE_TYPE_RTL8821AE
	.comm	_RA_RFE_PINMUX,4,2              ## @RA_RFE_PINMUX
	.comm	_HARDWARE_TYPE_RTL8812AE,8,3    ## @HARDWARE_TYPE_RTL8812AE
	.comm	_RA_TXSCALE,4,2                 ## @RA_TXSCALE
	.comm	_REG_CCK_CHECK,4,2              ## @REG_CCK_CHECK
	.comm	_REG_TXPKT_EMPTY,4,2            ## @REG_TXPKT_EMPTY
	.comm	_COMP_SCAN,4,2                  ## @COMP_SCAN
	.comm	_DBG_LOUD,4,2                   ## @DBG_LOUD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reg41A value %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Delay 50us\n"

	.comm	_COMP_MLME,4,2                  ## @COMP_MLME
L_.str.2:                               ## @.str.2
	.asciz	"PHY_SwitchWirelessBand8812(): Switch to 5G Band. Count = %d reg41A=0x%x\n"

L_.str.3:                               ## @.str.3
	.asciz	"==>PHY_SwitchWirelessBand8812() BAND_ON_5G settings OFDM index 0x%x\n"

	.comm	_RF90_PATH_A,8,3                ## @RF90_PATH_A
	.comm	_RB_TXSCALE,4,2                 ## @RB_TXSCALE
	.comm	_RF90_PATH_B,8,3                ## @RF90_PATH_B
	.comm	_DBG_TRACE,4,2                  ## @DBG_TRACE
L_.str.4:                               ## @.str.4
	.asciz	"<==rtl8821ae_phy_switch_wirelessband():Switch Band OK.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8821ae_phy_switch_wirelessband ; -- Begin function rtl8821ae_phy_switch_wirelessband
	.p2align	2
_rtl8821ae_phy_switch_wirelessband:     ; @rtl8821ae_phy_switch_wirelessband
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x24, x1
	mov	x20, x0
	bl	_rtl_priv
	mov	x19, x0
	mov	x0, x20
	bl	_rtl_priv
	bl	_rtl_hal
	mov	x23, x0
	mov	x0, x19
	bl	_rtl_dm
	mov	x25, x0
	ldr	x26, [x23]
Lloh0:
	adrp	x8, _RTXPATH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTXPATH@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #240
	bl	_rtl8821ae_phy_query_bb_reg
Lloh3:
	adrp	x8, _RCCK_RX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RCCK_RX@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #251658240
	bl	_rtl8821ae_phy_query_bb_reg
	and	x8, x24, #0xffffffff
	str	x8, [x23]
Lloh6:
	adrp	x22, _BAND_ON_2_4G@GOTPAGE
Lloh7:
	ldr	x22, [x22, _BAND_ON_2_4G@GOTPAGEOFF]
Lloh8:
	adrp	x10, _HARDWARE_TYPE_RTL8821AE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _HARDWARE_TYPE_RTL8821AE@GOTPAGEOFF]
Lloh10:
	adrp	x21, _HARDWARE_TYPE_RTL8812AE@GOTPAGE
Lloh11:
	ldr	x21, [x21, _HARDWARE_TYPE_RTL8812AE@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh12:
	adrp	x27, _COMP_SCAN@GOTPAGE
Lloh13:
	ldr	x27, [x27, _COMP_SCAN@GOTPAGEOFF]
Lloh14:
	adrp	x28, _RF90_PATH_A@GOTPAGE
Lloh15:
	ldr	x28, [x28, _RF90_PATH_A@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.1:
Lloh16:
	adrp	x8, _ROFDMCCKEN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ROFDMCCKEN@GOTPAGEOFF]
Lloh18:
	adrp	x9, _BOFDMEN@GOTPAGE
Lloh19:
	ldr	x9, [x9, _BOFDMEN@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	ldr	w8, [x9]
Lloh22:
	adrp	x9, _BCCKEN@GOTPAGE
Lloh23:
	ldr	x9, [x9, _BCCKEN@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x20
	mov	w3, #3
	bl	_rtl_set_bbreg
Lloh25:
	adrp	x10, _HARDWARE_TYPE_RTL8821AE@GOTPAGE
Lloh26:
	ldr	x10, [x10, _HARDWARE_TYPE_RTL8821AE@GOTPAGEOFF]
	ldr	x8, [x23, #8]
	ldr	x9, [x10]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh27:
	adrp	x21, _RA_RFE_PINMUX@GOTPAGE
Lloh28:
	ldr	x21, [x21, _RA_RFE_PINMUX@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	mov	w2, #61440
	mov	w3, #7
	bl	_rtl_set_bbreg
	ldr	w1, [x21]
Lloh29:
	adrp	x21, _HARDWARE_TYPE_RTL8812AE@GOTPAGE
Lloh30:
	ldr	x21, [x21, _HARDWARE_TYPE_RTL8812AE@GOTPAGEOFF]
	mov	x0, x20
	mov	w2, #240
	mov	w3, #7
	bl	_rtl_set_bbreg
Lloh31:
	adrp	x10, _HARDWARE_TYPE_RTL8821AE@GOTPAGE
Lloh32:
	ldr	x10, [x10, _HARDWARE_TYPE_RTL8821AE@GOTPAGEOFF]
	ldr	x8, [x23, #8]
LBB0_3:
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x20
	mov	w1, #2100
	mov	w2, #3
	mov	w3, #1
	bl	_rtl_set_bbreg
Lloh33:
	adrp	x10, _HARDWARE_TYPE_RTL8821AE@GOTPAGE
Lloh34:
	ldr	x10, [x10, _HARDWARE_TYPE_RTL8821AE@GOTPAGEOFF]
	ldr	x8, [x23, #8]
LBB0_5:
	ldr	x9, [x10]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.6:
Lloh35:
	adrp	x8, _RA_TXSCALE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _RA_TXSCALE@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #3840
	b	LBB0_19
LBB0_7:
	ldr	x8, [x23, #8]
	ldr	x9, [x10]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
Lloh38:
	adrp	x21, _RA_RFE_PINMUX@GOTPAGE
Lloh39:
	ldr	x21, [x21, _RA_RFE_PINMUX@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	mov	w2, #61440
	mov	w3, #5
	bl	_rtl_set_bbreg
	ldr	w1, [x21]
	mov	x0, x20
	mov	w2, #240
	mov	w3, #4
	bl	_rtl_set_bbreg
LBB0_9:
Lloh40:
	adrp	x8, _REG_CCK_CHECK@GOTPAGE
Lloh41:
	ldr	x8, [x8, _REG_CCK_CHECK@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #128
	bl	_rtl_write_byte
Lloh43:
	adrp	x28, _REG_TXPKT_EMPTY@GOTPAGE
Lloh44:
	ldr	x28, [x28, _REG_TXPKT_EMPTY@GOTPAGEOFF]
	ldr	w1, [x28]
	mov	x0, x19
	bl	_rtl_read_word
                                        ; kill: def $w0 killed $w0 def $x0
	mvn	w21, w0
	ldr	w1, [x27]
Lloh45:
	adrp	x22, _DBG_LOUD@GOTPAGE
Lloh46:
	ldr	x22, [x22, _DBG_LOUD@GOTPAGEOFF]
	ldr	w2, [x22]
	str	x0, [sp]
Lloh47:
	adrp	x3, l_.str@PAGE
Lloh48:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	tst	w21, #0x30
	b.eq	LBB0_14
; %bb.10:
	stp	x23, x26, [sp, #16]             ; 16-byte Folded Spill
	stp	x25, x24, [sp, #32]             ; 16-byte Folded Spill
	mov	w26, #0
Lloh49:
	adrp	x24, l_.str.1@PAGE
Lloh50:
	add	x24, x24, l_.str.1@PAGEOFF
Lloh51:
	adrp	x25, l_.str@PAGE
Lloh52:
	add	x25, x25, l_.str@PAGEOFF
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #50
	bl	_udelay
	ldr	w1, [x27]
	ldr	w2, [x22]
	mov	x0, x19
	mov	x3, x24
	bl	_RT_TRACE
	ldr	w1, [x28]
	mov	x0, x19
	bl	_rtl_read_word
	and	w23, w0, #0x30
	add	w21, w26, #1
	ldr	w1, [x27]
	ldr	w2, [x22]
	str	x23, [sp]
	mov	x0, x19
	mov	x3, x25
	bl	_RT_TRACE
	cmp	w23, #48
	b.eq	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	w26, #49
	mov	x26, x21
	b.lo	LBB0_11
LBB0_13:
Lloh53:
	adrp	x8, _COMP_MLME@GOTPAGE
Lloh54:
	ldr	x8, [x8, _COMP_MLME@GOTPAGEOFF]
Lloh55:
	ldr	w1, [x8]
	ldr	w2, [x22]
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	stp	x21, x23, [sp]
Lloh56:
	adrp	x3, l_.str.2@PAGE
Lloh57:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	ldp	x25, x24, [sp, #32]             ; 16-byte Folded Reload
	ldp	x23, x26, [sp, #16]             ; 16-byte Folded Reload
LBB0_14:
Lloh58:
	adrp	x8, _ROFDMCCKEN@GOTPAGE
Lloh59:
	ldr	x8, [x8, _ROFDMCCKEN@GOTPAGEOFF]
Lloh60:
	adrp	x9, _BOFDMEN@GOTPAGE
Lloh61:
	ldr	x9, [x9, _BOFDMEN@GOTPAGEOFF]
Lloh62:
	ldr	w1, [x8]
Lloh63:
	ldr	w8, [x9]
Lloh64:
	adrp	x9, _BCCKEN@GOTPAGE
Lloh65:
	ldr	x9, [x9, _BCCKEN@GOTPAGEOFF]
Lloh66:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x20
	mov	w3, #3
	bl	_rtl_set_bbreg
	ldr	x8, [x23, #8]
Lloh67:
	adrp	x21, _HARDWARE_TYPE_RTL8812AE@GOTPAGE
Lloh68:
	ldr	x21, [x21, _HARDWARE_TYPE_RTL8812AE@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x20
	mov	w1, #2100
	mov	w2, #3
	mov	w3, #2
	bl	_rtl_set_bbreg
	ldr	x8, [x23, #8]
LBB0_16:
Lloh69:
	adrp	x9, _HARDWARE_TYPE_RTL8821AE@GOTPAGE
Lloh70:
	ldr	x9, [x9, _HARDWARE_TYPE_RTL8821AE@GOTPAGEOFF]
Lloh71:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh72:
	adrp	x28, _RF90_PATH_A@GOTPAGE
Lloh73:
	ldr	x28, [x28, _RF90_PATH_A@GOTPAGEOFF]
	b.ne	LBB0_22
; %bb.17:
Lloh74:
	adrp	x8, _RA_TXSCALE@GOTPAGE
Lloh75:
	ldr	x8, [x8, _RA_TXSCALE@GOTPAGEOFF]
Lloh76:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #3840
	b	LBB0_23
LBB0_18:
	mov	x0, x20
	mov	w1, #2092
	mov	w2, #3
LBB0_19:
	mov	w3, #0
	bl	_rtl_set_bbreg
	ldr	x8, [x23, #8]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.20:
	mov	x0, x20
	bl	__rtl8812ae_phy_set_rfe_reg_24g
LBB0_21:
Lloh77:
	adrp	x8, _RTXPATH@GOTPAGE
Lloh78:
	ldr	x8, [x8, _RTXPATH@GOTPAGEOFF]
Lloh79:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #240
	mov	w3, #1
	bl	_rtl_set_bbreg
Lloh80:
	adrp	x8, _RCCK_RX@GOTPAGE
Lloh81:
	ldr	x8, [x8, _RCCK_RX@GOTPAGEOFF]
Lloh82:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #251658240
	mov	w3, #1
	bl	_rtl_set_bbreg
Lloh83:
	adrp	x8, _REG_CCK_CHECK@GOTPAGE
Lloh84:
	ldr	x8, [x8, _REG_CCK_CHECK@GOTPAGEOFF]
Lloh85:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_rtl_write_byte
	b	LBB0_26
LBB0_22:
	mov	x0, x20
	mov	w1, #2092
	mov	w2, #3
LBB0_23:
	mov	w3, #1
	bl	_rtl_set_bbreg
	ldr	x8, [x23, #8]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_25
; %bb.24:
	mov	x0, x20
	bl	__rtl8812ae_phy_set_rfe_reg_5g
LBB0_25:
Lloh86:
	adrp	x8, _RTXPATH@GOTPAGE
Lloh87:
	ldr	x8, [x8, _RTXPATH@GOTPAGEOFF]
Lloh88:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #240
	mov	w3, #0
	bl	_rtl_set_bbreg
Lloh89:
	adrp	x8, _RCCK_RX@GOTPAGE
Lloh90:
	ldr	x8, [x8, _RCCK_RX@GOTPAGEOFF]
Lloh91:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #251658240
	mov	w3, #15
	bl	_rtl_set_bbreg
	ldr	w1, [x27]
	ldr	w2, [x22]
	ldr	x8, [x19]
	ldr	x9, [x28]
	ldr	w8, [x8, x9, lsl #2]
	str	x8, [sp]
Lloh92:
	adrp	x3, l_.str.3@PAGE
Lloh93:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
Lloh94:
	adrp	x22, _BAND_ON_2_4G@GOTPAGE
Lloh95:
	ldr	x22, [x22, _BAND_ON_2_4G@GOTPAGEOFF]
LBB0_26:
	ldr	x8, [x23, #8]
Lloh96:
	adrp	x9, _HARDWARE_TYPE_RTL8821AE@GOTPAGE
Lloh97:
	ldr	x9, [x9, _HARDWARE_TYPE_RTL8821AE@GOTPAGEOFF]
Lloh98:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_28
; %bb.27:
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_31
LBB0_28:
Lloh99:
	adrp	x8, _RA_TXSCALE@GOTPAGE
Lloh100:
	ldr	x8, [x8, _RA_TXSCALE@GOTPAGEOFF]
Lloh101:
	ldr	w23, [x8]
	ldr	x2, [x28]
	mov	x0, x20
	mov	x1, x24
	bl	_phy_get_tx_swing_8812A
	mov	x3, x0
	mov	x0, x20
	mov	x1, x23
	mov	w2, #-2097152
	bl	_rtl_set_bbreg
Lloh102:
	adrp	x8, _RB_TXSCALE@GOTPAGE
Lloh103:
	ldr	x8, [x8, _RB_TXSCALE@GOTPAGEOFF]
Lloh104:
	ldr	w23, [x8]
Lloh105:
	adrp	x8, _RF90_PATH_B@GOTPAGE
Lloh106:
	ldr	x8, [x8, _RF90_PATH_B@GOTPAGEOFF]
Lloh107:
	ldr	x2, [x8]
	mov	x0, x20
	mov	x1, x24
	bl	_phy_get_tx_swing_8812A
	mov	x3, x0
	mov	x0, x20
	mov	x1, x23
	mov	w2, #-2097152
	bl	_rtl_set_bbreg
	cmp	x26, x24
	b.eq	LBB0_30
; %bb.29:
	ldp	w8, w9, [x25]
	sub	w8, w8, w9
	ldr	x9, [x22]
	cmp	x9, x24
	cneg	w8, w8, ne
	ldr	w9, [x25, #8]
	add	w8, w9, w8, lsl #1
	str	w8, [x25, #8]
LBB0_30:
	mov	x0, x20
	bl	_rtl8821ae_dm_clear_txpower_tracking_state
LBB0_31:
	ldr	w1, [x27]
Lloh108:
	adrp	x8, _DBG_TRACE@GOTPAGE
Lloh109:
	ldr	x8, [x8, _DBG_TRACE@GOTPAGEOFF]
Lloh110:
	ldr	w2, [x8]
Lloh111:
	adrp	x3, l_.str.4@PAGE
Lloh112:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_RT_TRACE
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh62
	.loh AdrpLdrGot	Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh85
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGot	Lloh94, Lloh95
	.loh AdrpAdd	Lloh92, Lloh93
	.loh AdrpLdrGotLdr	Lloh89, Lloh90, Lloh91
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.loh AdrpLdrGotLdr	Lloh96, Lloh97, Lloh98
	.loh AdrpLdrGotLdr	Lloh105, Lloh106, Lloh107
	.loh AdrpLdrGotLdr	Lloh102, Lloh103, Lloh104
	.loh AdrpLdrGotLdr	Lloh99, Lloh100, Lloh101
	.loh AdrpAdd	Lloh111, Lloh112
	.loh AdrpLdrGotLdr	Lloh108, Lloh109, Lloh110
	.cfi_endproc
                                        ; -- End function
	.comm	_RTXPATH,4,2                    ; @RTXPATH
	.comm	_RCCK_RX,4,2                    ; @RCCK_RX
	.comm	_BAND_ON_2_4G,8,3               ; @BAND_ON_2_4G
	.comm	_ROFDMCCKEN,4,2                 ; @ROFDMCCKEN
	.comm	_BOFDMEN,4,2                    ; @BOFDMEN
	.comm	_BCCKEN,4,2                     ; @BCCKEN
	.comm	_HARDWARE_TYPE_RTL8821AE,8,3    ; @HARDWARE_TYPE_RTL8821AE
	.comm	_RA_RFE_PINMUX,4,2              ; @RA_RFE_PINMUX
	.comm	_HARDWARE_TYPE_RTL8812AE,8,3    ; @HARDWARE_TYPE_RTL8812AE
	.comm	_RA_TXSCALE,4,2                 ; @RA_TXSCALE
	.comm	_REG_CCK_CHECK,4,2              ; @REG_CCK_CHECK
	.comm	_REG_TXPKT_EMPTY,4,2            ; @REG_TXPKT_EMPTY
	.comm	_COMP_SCAN,4,2                  ; @COMP_SCAN
	.comm	_DBG_LOUD,4,2                   ; @DBG_LOUD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reg41A value %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Delay 50us\n"

	.comm	_COMP_MLME,4,2                  ; @COMP_MLME
l_.str.2:                               ; @.str.2
	.asciz	"PHY_SwitchWirelessBand8812(): Switch to 5G Band. Count = %d reg41A=0x%x\n"

l_.str.3:                               ; @.str.3
	.asciz	"==>PHY_SwitchWirelessBand8812() BAND_ON_5G settings OFDM index 0x%x\n"

	.comm	_RF90_PATH_A,8,3                ; @RF90_PATH_A
	.comm	_RB_TXSCALE,4,2                 ; @RB_TXSCALE
	.comm	_RF90_PATH_B,8,3                ; @RF90_PATH_B
	.comm	_DBG_TRACE,4,2                  ; @DBG_TRACE
l_.str.4:                               ; @.str.4
	.asciz	"<==rtl8821ae_phy_switch_wirelessband():Switch Band OK.\n"

.subsections_via_symbols
