	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8723bu_power_on
_rtl8723bu_power_on:                    ## @rtl8723bu_power_on
	.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, %rbx
	callq	_rtl8xxxu_disabled_to_emu
	movq	%rbx, %rdi
	callq	_rtl8723b_emu_to_active
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_REG_CR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_rtl8xxxu_read16
	movq	_CR_HCI_TXDMA_ENABLE@GOTPCREL(%rip), %rcx
	movq	_CR_HCI_RXDMA_ENABLE@GOTPCREL(%rip), %rdx
	movq	_CR_TXDMA_ENABLE@GOTPCREL(%rip), %rsi
	movq	_CR_RXDMA_ENABLE@GOTPCREL(%rip), %rdi
	movq	_CR_PROTOCOL_ENABLE@GOTPCREL(%rip), %r8
	movq	_CR_SCHEDULE_ENABLE@GOTPCREL(%rip), %r9
	movq	_CR_MAC_TX_ENABLE@GOTPCREL(%rip), %r10
	movq	_CR_MAC_RX_ENABLE@GOTPCREL(%rip), %r11
	movq	_CR_SECURITY_ENABLE@GOTPCREL(%rip), %r12
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	orl	(%rsi), %eax
	orl	(%rdi), %eax
	orl	(%r8), %eax
	orl	(%r9), %eax
	orl	(%r10), %eax
	orl	(%r11), %eax
	orl	(%r12), %eax
	movq	_CR_CALTIMER_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_rtl8xxxu_write16
	movq	_REG_PAD_CTRL1@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	addl	$3, %esi
	movq	%rbx, %rdi
	movl	$32, %edx
	callq	_rtl8xxxu_write8
	movq	_REG_SYS_FUNC@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_rtl8xxxu_read16
	movq	_SYS_FUNC_BBRSTB@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_SYS_FUNC_BB_GLB_RSTN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_rtl8xxxu_write16
	movq	_REG_BT_CONTROL_8723BU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	incl	%esi
	movq	%rbx, %rdi
	movl	$24, %edx
	callq	_rtl8xxxu_write8
	movq	_REG_WLAN_ACT_CONTROL_8723B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_rtl8xxxu_write8
	movq	_REG_S0S1_PATH_SWITCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rtl8xxxu_write32
	movq	%rbx, %rdi
	movl	$65032, %esi                    ## imm = 0xFE08
	movl	$1, %edx
	callq	_rtl8xxxu_write8
	movq	_REG_PWR_DATA@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_rtl8xxxu_read16
	movq	_PWR_DATA_EEPRPAD_RFE_CTRL_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_rtl8xxxu_write16
	movq	_REG_LEDCFG0@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_rtl8xxxu_read32
	movq	_LEDCFG0_DPDT_SELECT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_rtl8xxxu_write32
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_rtl8xxxu_read8
	movq	_PAD_CTRL1_SW_DPDT_SEL_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_rtl8xxxu_write8
LBB0_2:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_CR,4,2                     ## @REG_CR
	.comm	_CR_HCI_TXDMA_ENABLE,4,2        ## @CR_HCI_TXDMA_ENABLE
	.comm	_CR_HCI_RXDMA_ENABLE,4,2        ## @CR_HCI_RXDMA_ENABLE
	.comm	_CR_TXDMA_ENABLE,4,2            ## @CR_TXDMA_ENABLE
	.comm	_CR_RXDMA_ENABLE,4,2            ## @CR_RXDMA_ENABLE
	.comm	_CR_PROTOCOL_ENABLE,4,2         ## @CR_PROTOCOL_ENABLE
	.comm	_CR_SCHEDULE_ENABLE,4,2         ## @CR_SCHEDULE_ENABLE
	.comm	_CR_MAC_TX_ENABLE,4,2           ## @CR_MAC_TX_ENABLE
	.comm	_CR_MAC_RX_ENABLE,4,2           ## @CR_MAC_RX_ENABLE
	.comm	_CR_SECURITY_ENABLE,4,2         ## @CR_SECURITY_ENABLE
	.comm	_CR_CALTIMER_ENABLE,4,2         ## @CR_CALTIMER_ENABLE
	.comm	_REG_PAD_CTRL1,4,2              ## @REG_PAD_CTRL1
	.comm	_REG_SYS_FUNC,4,2               ## @REG_SYS_FUNC
	.comm	_SYS_FUNC_BBRSTB,4,2            ## @SYS_FUNC_BBRSTB
	.comm	_SYS_FUNC_BB_GLB_RSTN,4,2       ## @SYS_FUNC_BB_GLB_RSTN
	.comm	_REG_BT_CONTROL_8723BU,4,2      ## @REG_BT_CONTROL_8723BU
	.comm	_REG_WLAN_ACT_CONTROL_8723B,4,2 ## @REG_WLAN_ACT_CONTROL_8723B
	.comm	_REG_S0S1_PATH_SWITCH,4,2       ## @REG_S0S1_PATH_SWITCH
	.comm	_REG_PWR_DATA,4,2               ## @REG_PWR_DATA
	.comm	_PWR_DATA_EEPRPAD_RFE_CTRL_EN,4,2 ## @PWR_DATA_EEPRPAD_RFE_CTRL_EN
	.comm	_REG_LEDCFG0,4,2                ## @REG_LEDCFG0
	.comm	_LEDCFG0_DPDT_SELECT,4,2        ## @LEDCFG0_DPDT_SELECT
	.comm	_PAD_CTRL1_SW_DPDT_SEL_DATA,4,2 ## @PAD_CTRL1_SW_DPDT_SEL_DATA
	.no_dead_strip	_rtl8723bu_power_on
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8723bu_power_on
_rtl8723bu_power_on:                    ; @rtl8723bu_power_on
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_rtl8xxxu_disabled_to_emu
	mov	x0, x19
	bl	_rtl8723b_emu_to_active
	mov	x20, x0
	cbnz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x21, _REG_CR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _REG_CR@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtl8xxxu_read16
Lloh2:
	adrp	x8, _CR_HCI_TXDMA_ENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CR_HCI_TXDMA_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _CR_HCI_RXDMA_ENABLE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CR_HCI_RXDMA_ENABLE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _CR_TXDMA_ENABLE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _CR_TXDMA_ENABLE@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	adrp	x11, _CR_RXDMA_ENABLE@GOTPAGE
Lloh12:
	ldr	x11, [x11, _CR_RXDMA_ENABLE@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
Lloh14:
	adrp	x12, _CR_PROTOCOL_ENABLE@GOTPAGE
Lloh15:
	ldr	x12, [x12, _CR_PROTOCOL_ENABLE@GOTPAGEOFF]
Lloh16:
	ldr	w12, [x12]
Lloh17:
	adrp	x13, _CR_SCHEDULE_ENABLE@GOTPAGE
Lloh18:
	ldr	x13, [x13, _CR_SCHEDULE_ENABLE@GOTPAGEOFF]
Lloh19:
	ldr	w13, [x13]
Lloh20:
	adrp	x14, _CR_MAC_TX_ENABLE@GOTPAGE
Lloh21:
	ldr	x14, [x14, _CR_MAC_TX_ENABLE@GOTPAGEOFF]
Lloh22:
	ldr	w14, [x14]
Lloh23:
	adrp	x15, _CR_MAC_RX_ENABLE@GOTPAGE
Lloh24:
	ldr	x15, [x15, _CR_MAC_RX_ENABLE@GOTPAGEOFF]
Lloh25:
	ldr	w15, [x15]
Lloh26:
	adrp	x16, _CR_SECURITY_ENABLE@GOTPAGE
Lloh27:
	ldr	x16, [x16, _CR_SECURITY_ENABLE@GOTPAGEOFF]
Lloh28:
	ldr	w16, [x16]
Lloh29:
	adrp	x17, _CR_CALTIMER_ENABLE@GOTPAGE
Lloh30:
	ldr	x17, [x17, _CR_CALTIMER_ENABLE@GOTPAGEOFF]
Lloh31:
	ldr	w17, [x17]
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w8, w8, w11
	orr	w8, w8, w12
	orr	w8, w8, w13
	orr	w8, w8, w14
	orr	w8, w8, w15
	orr	w8, w8, w16
	orr	w2, w8, w17
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtl8xxxu_write16
Lloh32:
	adrp	x21, _REG_PAD_CTRL1@GOTPAGE
Lloh33:
	ldr	x21, [x21, _REG_PAD_CTRL1@GOTPAGEOFF]
	ldr	w8, [x21]
	add	w1, w8, #3
	mov	x0, x19
	mov	w2, #32
	bl	_rtl8xxxu_write8
Lloh34:
	adrp	x22, _REG_SYS_FUNC@GOTPAGE
Lloh35:
	ldr	x22, [x22, _REG_SYS_FUNC@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl8xxxu_read16
Lloh36:
	adrp	x8, _SYS_FUNC_BBRSTB@GOTPAGE
Lloh37:
	ldr	x8, [x8, _SYS_FUNC_BBRSTB@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
Lloh39:
	adrp	x9, _SYS_FUNC_BB_GLB_RSTN@GOTPAGE
Lloh40:
	ldr	x9, [x9, _SYS_FUNC_BB_GLB_RSTN@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w2, w8, w9
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl8xxxu_write16
Lloh42:
	adrp	x8, _REG_BT_CONTROL_8723BU@GOTPAGE
Lloh43:
	ldr	x8, [x8, _REG_BT_CONTROL_8723BU@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	add	w1, w8, #1
	mov	x0, x19
	mov	w2, #24
	bl	_rtl8xxxu_write8
Lloh45:
	adrp	x8, _REG_WLAN_ACT_CONTROL_8723B@GOTPAGE
Lloh46:
	ldr	x8, [x8, _REG_WLAN_ACT_CONTROL_8723B@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #4
	bl	_rtl8xxxu_write8
Lloh48:
	adrp	x8, _REG_S0S1_PATH_SWITCH@GOTPAGE
Lloh49:
	ldr	x8, [x8, _REG_S0S1_PATH_SWITCH@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_rtl8xxxu_write32
	mov	x0, x19
	mov	w1, #65032
	mov	w2, #1
	bl	_rtl8xxxu_write8
Lloh51:
	adrp	x22, _REG_PWR_DATA@GOTPAGE
Lloh52:
	ldr	x22, [x22, _REG_PWR_DATA@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl8xxxu_read16
Lloh53:
	adrp	x8, _PWR_DATA_EEPRPAD_RFE_CTRL_EN@GOTPAGE
Lloh54:
	ldr	x8, [x8, _PWR_DATA_EEPRPAD_RFE_CTRL_EN@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl8xxxu_write16
Lloh56:
	adrp	x22, _REG_LEDCFG0@GOTPAGE
Lloh57:
	ldr	x22, [x22, _REG_LEDCFG0@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl8xxxu_read32
Lloh58:
	adrp	x8, _LEDCFG0_DPDT_SELECT@GOTPAGE
Lloh59:
	ldr	x8, [x8, _LEDCFG0_DPDT_SELECT@GOTPAGEOFF]
Lloh60:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl8xxxu_write32
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtl8xxxu_read8
Lloh61:
	adrp	x8, _PAD_CTRL1_SW_DPDT_SEL_DATA@GOTPAGE
Lloh62:
	ldr	x8, [x8, _PAD_CTRL1_SW_DPDT_SEL_DATA@GOTPAGEOFF]
Lloh63:
	ldr	w8, [x8]
	bic	w2, w0, w8
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtl8xxxu_write8
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGot	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.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_CR,4,2                     ; @REG_CR
	.comm	_CR_HCI_TXDMA_ENABLE,4,2        ; @CR_HCI_TXDMA_ENABLE
	.comm	_CR_HCI_RXDMA_ENABLE,4,2        ; @CR_HCI_RXDMA_ENABLE
	.comm	_CR_TXDMA_ENABLE,4,2            ; @CR_TXDMA_ENABLE
	.comm	_CR_RXDMA_ENABLE,4,2            ; @CR_RXDMA_ENABLE
	.comm	_CR_PROTOCOL_ENABLE,4,2         ; @CR_PROTOCOL_ENABLE
	.comm	_CR_SCHEDULE_ENABLE,4,2         ; @CR_SCHEDULE_ENABLE
	.comm	_CR_MAC_TX_ENABLE,4,2           ; @CR_MAC_TX_ENABLE
	.comm	_CR_MAC_RX_ENABLE,4,2           ; @CR_MAC_RX_ENABLE
	.comm	_CR_SECURITY_ENABLE,4,2         ; @CR_SECURITY_ENABLE
	.comm	_CR_CALTIMER_ENABLE,4,2         ; @CR_CALTIMER_ENABLE
	.comm	_REG_PAD_CTRL1,4,2              ; @REG_PAD_CTRL1
	.comm	_REG_SYS_FUNC,4,2               ; @REG_SYS_FUNC
	.comm	_SYS_FUNC_BBRSTB,4,2            ; @SYS_FUNC_BBRSTB
	.comm	_SYS_FUNC_BB_GLB_RSTN,4,2       ; @SYS_FUNC_BB_GLB_RSTN
	.comm	_REG_BT_CONTROL_8723BU,4,2      ; @REG_BT_CONTROL_8723BU
	.comm	_REG_WLAN_ACT_CONTROL_8723B,4,2 ; @REG_WLAN_ACT_CONTROL_8723B
	.comm	_REG_S0S1_PATH_SWITCH,4,2       ; @REG_S0S1_PATH_SWITCH
	.comm	_REG_PWR_DATA,4,2               ; @REG_PWR_DATA
	.comm	_PWR_DATA_EEPRPAD_RFE_CTRL_EN,4,2 ; @PWR_DATA_EEPRPAD_RFE_CTRL_EN
	.comm	_REG_LEDCFG0,4,2                ; @REG_LEDCFG0
	.comm	_LEDCFG0_DPDT_SELECT,4,2        ; @LEDCFG0_DPDT_SELECT
	.comm	_PAD_CTRL1_SW_DPDT_SEL_DATA,4,2 ; @PAD_CTRL1_SW_DPDT_SEL_DATA
	.no_dead_strip	_rtl8723bu_power_on
.subsections_via_symbols
