	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _rtl92ce_poweroff_adapter
__rtl92ce_poweroff_adapter:             ## @_rtl92ce_poweroff_adapter
	.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, %r15
	callq	_rtl_priv
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_rtl_hal
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	movq	_REG_TXPAUSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	movl	$255, %edx
	callq	_rtl_write_byte
	movq	_RF90_PATH_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RFREG_OFFSET_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_rtl_set_rfreg
	movq	_REG_RF_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rtl_write_byte
	movq	_REG_APSD_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	movl	$64, %edx
	callq	_rtl_write_byte
	movq	_REG_SYS_FUNC_EN@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	movq	%rbx, %rdi
	movl	$226, %edx
	callq	_rtl_write_byte
	movq	(%r13), %rsi
	movq	%rbx, %rdi
	movl	$224, %edx
	callq	_rtl_write_byte
	movq	_REG_MCUFWDL@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	callq	_rtl_read_byte
	movl	%eax, %r12d
	movl	$7, %edi
	callq	_BIT
	testl	%r12d, %eax
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_rtl92c_firmware_selfreset
LBB0_2:
	movq	(%r13), %rsi
	incq	%rsi
	movq	%rbx, %rdi
	movl	$81, %edx
	callq	_rtl_write_byte
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rtl_write_byte
	movq	_REG_GPIO_PIN_CTRL@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rtl_write_dword
	movq	(%r15), %rsi
	movq	%rbx, %rdi
	callq	_rtl_read_byte
	cmpq	$0, 8(%rbx)
	je	LBB0_5
## %bb.3:
	movq	(%rbx), %rdx
	movq	_BT_CSR_BC4@GOTPCREL(%rip), %rsi
	movl	$15925248, %ecx                 ## imm = 0xF30000
	cmpq	(%rsi), %rdx
	je	LBB0_6
## %bb.4:
	movq	_BT_CSR_BC8@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	je	LBB0_6
LBB0_5:
	movl	$16711680, %ecx                 ## imm = 0xFF0000
LBB0_6:
	movq	(%r15), %rsi
	shll	$8, %eax
	orl	%ecx, %eax
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_rtl_write_dword
	movq	_REG_GPIO_IO_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1936, %edx                     ## imm = 0x790
	callq	_rtl_write_word
	movq	_REG_LEDCFG0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$32896, %edx                    ## imm = 0x8080
	callq	_rtl_write_word
	movq	_REG_AFE_PLL_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	movl	$128, %edx
	callq	_rtl_write_byte
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_IS_81XXC_VENDOR_UMC_B_CUT
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	_REG_SPS0_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	movl	$35, %edx
	callq	_rtl_write_byte
LBB0_8:
	cmpq	$0, 8(%rbx)
	movq	_REG_AFE_XTAL_CTRL@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	je	LBB0_10
## %bb.9:
	callq	_rtl_read_dword
	orl	$58869760, %eax                 ## imm = 0x3824800
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	jmp	LBB0_11
LBB0_10:
	movl	$14, %edx
LBB0_11:
	callq	_rtl_write_dword
	movq	_REG_RSV_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	movl	$14, %edx
	callq	_rtl_write_byte
	movq	_REG_APS_FSMCO@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	incq	%rsi
	movq	%rbx, %rdi
	movl	$16, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rtl_write_byte                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_TXPAUSE,8,3                ## @REG_TXPAUSE
	.comm	_RF90_PATH_A,4,2                ## @RF90_PATH_A
	.comm	_RFREG_OFFSET_MASK,4,2          ## @RFREG_OFFSET_MASK
	.comm	_REG_RF_CTRL,8,3                ## @REG_RF_CTRL
	.comm	_REG_APSD_CTRL,8,3              ## @REG_APSD_CTRL
	.comm	_REG_SYS_FUNC_EN,8,3            ## @REG_SYS_FUNC_EN
	.comm	_REG_MCUFWDL,8,3                ## @REG_MCUFWDL
	.comm	_REG_GPIO_PIN_CTRL,8,3          ## @REG_GPIO_PIN_CTRL
	.comm	_BT_CSR_BC4,8,3                 ## @BT_CSR_BC4
	.comm	_BT_CSR_BC8,8,3                 ## @BT_CSR_BC8
	.comm	_REG_GPIO_IO_SEL,4,2            ## @REG_GPIO_IO_SEL
	.comm	_REG_LEDCFG0,4,2                ## @REG_LEDCFG0
	.comm	_REG_AFE_PLL_CTRL,8,3           ## @REG_AFE_PLL_CTRL
	.comm	_REG_SPS0_CTRL,8,3              ## @REG_SPS0_CTRL
	.comm	_REG_AFE_XTAL_CTRL,8,3          ## @REG_AFE_XTAL_CTRL
	.comm	_REG_RSV_CTRL,8,3               ## @REG_RSV_CTRL
	.comm	_REG_APS_FSMCO,8,3              ## @REG_APS_FSMCO
	.no_dead_strip	__rtl92ce_poweroff_adapter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _rtl92ce_poweroff_adapter
__rtl92ce_poweroff_adapter:             ; @_rtl92ce_poweroff_adapter
	.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	x21, x0
	bl	_rtl_priv
	mov	x19, x0
	bl	_rtl_hal
	mov	x20, x0
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	mov	x0, x21
	blr	x8
Lloh0:
	adrp	x8, _REG_TXPAUSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_TXPAUSE@GOTPAGEOFF]
Lloh2:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #255
	bl	_rtl_write_byte
Lloh3:
	adrp	x8, _RF90_PATH_A@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RF90_PATH_A@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _RFREG_OFFSET_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RFREG_OFFSET_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x21
	mov	w2, #0
	mov	w4, #0
	bl	_rtl_set_rfreg
Lloh9:
	adrp	x8, _REG_RF_CTRL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_RF_CTRL@GOTPAGEOFF]
Lloh11:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_rtl_write_byte
Lloh12:
	adrp	x8, _REG_APSD_CTRL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_APSD_CTRL@GOTPAGEOFF]
Lloh14:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #64
	bl	_rtl_write_byte
Lloh15:
	adrp	x23, _REG_SYS_FUNC_EN@GOTPAGE
Lloh16:
	ldr	x23, [x23, _REG_SYS_FUNC_EN@GOTPAGEOFF]
	ldr	x1, [x23]
	mov	x0, x19
	mov	w2, #226
	bl	_rtl_write_byte
	ldr	x1, [x23]
	mov	x0, x19
	mov	w2, #224
	bl	_rtl_write_byte
Lloh17:
	adrp	x24, _REG_MCUFWDL@GOTPAGE
Lloh18:
	ldr	x24, [x24, _REG_MCUFWDL@GOTPAGEOFF]
	ldr	x1, [x24]
	mov	x0, x19
	bl	_rtl_read_byte
	mov	x22, x0
	mov	w0, #7
	bl	_BIT
	tst	w0, w22
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_rtl92c_firmware_selfreset
LBB0_2:
	ldr	x8, [x23]
	add	x1, x8, #1
	mov	x0, x19
	mov	w2, #81
	bl	_rtl_write_byte
	ldr	x1, [x24]
	mov	x0, x19
	mov	w2, #0
	bl	_rtl_write_byte
Lloh19:
	adrp	x21, _REG_GPIO_PIN_CTRL@GOTPAGE
Lloh20:
	ldr	x21, [x21, _REG_GPIO_PIN_CTRL@GOTPAGEOFF]
	ldr	x1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_rtl_write_dword
	ldr	x1, [x21]
	mov	x0, x19
	bl	_rtl_read_byte
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x9, [x19]
Lloh21:
	adrp	x8, _BT_CSR_BC4@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BT_CSR_BC4@GOTPAGEOFF]
Lloh23:
	ldr	x10, [x8]
	mov	w8, #15925248
	cmp	x9, x10
	b.eq	LBB0_6
; %bb.4:
Lloh24:
	adrp	x10, _BT_CSR_BC8@GOTPAGE
Lloh25:
	ldr	x10, [x10, _BT_CSR_BC8@GOTPAGEOFF]
Lloh26:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_6
LBB0_5:
	mov	w8, #16711680
LBB0_6:
	ldr	x1, [x21]
	orr	w2, w8, w0, lsl #8
	mov	x0, x19
	bl	_rtl_write_dword
Lloh27:
	adrp	x8, _REG_GPIO_IO_SEL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _REG_GPIO_IO_SEL@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1936
	bl	_rtl_write_word
Lloh30:
	adrp	x8, _REG_LEDCFG0@GOTPAGE
Lloh31:
	ldr	x8, [x8, _REG_LEDCFG0@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #32896
	bl	_rtl_write_word
Lloh33:
	adrp	x8, _REG_AFE_PLL_CTRL@GOTPAGE
Lloh34:
	ldr	x8, [x8, _REG_AFE_PLL_CTRL@GOTPAGEOFF]
Lloh35:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #128
	bl	_rtl_write_byte
	ldr	w0, [x20]
	bl	_IS_81XXC_VENDOR_UMC_B_CUT
	cbnz	w0, LBB0_8
; %bb.7:
Lloh36:
	adrp	x8, _REG_SPS0_CTRL@GOTPAGE
Lloh37:
	ldr	x8, [x8, _REG_SPS0_CTRL@GOTPAGEOFF]
Lloh38:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #35
	bl	_rtl_write_byte
LBB0_8:
	ldr	x8, [x19, #8]
Lloh39:
	adrp	x20, _REG_AFE_XTAL_CTRL@GOTPAGE
Lloh40:
	ldr	x20, [x20, _REG_AFE_XTAL_CTRL@GOTPAGEOFF]
	ldr	x1, [x20]
	mov	x0, x19
	cbz	x8, LBB0_10
; %bb.9:
	bl	_rtl_read_dword
	mov	w8, #18432
	movk	w8, #898, lsl #16
	orr	w2, w0, w8
	ldr	x1, [x20]
	mov	x0, x19
	b	LBB0_11
LBB0_10:
	mov	w2, #14
LBB0_11:
	bl	_rtl_write_dword
Lloh41:
	adrp	x8, _REG_RSV_CTRL@GOTPAGE
Lloh42:
	ldr	x8, [x8, _REG_RSV_CTRL@GOTPAGEOFF]
Lloh43:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #14
	bl	_rtl_write_byte
Lloh44:
	adrp	x8, _REG_APS_FSMCO@GOTPAGE
Lloh45:
	ldr	x8, [x8, _REG_APS_FSMCO@GOTPAGEOFF]
Lloh46:
	ldr	x8, [x8]
	add	x1, x8, #1
	mov	x0, x19
	mov	w2, #16
	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	_rtl_write_byte
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_TXPAUSE,8,3                ; @REG_TXPAUSE
	.comm	_RF90_PATH_A,4,2                ; @RF90_PATH_A
	.comm	_RFREG_OFFSET_MASK,4,2          ; @RFREG_OFFSET_MASK
	.comm	_REG_RF_CTRL,8,3                ; @REG_RF_CTRL
	.comm	_REG_APSD_CTRL,8,3              ; @REG_APSD_CTRL
	.comm	_REG_SYS_FUNC_EN,8,3            ; @REG_SYS_FUNC_EN
	.comm	_REG_MCUFWDL,8,3                ; @REG_MCUFWDL
	.comm	_REG_GPIO_PIN_CTRL,8,3          ; @REG_GPIO_PIN_CTRL
	.comm	_BT_CSR_BC4,8,3                 ; @BT_CSR_BC4
	.comm	_BT_CSR_BC8,8,3                 ; @BT_CSR_BC8
	.comm	_REG_GPIO_IO_SEL,4,2            ; @REG_GPIO_IO_SEL
	.comm	_REG_LEDCFG0,4,2                ; @REG_LEDCFG0
	.comm	_REG_AFE_PLL_CTRL,8,3           ; @REG_AFE_PLL_CTRL
	.comm	_REG_SPS0_CTRL,8,3              ; @REG_SPS0_CTRL
	.comm	_REG_AFE_XTAL_CTRL,8,3          ; @REG_AFE_XTAL_CTRL
	.comm	_REG_RSV_CTRL,8,3               ; @REG_RSV_CTRL
	.comm	_REG_APS_FSMCO,8,3              ; @REG_APS_FSMCO
	.no_dead_strip	__rtl92ce_poweroff_adapter
.subsections_via_symbols
