	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8821ae_phy_bb_config        ## -- Begin function rtl8821ae_phy_bb_config
	.p2align	4, 0x90
_rtl8821ae_phy_bb_config:               ## @rtl8821ae_phy_bb_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_rtl_priv
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_efuse
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_hal
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_phy_init_bb_rf_register_definition
	movq	_REG_SYS_FUNC_EN@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_rtl_read_byte
	movq	%rax, %rbx
	movq	_FEN_PCIEA@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_rtl_write_byte
	movq	_FEN_BB_GLB_RSTN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r13), %esi
	movq	_FEN_BBRSTB@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_rtl_write_byte
	movq	_REG_RF_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$7, %edx
	callq	_rtl_write_byte
	movq	_REG_OPT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	$2, %esi
	movq	%r15, %rdi
	movl	$7, %edx
	callq	_rtl_write_byte
	movq	%r14, %rdi
	callq	__rtl8821ae_phy_bb8821a_config_parafile
	movl	%eax, %r13d
	movq	(%r12), %rax
	movq	_HARDWARE_TYPE_RTL8812AE@GOTPCREL(%rip), %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %esi
	andl	$63, %esi
	movl	%esi, %ecx
	shll	$6, %ecx
	orl	%esi, %ecx
	cmpq	(%rdx), %rax
	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	%r14, %rdi
	callq	_rtl_set_bbreg
	movq	%r15, %rdi
	movl	$2103, %esi                     ## imm = 0x837
	callq	_rtl_read_byte
	movq	%rax, (%r15)
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_SYS_FUNC_EN,4,2            ## @REG_SYS_FUNC_EN
	.comm	_FEN_PCIEA,4,2                  ## @FEN_PCIEA
	.comm	_FEN_BB_GLB_RSTN,4,2            ## @FEN_BB_GLB_RSTN
	.comm	_FEN_BBRSTB,4,2                 ## @FEN_BBRSTB
	.comm	_REG_RF_CTRL,4,2                ## @REG_RF_CTRL
	.comm	_REG_OPT_CTRL,4,2               ## @REG_OPT_CTRL
	.comm	_HARDWARE_TYPE_RTL8812AE,8,3    ## @HARDWARE_TYPE_RTL8812AE
	.comm	_REG_MAC_PHY_CTRL,4,2           ## @REG_MAC_PHY_CTRL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8821ae_phy_bb_config        ; -- Begin function rtl8821ae_phy_bb_config
	.p2align	2
_rtl8821ae_phy_bb_config:               ; @rtl8821ae_phy_bb_config
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
	bl	_rtl_priv
	mov	x19, x0
	mov	x0, x20
	bl	_rtl_priv
	bl	_rtl_efuse
	mov	x21, x0
	mov	x0, x20
	bl	_rtl_priv
	bl	_rtl_hal
	mov	x22, x0
	mov	x0, x20
	bl	_phy_init_bb_rf_register_definition
Lloh0:
	adrp	x24, _REG_SYS_FUNC_EN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _REG_SYS_FUNC_EN@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_rtl_read_byte
Lloh2:
	adrp	x8, _FEN_PCIEA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FEN_PCIEA@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w23, w8, w0
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x23
	bl	_rtl_write_byte
	ldr	w1, [x24]
Lloh5:
	adrp	x8, _FEN_BB_GLB_RSTN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FEN_BB_GLB_RSTN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w8, w8, w23
Lloh8:
	adrp	x9, _FEN_BBRSTB@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FEN_BBRSTB@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_rtl_write_byte
Lloh11:
	adrp	x8, _REG_RF_CTRL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REG_RF_CTRL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #7
	bl	_rtl_write_byte
Lloh14:
	adrp	x8, _REG_OPT_CTRL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REG_OPT_CTRL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	add	w1, w8, #2
	mov	x0, x19
	mov	w2, #7
	bl	_rtl_write_byte
	mov	x0, x20
	bl	__rtl8821ae_phy_bb8821a_config_parafile
	mov	x23, x0
Lloh17:
	adrp	x8, _HARDWARE_TYPE_RTL8812AE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HARDWARE_TYPE_RTL8812AE@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh19:
	ldr	x8, [x8]
	ldr	w10, [x21]
	and	w3, w10, #0x3f
Lloh20:
	adrp	x10, _REG_MAC_PHY_CTRL@GOTPAGE
Lloh21:
	ldr	x10, [x10, _REG_MAC_PHY_CTRL@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x10]
	bfi	w3, w3, #6, #6
	cmp	x9, x8
	mov	w8, #16773120
	mov	w9, #2146959360
	csel	w2, w9, w8, eq
	mov	x0, x20
	bl	_rtl_set_bbreg
	mov	x0, x19
	mov	w1, #2103
	bl	_rtl_read_byte
	str	x0, [x19]
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_SYS_FUNC_EN,4,2            ; @REG_SYS_FUNC_EN
	.comm	_FEN_PCIEA,4,2                  ; @FEN_PCIEA
	.comm	_FEN_BB_GLB_RSTN,4,2            ; @FEN_BB_GLB_RSTN
	.comm	_FEN_BBRSTB,4,2                 ; @FEN_BBRSTB
	.comm	_REG_RF_CTRL,4,2                ; @REG_RF_CTRL
	.comm	_REG_OPT_CTRL,4,2               ; @REG_OPT_CTRL
	.comm	_HARDWARE_TYPE_RTL8812AE,8,3    ; @HARDWARE_TYPE_RTL8812AE
	.comm	_REG_MAC_PHY_CTRL,4,2           ; @REG_MAC_PHY_CTRL
.subsections_via_symbols
