	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92ee_hw_init                ## -- Begin function rtl92ee_hw_init
	.p2align	4, 0x90
_rtl92ee_hw_init:                       ## @rtl92ee_hw_init
	.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, %r14
	callq	_rtl_priv
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_hal
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_mac
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_psc
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_COMP_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
	movl	$1, (%r12)
	movq	8(%r12), %rax
	movq	%r14, %rdi
	callq	*8(%rax)
	movq	_REG_SYS_CLKR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	incq	%rsi
	movq	%r12, %rdi
	callq	_rtl_read_byte
	movl	%eax, %ebx
	movl	%eax, -44(%rbp)
	movq	_REG_CR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	callq	_rtl_read_byte
	movl	%eax, %r13d
	movl	$3, %edi
	callq	_BIT
	testl	%ebx, %eax
	je	LBB0_3
## %bb.1:
	testl	%r13d, %r13d
	je	LBB0_3
## %bb.2:
	movl	$1, %eax
	cmpl	$234, %r13d
	jne	LBB0_4
LBB0_3:
	movq	_FW_PS_STATE_ALL_ON_92E@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r15)
	xorl	%eax, %eax
LBB0_4:
	movl	%eax, (%r15)
	movq	%r12, %rdi
	callq	__rtl8192ee_check_pcie_dma_hang
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_COMP_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_DMESG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	__rtl8192ee_reset_pcie_interface_dma
	movl	$0, (%r15)
LBB0_6:
	movq	%r14, %rdi
	callq	__rtl92ee_init_mac
	movl	%eax, %r13d
	movq	%r12, %rdi
	movl	$1399, %esi                     ## imm = 0x577
	movl	$3, %edx
	callq	_rtl_write_byte
	movq	_REG_AFE_CTRL4@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$42, %edx
	callq	_rtl_write_byte
	movl	(%rbx), %esi
	incl	%esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_rtl_write_byte
	movq	_REG_AFE_CTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$131, %edx
	callq	_rtl_write_byte
	cmpl	$1, 24(%r12)
	jne	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	movl	$100, %esi
	xorl	%edx, %edx
	callq	_rtl_write_byte
	movq	%r12, %rdi
	movl	$101, %esi
	movl	$1, %edx
	callq	_rtl_write_byte
LBB0_8:
	testl	%r13d, %r13d
	je	LBB0_9
## %bb.10:
	movq	$0, 32(%r15)
	movq	_REG_PCIE_CTRL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$32768, %edx                    ## imm = 0x8000
	callq	_rtl_write_word
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_rtl92ee_download_fw
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movq	_COMP_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rcx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
	movl	$0, 4(%r15)
	movl	$1, %ebx
	jmp	LBB0_24
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_err
	movl	$1, %ebx
	jmp	LBB0_24
LBB0_12:
	movl	$1, 4(%r15)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	movq	_FW_PS_STATE_ALL_ON_92E@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15)
	movq	%r14, %rdi
	callq	_rtl92ee_phy_mac_config
	movq	%r14, %rdi
	callq	_rtl92ee_phy_bb_config
	movq	%r14, %rdi
	callq	_rtl92ee_phy_rf_config
	movq	_RF90_PATH_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_CHNLBW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rax, %rbx
	movq	_RFREG_OFFSET_MASK@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	%r14, %rdi
	callq	_rtl_get_rfreg
	movq	32(%r12), %rcx
	movl	%eax, (%rcx)
	movq	_RF90_PATH_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movl	(%r13), %ecx
	movq	%r14, %rdi
	callq	_rtl_get_rfreg
	movq	32(%r12), %rcx
	movl	%eax, 4(%rcx)
	movq	_RF90_PATH_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_RX_G1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	movq	%r14, %rdi
	callq	_rtl_get_rfreg
	movl	%eax, 40(%r12)
	movq	32(%r12), %rax
	movl	$-3073, %r13d                   ## imm = 0xF3FF
	andl	(%rax), %r13d
	movl	$10, %edi
	callq	_BIT
	movl	%eax, %ebx
	movl	$11, %edi
	callq	_BIT
	orl	%eax, %ebx
	orl	%r13d, %ebx
	movq	32(%r12), %rax
	movl	%ebx, (%rax)
	movq	_RF90_PATH_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_CHNLBW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_RFREG_OFFSET_MASK@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	%r14, %rdi
	movl	%ebx, %r8d
	callq	_rtl_set_rfreg
	movq	_RF90_PATH_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_CHNLBW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	movq	32(%r12), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	callq	_rtl_set_rfreg
	movq	_RFPGA0_RFMOD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_BCCKEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_rtl_set_bbreg
	movl	(%rbx), %esi
	movq	_BOFDMEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_rtl_set_bbreg
	movq	_RF90_PATH_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %ecx
	movq	%r14, %rdi
	movl	$177, %edx
	movl	$345112, %r8d                   ## imm = 0x54418
	callq	_rtl_set_rfreg
	movq	%r14, %rdi
	callq	__rtl92ee_hw_configure
	movl	$1, (%r15)
	movq	%r14, %rdi
	callq	_rtl_cam_reset_all_entry
	movq	%r14, %rdi
	callq	_rtl92ee_enable_hw_security_config
	movq	_ERFON@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, 8(%rbx)
	movq	16(%r12), %rax
	movq	(%rax), %rax
	movq	_HW_VAR_ETHER_ADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edx
	movq	%r14, %rdi
	callq	*(%rax)
	movq	%r14, %rdi
	callq	__rtl92ee_enable_aspm_back_door
	movq	8(%r12), %rax
	movq	%r14, %rdi
	callq	*(%rax)
	movq	%r14, %rdi
	callq	_rtl92ee_bt_hw_init
	movl	$0, (%r12)
	movq	8(%rbx), %rax
	cmpq	(%r15), %rax
	movq	_DBG_LOUD@GOTPCREL(%rip), %r13
	jne	LBB0_16
## %bb.13:
	cmpl	$0, 44(%r12)
	je	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_rtl92ee_phy_iq_calibrate
	jmp	LBB0_16
LBB0_15:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_rtl92ee_phy_iq_calibrate
	movl	$1, 44(%r12)
LBB0_16:
	movq	48(%r12), %rax
	movl	$1, (%rax)
	movq	56(%r12), %rcx
	movq	_RF_2T2R@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rcx
	jne	LBB0_18
## %bb.17:
	movl	$1, 4(%rax)
LBB0_18:
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	movl	$506, %esi                      ## imm = 0x1FA
	callq	_efuse_one_byte_read
	movl	-44(%rbp), %ebx
	xorl	%edi, %edi
	callq	_BIT
	testl	%ebx, %eax
	jne	LBB0_20
## %bb.19:
	movq	_RF90_PATH_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$21, %edx
	movl	$15, %ecx
	movl	$5, %r8d
	callq	_rtl_set_rfreg
	movq	_COMP_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	leaq	L_.str.4(%rip), %rcx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
LBB0_20:
	movl	-44(%rbp), %ebx
	movl	$1, %edi
	callq	_BIT
	testl	%ebx, %eax
	jne	LBB0_23
## %bb.21:
	movq	56(%r12), %rax
	cmpq	(%r15), %rax
	jne	LBB0_23
## %bb.22:
	movq	_RF90_PATH_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$21, %edx
	movl	$15, %ecx
	movl	$5, %r8d
	callq	_rtl_set_rfreg
	movq	_COMP_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	leaq	L_.str.5(%rip), %rcx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_RT_TRACE
LBB0_23:
	movq	_REG_NAV_UPPER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$235, %edx
	callq	_rtl_write_byte
	movq	_REG_SYS_SWR_CTRL1@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_rtl_read_dword
	movl	%eax, %ebx
	movq	_REG_SYS_SWR_CTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$117, %edx
	callq	_rtl_write_byte
	andl	$-1044481, %ebx                 ## imm = 0xFFF00FFF
	orl	$516096, %ebx                   ## imm = 0x7E000
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_rtl_write_dword
	movq	%r14, %rdi
	callq	_rtl92ee_dm_init
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movl	$1276, %esi                     ## imm = 0x4FC
	xorl	%edx, %edx
	callq	_rtl_write_dword
	movq	_COMP_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	leaq	L_.str.6(%rip), %rcx
	movq	%r12, %rdi
	xorl	%r8d, %r8d
	xorl	%eax, %eax
	callq	_RT_TRACE
LBB0_24:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COMP_INIT,4,2                  ## @COMP_INIT
	.comm	_DBG_LOUD,4,2                   ## @DBG_LOUD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" Rtl8192EE hw init\n"

	.comm	_REG_SYS_CLKR,8,3               ## @REG_SYS_CLKR
	.comm	_REG_CR,8,3                     ## @REG_CR
	.comm	_FW_PS_STATE_ALL_ON_92E,8,3     ## @FW_PS_STATE_ALL_ON_92E
	.comm	_DBG_DMESG,4,2                  ## @DBG_DMESG
L_.str.1:                               ## @.str.1
	.asciz	"92ee dma hang!\n"

	.comm	_REG_AFE_CTRL4,4,2              ## @REG_AFE_CTRL4
	.comm	_REG_AFE_CTRL2,4,2              ## @REG_AFE_CTRL2
L_.str.2:                               ## @.str.2
	.asciz	"Init MAC failed\n"

	.comm	_REG_PCIE_CTRL_REG,4,2          ## @REG_PCIE_CTRL_REG
	.comm	_COMP_ERR,4,2                   ## @COMP_ERR
	.comm	_DBG_WARNING,4,2                ## @DBG_WARNING
L_.str.3:                               ## @.str.3
	.asciz	"Failed to download FW. Init HW without FW now..\n"

	.comm	_RF90_PATH_A,4,2                ## @RF90_PATH_A
	.comm	_RF_CHNLBW,4,2                  ## @RF_CHNLBW
	.comm	_RFREG_OFFSET_MASK,4,2          ## @RFREG_OFFSET_MASK
	.comm	_RF90_PATH_B,4,2                ## @RF90_PATH_B
	.comm	_RF_RX_G1,4,2                   ## @RF_RX_G1
	.comm	_RFPGA0_RFMOD,4,2               ## @RFPGA0_RFMOD
	.comm	_BCCKEN,4,2                     ## @BCCKEN
	.comm	_BOFDMEN,4,2                    ## @BOFDMEN
	.comm	_ERFON,8,3                      ## @ERFON
	.comm	_HW_VAR_ETHER_ADDR,4,2          ## @HW_VAR_ETHER_ADDR
	.comm	_RF_2T2R,8,3                    ## @RF_2T2R
L_.str.4:                               ## @.str.4
	.asciz	"PA BIAS path A\n"

L_.str.5:                               ## @.str.5
	.asciz	"PA BIAS path B\n"

	.comm	_REG_NAV_UPPER,4,2              ## @REG_NAV_UPPER
	.comm	_REG_SYS_SWR_CTRL1,4,2          ## @REG_SYS_SWR_CTRL1
	.comm	_REG_SYS_SWR_CTRL2,4,2          ## @REG_SYS_SWR_CTRL2
L_.str.6:                               ## @.str.6
	.asciz	"end of Rtl8192EE hw init %x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92ee_hw_init                ; -- Begin function rtl92ee_hw_init
	.p2align	2
_rtl92ee_hw_init:                       ; @rtl92ee_hw_init
	.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	x20, x0
	bl	_rtl_priv
	mov	x19, x0
	mov	x0, x20
	bl	_rtl_priv
	bl	_rtl_hal
	mov	x22, x0
	mov	x0, x20
	bl	_rtl_priv
	bl	_rtl_mac
	mov	x23, x0
	mov	x0, x20
	bl	_rtl_priv
	bl	_rtl_psc
	mov	x21, x0
Lloh0:
	adrp	x26, _COMP_INIT@GOTPAGE
Lloh1:
	ldr	x26, [x26, _COMP_INIT@GOTPAGEOFF]
	ldr	w1, [x26]
Lloh2:
	adrp	x8, _DBG_LOUD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DBG_LOUD@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
Lloh5:
	adrp	x3, l_.str@PAGE
Lloh6:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	mov	w28, #1
	str	w28, [x19]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	mov	x0, x20
	blr	x8
Lloh7:
	adrp	x8, _REG_SYS_CLKR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _REG_SYS_CLKR@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	add	x1, x8, #1
	mov	x0, x19
	bl	_rtl_read_byte
	mov	x25, x0
	str	w0, [sp, #12]
Lloh10:
	adrp	x8, _REG_CR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _REG_CR@GOTPAGEOFF]
Lloh12:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_rtl_read_byte
	mov	x24, x0
	mov	w0, #3
	bl	_BIT
	and	w8, w0, w25
	cmp	w8, #0
	ccmp	w24, #0, #4, ne
	b.eq	LBB0_2
; %bb.1:
	cmp	w24, #234
	b.ne	LBB0_3
LBB0_2:
	mov	w28, #0
Lloh13:
	adrp	x8, _FW_PS_STATE_ALL_ON_92E@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FW_PS_STATE_ALL_ON_92E@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	str	x8, [x22, #24]
LBB0_3:
	str	w28, [x22]
	mov	x0, x19
	bl	__rtl8192ee_check_pcie_dma_hang
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w1, [x26]
Lloh16:
	adrp	x8, _DBG_DMESG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DBG_DMESG@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
Lloh19:
	adrp	x3, l_.str.1@PAGE
Lloh20:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	ldr	w1, [x22]
	mov	x0, x19
	bl	__rtl8192ee_reset_pcie_interface_dma
	str	wzr, [x22]
LBB0_5:
	mov	x0, x20
	bl	__rtl92ee_init_mac
	mov	x24, x0
	mov	x0, x19
	mov	w1, #1399
	mov	w2, #3
	bl	_rtl_write_byte
Lloh21:
	adrp	x25, _REG_AFE_CTRL4@GOTPAGE
Lloh22:
	ldr	x25, [x25, _REG_AFE_CTRL4@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #42
	bl	_rtl_write_byte
	ldr	w8, [x25]
	add	w1, w8, #1
	mov	x0, x19
	mov	w2, #0
	bl	_rtl_write_byte
Lloh23:
	adrp	x8, _REG_AFE_CTRL2@GOTPAGE
Lloh24:
	ldr	x8, [x8, _REG_AFE_CTRL2@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #131
	bl	_rtl_write_byte
	ldr	w8, [x19, #24]
	cmp	w8, #1
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	mov	w1, #100
	mov	w2, #0
	bl	_rtl_write_byte
	mov	x0, x19
	mov	w1, #101
	mov	w2, #1
	bl	_rtl_write_byte
LBB0_7:
	cbz	w24, LBB0_10
; %bb.8:
	str	xzr, [x22, #32]
Lloh26:
	adrp	x8, _REG_PCIE_CTRL_REG@GOTPAGE
Lloh27:
	ldr	x8, [x8, _REG_PCIE_CTRL_REG@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #32768
	bl	_rtl_write_word
	mov	x0, x20
	mov	w1, #0
	bl	_rtl92ee_download_fw
	cbz	w0, LBB0_11
; %bb.9:
Lloh29:
	adrp	x8, _COMP_ERR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _COMP_ERR@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x8, _DBG_WARNING@GOTPAGE
Lloh33:
	ldr	x8, [x8, _DBG_WARNING@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
Lloh35:
	adrp	x3, l_.str.3@PAGE
Lloh36:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	str	wzr, [x22, #4]
	mov	w0, #1
	b	LBB0_23
LBB0_10:
Lloh37:
	adrp	x0, l_.str.2@PAGE
Lloh38:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
	mov	w0, #1
	b	LBB0_23
LBB0_11:
	mov	w8, #1
	str	w8, [x22, #4]
	str	wzr, [x21]
Lloh39:
	adrp	x8, _FW_PS_STATE_ALL_ON_92E@GOTPAGE
Lloh40:
	ldr	x8, [x8, _FW_PS_STATE_ALL_ON_92E@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	stp	xzr, x8, [x22, #16]
	str	xzr, [x22, #8]
	mov	x0, x20
	bl	_rtl92ee_phy_mac_config
	mov	x0, x20
	bl	_rtl92ee_phy_bb_config
	mov	x0, x20
	bl	_rtl92ee_phy_rf_config
Lloh42:
	adrp	x25, _RF90_PATH_A@GOTPAGE
Lloh43:
	ldr	x25, [x25, _RF90_PATH_A@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh44:
	adrp	x28, _RF_CHNLBW@GOTPAGE
Lloh45:
	ldr	x28, [x28, _RF_CHNLBW@GOTPAGEOFF]
	ldr	w2, [x28]
Lloh46:
	adrp	x24, _RFREG_OFFSET_MASK@GOTPAGE
Lloh47:
	ldr	x24, [x24, _RFREG_OFFSET_MASK@GOTPAGEOFF]
	ldr	w3, [x24]
	mov	x0, x20
	bl	_rtl_get_rfreg
	ldr	x8, [x19, #32]
	str	w0, [x8]
Lloh48:
	adrp	x26, _RF90_PATH_B@GOTPAGE
Lloh49:
	ldr	x26, [x26, _RF90_PATH_B@GOTPAGEOFF]
	ldr	w1, [x26]
	ldr	w2, [x28]
	ldr	w3, [x24]
	mov	x0, x20
	bl	_rtl_get_rfreg
	ldr	x8, [x19, #32]
	str	w0, [x8, #4]
	ldr	w1, [x25]
Lloh50:
	adrp	x8, _RF_RX_G1@GOTPAGE
Lloh51:
	ldr	x8, [x8, _RF_RX_G1@GOTPAGEOFF]
Lloh52:
	ldr	w2, [x8]
	ldr	w3, [x24]
	mov	x0, x20
	bl	_rtl_get_rfreg
	str	w0, [x19, #40]
	ldr	x8, [x19, #32]
	ldr	w8, [x8]
	and	w27, w8, #0xfffff3ff
	mov	w0, #10
	bl	_BIT
	orr	w27, w27, w0
	mov	w0, #11
	bl	_BIT
	orr	w4, w27, w0
	ldr	x8, [x19, #32]
	str	w4, [x8]
	ldr	w1, [x25]
	ldr	w2, [x28]
	ldr	w3, [x24]
	mov	x0, x20
	bl	_rtl_set_rfreg
	ldr	w1, [x26]
Lloh53:
	adrp	x26, _COMP_INIT@GOTPAGE
Lloh54:
	ldr	x26, [x26, _COMP_INIT@GOTPAGEOFF]
	ldr	w2, [x28]
	ldr	w3, [x24]
	ldr	x8, [x19, #32]
	ldr	w4, [x8]
	mov	x0, x20
	bl	_rtl_set_rfreg
Lloh55:
	adrp	x27, _RFPGA0_RFMOD@GOTPAGE
Lloh56:
	ldr	x27, [x27, _RFPGA0_RFMOD@GOTPAGEOFF]
	ldr	w1, [x27]
Lloh57:
	adrp	x8, _BCCKEN@GOTPAGE
Lloh58:
	ldr	x8, [x8, _BCCKEN@GOTPAGEOFF]
Lloh59:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w3, #1
	bl	_rtl_set_bbreg
	ldr	w1, [x27]
Lloh60:
	adrp	x27, _DBG_LOUD@GOTPAGE
Lloh61:
	ldr	x27, [x27, _DBG_LOUD@GOTPAGEOFF]
Lloh62:
	adrp	x8, _BOFDMEN@GOTPAGE
Lloh63:
	ldr	x8, [x8, _BOFDMEN@GOTPAGEOFF]
Lloh64:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w3, #1
	bl	_rtl_set_bbreg
	ldr	w1, [x25]
	ldr	w3, [x24]
	mov	w24, #1
	mov	x0, x20
	mov	w2, #177
	mov	w4, #17432
	movk	w4, #5, lsl #16
	bl	_rtl_set_rfreg
	mov	x0, x20
	bl	__rtl92ee_hw_configure
	str	w24, [x22]
	mov	x0, x20
	bl	_rtl_cam_reset_all_entry
	mov	x0, x20
	bl	_rtl92ee_enable_hw_security_config
Lloh65:
	adrp	x22, _ERFON@GOTPAGE
Lloh66:
	ldr	x22, [x22, _ERFON@GOTPAGEOFF]
	ldr	x8, [x22]
	str	x8, [x21, #8]
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh67:
	adrp	x9, _HW_VAR_ETHER_ADDR@GOTPAGE
Lloh68:
	ldr	x9, [x9, _HW_VAR_ETHER_ADDR@GOTPAGEOFF]
Lloh69:
	ldr	w1, [x9]
	ldr	w2, [x23]
	mov	x0, x20
	blr	x8
	mov	x0, x20
	bl	__rtl92ee_enable_aspm_back_door
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
	mov	x0, x20
	bl	_rtl92ee_bt_hw_init
	str	wzr, [x19]
	ldr	x8, [x21, #8]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.12:
	ldr	w8, [x19, #44]
	cbz	w8, LBB0_14
; %bb.13:
	mov	x0, x20
	mov	w1, #1
	bl	_rtl92ee_phy_iq_calibrate
	b	LBB0_15
LBB0_14:
	mov	x0, x20
	mov	w1, #0
	bl	_rtl92ee_phy_iq_calibrate
	mov	w8, #1
	str	w8, [x19, #44]
LBB0_15:
	ldp	x8, x9, [x19, #48]
	str	w24, [x8]
Lloh70:
	adrp	x21, _RF_2T2R@GOTPAGE
Lloh71:
	ldr	x21, [x21, _RF_2T2R@GOTPAGEOFF]
	ldr	x10, [x21]
	cmp	x9, x10
	b.ne	LBB0_17
; %bb.16:
	mov	w9, #1
	str	w9, [x8, #4]
LBB0_17:
	add	x2, sp, #12
	mov	x0, x20
	mov	w1, #506
	bl	_efuse_one_byte_read
	ldr	w22, [sp, #12]
	mov	w0, #0
	bl	_BIT
	tst	w0, w22
	b.ne	LBB0_19
; %bb.18:
	ldr	w1, [x25]
	mov	x0, x20
	mov	w2, #21
	mov	w3, #15
	mov	w4, #5
	bl	_rtl_set_rfreg
	ldr	w1, [x26]
	ldr	w2, [x27]
Lloh72:
	adrp	x3, l_.str.4@PAGE
Lloh73:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
LBB0_19:
	ldr	w22, [sp, #12]
	mov	w0, #1
	bl	_BIT
	tst	w0, w22
	b.ne	LBB0_22
; %bb.20:
	ldr	x8, [x19, #56]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_22
; %bb.21:
Lloh74:
	adrp	x8, _RF90_PATH_B@GOTPAGE
Lloh75:
	ldr	x8, [x8, _RF90_PATH_B@GOTPAGEOFF]
Lloh76:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #21
	mov	w3, #15
	mov	w4, #5
	bl	_rtl_set_rfreg
	ldr	w1, [x26]
	ldr	w2, [x27]
Lloh77:
	adrp	x3, l_.str.5@PAGE
Lloh78:
	add	x3, x3, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
LBB0_22:
Lloh79:
	adrp	x8, _REG_NAV_UPPER@GOTPAGE
Lloh80:
	ldr	x8, [x8, _REG_NAV_UPPER@GOTPAGEOFF]
Lloh81:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #235
	bl	_rtl_write_byte
Lloh82:
	adrp	x22, _REG_SYS_SWR_CTRL1@GOTPAGE
Lloh83:
	ldr	x22, [x22, _REG_SYS_SWR_CTRL1@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl_read_dword
	mov	x21, x0
Lloh84:
	adrp	x8, _REG_SYS_SWR_CTRL2@GOTPAGE
Lloh85:
	ldr	x8, [x8, _REG_SYS_SWR_CTRL2@GOTPAGEOFF]
Lloh86:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #117
	bl	_rtl_write_byte
	and	w8, w21, #0xfff00fff
	orr	w2, w8, #0x7e000
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl_write_dword
	mov	x0, x20
	bl	_rtl92ee_dm_init
	mov	x0, x19
	mov	w1, #1276
	mov	w2, #0
	bl	_rtl_write_dword
	ldr	w1, [x26]
	ldr	w2, [x27]
	str	xzr, [sp]
Lloh87:
	adrp	x3, l_.str.6@PAGE
Lloh88:
	add	x3, x3, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_RT_TRACE
	mov	w0, #0
LBB0_23:
	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
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGot	Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGot	Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh70, Lloh71
	.loh AdrpAdd	Lloh72, Lloh73
	.loh AdrpAdd	Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpAdd	Lloh87, Lloh88
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpLdrGot	Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.cfi_endproc
                                        ; -- End function
	.comm	_COMP_INIT,4,2                  ; @COMP_INIT
	.comm	_DBG_LOUD,4,2                   ; @DBG_LOUD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" Rtl8192EE hw init\n"

	.comm	_REG_SYS_CLKR,8,3               ; @REG_SYS_CLKR
	.comm	_REG_CR,8,3                     ; @REG_CR
	.comm	_FW_PS_STATE_ALL_ON_92E,8,3     ; @FW_PS_STATE_ALL_ON_92E
	.comm	_DBG_DMESG,4,2                  ; @DBG_DMESG
l_.str.1:                               ; @.str.1
	.asciz	"92ee dma hang!\n"

	.comm	_REG_AFE_CTRL4,4,2              ; @REG_AFE_CTRL4
	.comm	_REG_AFE_CTRL2,4,2              ; @REG_AFE_CTRL2
l_.str.2:                               ; @.str.2
	.asciz	"Init MAC failed\n"

	.comm	_REG_PCIE_CTRL_REG,4,2          ; @REG_PCIE_CTRL_REG
	.comm	_COMP_ERR,4,2                   ; @COMP_ERR
	.comm	_DBG_WARNING,4,2                ; @DBG_WARNING
l_.str.3:                               ; @.str.3
	.asciz	"Failed to download FW. Init HW without FW now..\n"

	.comm	_RF90_PATH_A,4,2                ; @RF90_PATH_A
	.comm	_RF_CHNLBW,4,2                  ; @RF_CHNLBW
	.comm	_RFREG_OFFSET_MASK,4,2          ; @RFREG_OFFSET_MASK
	.comm	_RF90_PATH_B,4,2                ; @RF90_PATH_B
	.comm	_RF_RX_G1,4,2                   ; @RF_RX_G1
	.comm	_RFPGA0_RFMOD,4,2               ; @RFPGA0_RFMOD
	.comm	_BCCKEN,4,2                     ; @BCCKEN
	.comm	_BOFDMEN,4,2                    ; @BOFDMEN
	.comm	_ERFON,8,3                      ; @ERFON
	.comm	_HW_VAR_ETHER_ADDR,4,2          ; @HW_VAR_ETHER_ADDR
	.comm	_RF_2T2R,8,3                    ; @RF_2T2R
l_.str.4:                               ; @.str.4
	.asciz	"PA BIAS path A\n"

l_.str.5:                               ; @.str.5
	.asciz	"PA BIAS path B\n"

	.comm	_REG_NAV_UPPER,4,2              ; @REG_NAV_UPPER
	.comm	_REG_SYS_SWR_CTRL1,4,2          ; @REG_SYS_SWR_CTRL1
	.comm	_REG_SYS_SWR_CTRL2,4,2          ; @REG_SYS_SWR_CTRL2
l_.str.6:                               ; @.str.6
	.asciz	"end of Rtl8192EE hw init %x\n"

.subsections_via_symbols
