	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8xxxu_gen1_init_phy_bb      ## -- Begin function rtl8xxxu_gen1_init_phy_bb
	.p2align	4, 0x90
_rtl8xxxu_gen1_init_phy_bb:             ## @rtl8xxxu_gen1_init_phy_bb
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_REG_AFE_PLL_CTRL@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	callq	_rtl8xxxu_read8
	movl	%eax, %ebx
	movl	$2, %edi
	callq	_udelay
	movq	_AFE_PLL_320_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	(%r15), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_rtl8xxxu_write8
	movl	$2, %edi
	callq	_udelay
	movq	(%r15), %rsi
	incq	%rsi
	movq	%r14, %rdi
	movl	$255, %edx
	callq	_rtl8xxxu_write8
	movl	$2, %edi
	callq	_udelay
	movq	_REG_SYS_FUNC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_rtl8xxxu_read16
	movq	_SYS_FUNC_BB_GLB_RSTN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_SYS_FUNC_BBRSTB@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_rtl8xxxu_write16
	movq	_REG_AFE_XTAL_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_rtl8xxxu_read32
	movq	_AFE_XTAL_RF_GATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movq	_AFE_XTAL_BT_GATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	cmpq	$1, 40(%r14)
	sbbl	%edx, %edx
	notl	%eax
	orl	%eax, %edx
	andl	%ecx, %edx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_rtl8xxxu_write32
	movq	_RF_ENABLE@GOTPCREL(%rip), %rax
	movq	_RF_RSTB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_RF_SDMRSTB@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_REG_RF_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_rtl8xxxu_write8
	cmpq	$0, 24(%r14)
	je	LBB0_2
## %bb.1:
	movq	_rtl8188ru_phy_1t_highpa_table@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	cmpl	$2, (%r14)
	jne	LBB0_3
## %bb.4:
	movq	_rtl8192cu_phy_2t_init_table@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_rtl8723a_phy_1t_init_table@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_rtl8xxxu_init_phy_regs
	movq	8(%r14), %rax
	movq	_RTL8188R@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.6:
	cmpq	$0, 24(%r14)
	je	LBB0_12
## %bb.7:
	cmpq	$0, 32(%r14)
	je	LBB0_10
## %bb.8:
	cmpl	$1, 16(%r14)
	jne	LBB0_10
## %bb.9:
	movq	_REG_OFDM0_AGC_PARM1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	$2, %rsi
	movq	%r14, %rdi
	movl	$80, %edx
	callq	_rtl8xxxu_write8
LBB0_10:
	cmpq	$0, 24(%r14)
	je	LBB0_12
## %bb.11:
	movq	_rtl8xxx_agc_highpa_table@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_rtl8xxx_agc_standard_table@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_rtl8xxxu_init_phy_regs
	movq	_LDOA15_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_LDOA15_OBUF@GOTPCREL(%rip), %rax
	movq	_LDOV12D_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	orl	(%rax), %r15d
	movl	$2, %ebx
	movl	$2, %edi
	callq	_BIT
	movq	_LDOV12D_VADJ_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	orl	%eax, %r12d
	orl	%r12d, %ebx
	shll	$8, %ebx
	orl	%r15d, %ebx
	orl	$22478848, %ebx                 ## imm = 0x1570000
	movq	_REG_LDOA15_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rtl8xxxu_write32               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_AFE_PLL_CTRL,8,3           ## @REG_AFE_PLL_CTRL
	.comm	_AFE_PLL_320_ENABLE,4,2         ## @AFE_PLL_320_ENABLE
	.comm	_REG_SYS_FUNC,4,2               ## @REG_SYS_FUNC
	.comm	_SYS_FUNC_BB_GLB_RSTN,4,2       ## @SYS_FUNC_BB_GLB_RSTN
	.comm	_SYS_FUNC_BBRSTB,4,2            ## @SYS_FUNC_BBRSTB
	.comm	_REG_AFE_XTAL_CTRL,4,2          ## @REG_AFE_XTAL_CTRL
	.comm	_AFE_XTAL_RF_GATE,4,2           ## @AFE_XTAL_RF_GATE
	.comm	_AFE_XTAL_BT_GATE,4,2           ## @AFE_XTAL_BT_GATE
	.comm	_RF_ENABLE,4,2                  ## @RF_ENABLE
	.comm	_RF_RSTB,4,2                    ## @RF_RSTB
	.comm	_RF_SDMRSTB,4,2                 ## @RF_SDMRSTB
	.comm	_REG_RF_CTRL,8,3                ## @REG_RF_CTRL
	.comm	_rtl8188ru_phy_1t_highpa_table,4,2 ## @rtl8188ru_phy_1t_highpa_table
	.comm	_rtl8192cu_phy_2t_init_table,4,2 ## @rtl8192cu_phy_2t_init_table
	.comm	_rtl8723a_phy_1t_init_table,4,2 ## @rtl8723a_phy_1t_init_table
	.comm	_RTL8188R,8,3                   ## @RTL8188R
	.comm	_REG_OFDM0_AGC_PARM1,8,3        ## @REG_OFDM0_AGC_PARM1
	.comm	_rtl8xxx_agc_highpa_table,4,2   ## @rtl8xxx_agc_highpa_table
	.comm	_rtl8xxx_agc_standard_table,4,2 ## @rtl8xxx_agc_standard_table
	.comm	_LDOA15_ENABLE,4,2              ## @LDOA15_ENABLE
	.comm	_LDOA15_OBUF,4,2                ## @LDOA15_OBUF
	.comm	_LDOV12D_ENABLE,4,2             ## @LDOV12D_ENABLE
	.comm	_LDOV12D_VADJ_SHIFT,4,2         ## @LDOV12D_VADJ_SHIFT
	.comm	_REG_LDOA15_CTRL,4,2            ## @REG_LDOA15_CTRL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl8xxxu_gen1_init_phy_bb      ; -- Begin function rtl8xxxu_gen1_init_phy_bb
	.p2align	2
_rtl8xxxu_gen1_init_phy_bb:             ; @rtl8xxxu_gen1_init_phy_bb
	.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	x19, x0
Lloh0:
	adrp	x21, _REG_AFE_PLL_CTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _REG_AFE_PLL_CTRL@GOTPAGEOFF]
	ldr	x1, [x21]
	bl	_rtl8xxxu_read8
	mov	x20, x0
	mov	w0, #2
	bl	_udelay
Lloh2:
	adrp	x8, _AFE_PLL_320_ENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AFE_PLL_320_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w2, w8, w20
	ldr	x1, [x21]
	mov	x0, x19
	bl	_rtl8xxxu_write8
	mov	w0, #2
	bl	_udelay
	ldr	x8, [x21]
	add	x1, x8, #1
	mov	x0, x19
	mov	w2, #255
	bl	_rtl8xxxu_write8
	mov	w0, #2
	bl	_udelay
Lloh5:
	adrp	x20, _REG_SYS_FUNC@GOTPAGE
Lloh6:
	ldr	x20, [x20, _REG_SYS_FUNC@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rtl8xxxu_read16
Lloh7:
	adrp	x8, _SYS_FUNC_BB_GLB_RSTN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SYS_FUNC_BB_GLB_RSTN@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _SYS_FUNC_BBRSTB@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SYS_FUNC_BBRSTB@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w2, w8, w9
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rtl8xxxu_write16
Lloh13:
	adrp	x20, _REG_AFE_XTAL_CTRL@GOTPAGE
Lloh14:
	ldr	x20, [x20, _REG_AFE_XTAL_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rtl8xxxu_read32
Lloh15:
	adrp	x8, _AFE_XTAL_RF_GATE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AFE_XTAL_RF_GATE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	bic	w8, w0, w8
	ldr	x9, [x19, #40]
Lloh18:
	adrp	x10, _AFE_XTAL_BT_GATE@GOTPAGE
Lloh19:
	ldr	x10, [x10, _AFE_XTAL_BT_GATE@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	cmp	x9, #0
	mov	w9, #-1
	csinv	w9, w9, w10, eq
	and	w2, w8, w9
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rtl8xxxu_write32
Lloh21:
	adrp	x8, _RF_ENABLE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RF_ENABLE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _RF_RSTB@GOTPAGE
Lloh25:
	ldr	x9, [x9, _RF_RSTB@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _RF_SDMRSTB@GOTPAGE
Lloh28:
	ldr	x10, [x10, _RF_SDMRSTB@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh29:
	ldr	w9, [x10]
	orr	w2, w8, w9
Lloh30:
	adrp	x8, _REG_RF_CTRL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _REG_RF_CTRL@GOTPAGEOFF]
Lloh32:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_rtl8xxxu_write8
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_2
; %bb.1:
Lloh33:
	adrp	x8, _rtl8188ru_phy_1t_highpa_table@GOTPAGE
Lloh34:
	ldr	x8, [x8, _rtl8188ru_phy_1t_highpa_table@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
	ldr	w8, [x19]
Lloh35:
	adrp	x9, _rtl8723a_phy_1t_init_table@GOTPAGE
Lloh36:
	ldr	x9, [x9, _rtl8723a_phy_1t_init_table@GOTPAGEOFF]
Lloh37:
	adrp	x10, _rtl8192cu_phy_2t_init_table@GOTPAGE
Lloh38:
	ldr	x10, [x10, _rtl8192cu_phy_2t_init_table@GOTPAGEOFF]
	cmp	w8, #2
	csel	x8, x10, x9, eq
LBB0_3:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rtl8xxxu_init_phy_regs
	ldr	x8, [x19, #8]
Lloh39:
	adrp	x9, _RTL8188R@GOTPAGE
Lloh40:
	ldr	x9, [x9, _RTL8188R@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.4:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_10
; %bb.5:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_8
; %bb.6:
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.7:
Lloh42:
	adrp	x8, _REG_OFDM0_AGC_PARM1@GOTPAGE
Lloh43:
	ldr	x8, [x8, _REG_OFDM0_AGC_PARM1@GOTPAGEOFF]
Lloh44:
	ldr	x8, [x8]
	add	x1, x8, #2
	mov	x0, x19
	mov	w2, #80
	bl	_rtl8xxxu_write8
LBB0_8:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_10
; %bb.9:
Lloh45:
	adrp	x8, _rtl8xxx_agc_highpa_table@GOTPAGE
Lloh46:
	ldr	x8, [x8, _rtl8xxx_agc_highpa_table@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh47:
	adrp	x8, _rtl8xxx_agc_standard_table@GOTPAGE
Lloh48:
	ldr	x8, [x8, _rtl8xxx_agc_standard_table@GOTPAGEOFF]
LBB0_11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rtl8xxxu_init_phy_regs
Lloh49:
	adrp	x8, _LDOA15_ENABLE@GOTPAGE
Lloh50:
	ldr	x8, [x8, _LDOA15_ENABLE@GOTPAGEOFF]
Lloh51:
	ldr	w20, [x8]
Lloh52:
	adrp	x8, _LDOA15_OBUF@GOTPAGE
Lloh53:
	ldr	x8, [x8, _LDOA15_OBUF@GOTPAGEOFF]
Lloh54:
	ldr	w21, [x8]
Lloh55:
	adrp	x8, _LDOV12D_ENABLE@GOTPAGE
Lloh56:
	ldr	x8, [x8, _LDOV12D_ENABLE@GOTPAGEOFF]
Lloh57:
	ldr	w22, [x8]
	mov	w23, #2
	mov	w0, #2
	bl	_BIT
	orr	w8, w0, w22
Lloh58:
	adrp	x9, _LDOV12D_VADJ_SHIFT@GOTPAGE
Lloh59:
	ldr	x9, [x9, _LDOV12D_VADJ_SHIFT@GOTPAGEOFF]
Lloh60:
	ldr	w9, [x9]
	lsl	w9, w23, w9
	orr	w8, w8, w9
	orr	w9, w20, w21
	orr	w8, w9, w8, lsl #8
	mov	w9, #22478848
	orr	w2, w8, w9
Lloh61:
	adrp	x8, _REG_LDOA15_CTRL@GOTPAGE
Lloh62:
	ldr	x8, [x8, _REG_LDOA15_CTRL@GOTPAGEOFF]
Lloh63:
	ldr	w1, [x8]
	mov	x0, x19
	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
	b	_rtl8xxxu_write32
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_AFE_PLL_CTRL,8,3           ; @REG_AFE_PLL_CTRL
	.comm	_AFE_PLL_320_ENABLE,4,2         ; @AFE_PLL_320_ENABLE
	.comm	_REG_SYS_FUNC,4,2               ; @REG_SYS_FUNC
	.comm	_SYS_FUNC_BB_GLB_RSTN,4,2       ; @SYS_FUNC_BB_GLB_RSTN
	.comm	_SYS_FUNC_BBRSTB,4,2            ; @SYS_FUNC_BBRSTB
	.comm	_REG_AFE_XTAL_CTRL,4,2          ; @REG_AFE_XTAL_CTRL
	.comm	_AFE_XTAL_RF_GATE,4,2           ; @AFE_XTAL_RF_GATE
	.comm	_AFE_XTAL_BT_GATE,4,2           ; @AFE_XTAL_BT_GATE
	.comm	_RF_ENABLE,4,2                  ; @RF_ENABLE
	.comm	_RF_RSTB,4,2                    ; @RF_RSTB
	.comm	_RF_SDMRSTB,4,2                 ; @RF_SDMRSTB
	.comm	_REG_RF_CTRL,8,3                ; @REG_RF_CTRL
	.comm	_rtl8188ru_phy_1t_highpa_table,4,2 ; @rtl8188ru_phy_1t_highpa_table
	.comm	_rtl8192cu_phy_2t_init_table,4,2 ; @rtl8192cu_phy_2t_init_table
	.comm	_rtl8723a_phy_1t_init_table,4,2 ; @rtl8723a_phy_1t_init_table
	.comm	_RTL8188R,8,3                   ; @RTL8188R
	.comm	_REG_OFDM0_AGC_PARM1,8,3        ; @REG_OFDM0_AGC_PARM1
	.comm	_rtl8xxx_agc_highpa_table,4,2   ; @rtl8xxx_agc_highpa_table
	.comm	_rtl8xxx_agc_standard_table,4,2 ; @rtl8xxx_agc_standard_table
	.comm	_LDOA15_ENABLE,4,2              ; @LDOA15_ENABLE
	.comm	_LDOA15_OBUF,4,2                ; @LDOA15_OBUF
	.comm	_LDOV12D_ENABLE,4,2             ; @LDOV12D_ENABLE
	.comm	_LDOV12D_VADJ_SHIFT,4,2         ; @LDOV12D_VADJ_SHIFT
	.comm	_REG_LDOA15_CTRL,4,2            ; @REG_LDOA15_CTRL
.subsections_via_symbols
