	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92cu_hw_init                ## -- Begin function rtl92cu_hw_init
	.p2align	4, 0x90
_rtl92cu_hw_init:                       ## @rtl92cu_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, %rbx
	callq	_rtl_priv
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_hal
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_mac
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_psc
	movq	%rax, %r14
	callq	_local_save_flags
	xorl	%eax, %eax
	callq	_local_irq_enable
	movl	$0, (%r15)
	movq	_HARDWARE_TYPE_RTL8192CU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	%rbx, %rdi
	callq	__rtl92cu_init_mac
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_13
LBB0_2:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_rtl92c_download_fw
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	_COMP_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_RT_TRACE
	movl	$1, %r13d
	jmp	LBB0_13
LBB0_4:
	movl	$1, (%r15)
	movq	$0, 8(%r15)
	movq	%rbx, %rdi
	callq	__rtl92cu_phy_param_tab_init
	movq	%rbx, %rdi
	callq	_rtl92cu_phy_mac_config
	movq	%rbx, %rdi
	callq	_rtl92cu_phy_bb_config
	movq	_RF_OP_BY_SW_3WIRE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 24(%rcx)
	movq	%rbx, %rdi
	callq	_rtl92c_phy_rf_config
	movl	4(%r15), %edi
	callq	_IS_VENDOR_UMC_A_CUT
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movl	4(%r15), %edi
	callq	_IS_92C_SERIAL
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_RF90_PATH_A@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_RF_RX_G1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MASKDWORD@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	%rbx, %rdi
	movl	$197205, %r8d                   ## imm = 0x30255
	callq	_rtl_set_rfreg
	movl	(%r15), %esi
	movq	_RF_RX_G2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	movq	%rbx, %rdi
	movl	$330240, %r8d                   ## imm = 0x50A00
	callq	_rtl_set_rfreg
LBB0_7:
	movq	_RF_CHNLBW@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	_RFREG_OFFSET_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rtl_get_rfreg
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	16(%r15), %rcx
	movq	%rax, (%rcx)
	movl	(%r14), %edx
	movl	(%r12), %ecx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_rtl_get_rfreg
	movq	16(%r15), %rcx
	movq	%rax, 8(%rcx)
	movq	%rbx, %rdi
	callq	_rtl92cu_bb_block_on
	movq	%rbx, %rdi
	callq	_rtl_cam_reset_all_entry
	movq	%rbx, %rdi
	callq	_rtl92cu_enable_hw_security_config
	movq	_ERFON@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%rax, (%r14)
	movq	(%r15), %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	%rbx, %rdi
	callq	*(%rax)
	movq	(%r14), %rax
	cmpq	(%r12), %rax
	jne	LBB0_12
## %bb.8:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_rtl92c_phy_set_rfpath_switch
	cmpl	$0, 8(%r15)
	je	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_rtl92c_phy_iq_calibrate
	jmp	LBB0_11
LBB0_10:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rtl92c_phy_iq_calibrate
	movl	$1, 8(%r15)
LBB0_11:
	movq	%rbx, %rdi
	callq	_rtl92c_dm_check_txpower_tracking
	movq	%rbx, %rdi
	callq	_rtl92c_phy_lc_calibrate
LBB0_12:
	movq	%rbx, %rdi
	callq	__rtl92cu_hw_configure
	movq	%rbx, %rdi
	callq	__initpabias
	movq	%rbx, %rdi
	callq	_rtl92c_dm_init
LBB0_13:
	callq	_local_irq_restore
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HARDWARE_TYPE_RTL8192CU,4,2    ## @HARDWARE_TYPE_RTL8192CU
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"init mac failed!\n"

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

	.comm	_RF_OP_BY_SW_3WIRE,4,2          ## @RF_OP_BY_SW_3WIRE
	.comm	_RF90_PATH_A,4,2                ## @RF90_PATH_A
	.comm	_RF_RX_G1,4,2                   ## @RF_RX_G1
	.comm	_MASKDWORD,4,2                  ## @MASKDWORD
	.comm	_RF_RX_G2,4,2                   ## @RF_RX_G2
	.comm	_RF_CHNLBW,4,2                  ## @RF_CHNLBW
	.comm	_RFREG_OFFSET_MASK,4,2          ## @RFREG_OFFSET_MASK
	.comm	_ERFON,8,3                      ## @ERFON
	.comm	_HW_VAR_ETHER_ADDR,4,2          ## @HW_VAR_ETHER_ADDR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92cu_hw_init                ; -- Begin function rtl92cu_hw_init
	.p2align	2
_rtl92cu_hw_init:                       ; @rtl92cu_hw_init
	.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
	bl	_rtl_priv
	mov	x20, x0
	mov	x0, x19
	bl	_rtl_priv
	bl	_rtl_hal
	mov	x23, x0
	mov	x0, x19
	bl	_rtl_priv
	bl	_rtl_mac
	mov	x21, x0
	mov	x0, x19
	bl	_rtl_priv
	bl	_rtl_psc
	mov	x22, x0
	bl	_local_save_flags
	bl	_local_irq_enable
	str	wzr, [x23]
Lloh0:
	adrp	x8, _HARDWARE_TYPE_RTL8192CU@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HARDWARE_TYPE_RTL8192CU@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x23, #16]
	mov	x0, x19
	bl	__rtl92cu_init_mac
	cbz	w0, LBB0_2
; %bb.1:
	mov	x24, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_13
LBB0_2:
	mov	x0, x19
	bl	_rtl92c_download_fw
	cbz	w0, LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _COMP_ERR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _COMP_ERR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _DBG_WARNING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DBG_WARNING@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x3, l_.str.1@PAGE
Lloh12:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_RT_TRACE
	mov	w24, #1
	b	LBB0_13
LBB0_4:
	mov	w8, #1
	str	w8, [x23]
	str	xzr, [x23, #8]
	mov	x0, x19
	bl	__rtl92cu_phy_param_tab_init
	mov	x0, x19
	bl	_rtl92cu_phy_mac_config
	mov	x0, x19
	bl	_rtl92cu_phy_bb_config
Lloh13:
	adrp	x8, _RF_OP_BY_SW_3WIRE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _RF_OP_BY_SW_3WIRE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x20, #24]
	mov	x0, x19
	bl	_rtl92c_phy_rf_config
	ldr	w0, [x23, #4]
	bl	_IS_VENDOR_UMC_A_CUT
	cbz	x0, LBB0_7
; %bb.5:
	ldr	w0, [x23, #4]
	bl	_IS_92C_SERIAL
	cbnz	w0, LBB0_7
; %bb.6:
Lloh16:
	adrp	x23, _RF90_PATH_A@GOTPAGE
Lloh17:
	ldr	x23, [x23, _RF90_PATH_A@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh18:
	adrp	x8, _RF_RX_G1@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RF_RX_G1@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
Lloh21:
	adrp	x24, _MASKDWORD@GOTPAGE
Lloh22:
	ldr	x24, [x24, _MASKDWORD@GOTPAGEOFF]
	ldr	w3, [x24]
	mov	x0, x19
	mov	w4, #597
	movk	w4, #3, lsl #16
	bl	_rtl_set_rfreg
	ldr	w1, [x23]
Lloh23:
	adrp	x8, _RF_RX_G2@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RF_RX_G2@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	ldr	w3, [x24]
	mov	x0, x19
	mov	w4, #2560
	movk	w4, #5, lsl #16
	bl	_rtl_set_rfreg
LBB0_7:
Lloh26:
	adrp	x23, _RF_CHNLBW@GOTPAGE
Lloh27:
	ldr	x23, [x23, _RF_CHNLBW@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh28:
	adrp	x24, _RFREG_OFFSET_MASK@GOTPAGE
Lloh29:
	ldr	x24, [x24, _RFREG_OFFSET_MASK@GOTPAGEOFF]
	ldr	w3, [x24]
	mov	x0, x19
	mov	w1, #0
	bl	_rtl_get_rfreg
	ldr	x8, [x20, #16]
	str	x0, [x8]
	ldr	w2, [x23]
	ldr	w3, [x24]
	mov	x0, x19
	mov	w1, #1
	bl	_rtl_get_rfreg
	ldr	x8, [x20, #16]
	str	x0, [x8, #8]
	mov	x0, x19
	bl	_rtl92cu_bb_block_on
	mov	x0, x19
	bl	_rtl_cam_reset_all_entry
	mov	x0, x19
	bl	_rtl92cu_enable_hw_security_config
Lloh30:
	adrp	x23, _ERFON@GOTPAGE
Lloh31:
	ldr	x23, [x23, _ERFON@GOTPAGEOFF]
	ldr	x8, [x23]
	str	x8, [x22]
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh32:
	adrp	x9, _HW_VAR_ETHER_ADDR@GOTPAGE
Lloh33:
	ldr	x9, [x9, _HW_VAR_ETHER_ADDR@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x9]
	ldr	w2, [x21]
	mov	x0, x19
	blr	x8
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.8:
	mov	w21, #1
	mov	x0, x19
	mov	w1, #1
	bl	_rtl92c_phy_set_rfpath_switch
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_10
; %bb.9:
	mov	x0, x19
	mov	w1, #1
	bl	_rtl92c_phy_iq_calibrate
	b	LBB0_11
LBB0_10:
	mov	x0, x19
	mov	w1, #0
	bl	_rtl92c_phy_iq_calibrate
	str	w21, [x20, #8]
LBB0_11:
	mov	x0, x19
	bl	_rtl92c_dm_check_txpower_tracking
	mov	x0, x19
	bl	_rtl92c_phy_lc_calibrate
LBB0_12:
	mov	x0, x19
	bl	__rtl92cu_hw_configure
	mov	x0, x19
	bl	__initpabias
	mov	x0, x19
	bl	_rtl92c_dm_init
	mov	w24, #0
LBB0_13:
	bl	_local_irq_restore
	mov	x0, x24
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_HARDWARE_TYPE_RTL8192CU,4,2    ; @HARDWARE_TYPE_RTL8192CU
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"init mac failed!\n"

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

	.comm	_RF_OP_BY_SW_3WIRE,4,2          ; @RF_OP_BY_SW_3WIRE
	.comm	_RF90_PATH_A,4,2                ; @RF90_PATH_A
	.comm	_RF_RX_G1,4,2                   ; @RF_RX_G1
	.comm	_MASKDWORD,4,2                  ; @MASKDWORD
	.comm	_RF_RX_G2,4,2                   ; @RF_RX_G2
	.comm	_RF_CHNLBW,4,2                  ; @RF_CHNLBW
	.comm	_RFREG_OFFSET_MASK,4,2          ; @RFREG_OFFSET_MASK
	.comm	_ERFON,8,3                      ; @ERFON
	.comm	_HW_VAR_ETHER_ADDR,4,2          ; @HW_VAR_ETHER_ADDR
.subsections_via_symbols
