	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ms_power_on
_ms_power_on:                           ## @ms_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_rtsx_pci_init_cmd
	movq	_WRITE_REG_CMD@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_CARD_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MS_MOD_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rdi
	movl	$7, %ecx
	callq	_rtsx_pci_add_cmd
	movl	(%r14), %esi
	movq	_CARD_SHARE_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CARD_SHARE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_CARD_SHARE_48_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rdi
	callq	_rtsx_pci_add_cmd
	movl	(%r14), %esi
	movq	_CARD_CLK_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MS_CLK_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%ecx, %r8d
	callq	_rtsx_pci_add_cmd
	movq	%rbx, %rdi
	movl	$100, %esi
	callq	_rtsx_pci_send_cmd
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movq	_RTSX_MS_CARD@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_rtsx_pci_card_pull_ctl_enable
	testl	%eax, %eax
	js	LBB0_4
## %bb.2:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_rtsx_pci_card_power_on
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	movl	$150, %edi
	callq	_msleep
	movq	_CARD_OE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MS_OUTPUT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%ecx, %edx
	callq	_rtsx_pci_write_register
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WRITE_REG_CMD,4,2              ## @WRITE_REG_CMD
	.comm	_CARD_SELECT,4,2                ## @CARD_SELECT
	.comm	_MS_MOD_SEL,4,2                 ## @MS_MOD_SEL
	.comm	_CARD_SHARE_MODE,4,2            ## @CARD_SHARE_MODE
	.comm	_CARD_SHARE_MASK,4,2            ## @CARD_SHARE_MASK
	.comm	_CARD_SHARE_48_MS,4,2           ## @CARD_SHARE_48_MS
	.comm	_CARD_CLK_EN,4,2                ## @CARD_CLK_EN
	.comm	_MS_CLK_EN,4,2                  ## @MS_CLK_EN
	.comm	_RTSX_MS_CARD,4,2               ## @RTSX_MS_CARD
	.comm	_CARD_OE,4,2                    ## @CARD_OE
	.comm	_MS_OUTPUT_EN,4,2               ## @MS_OUTPUT_EN
	.no_dead_strip	_ms_power_on
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ms_power_on
_ms_power_on:                           ; @ms_power_on
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x19, [x0]
	mov	x0, x19
	bl	_rtsx_pci_init_cmd
Lloh0:
	adrp	x20, _WRITE_REG_CMD@GOTPAGE
Lloh1:
	ldr	x20, [x20, _WRITE_REG_CMD@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x8, _CARD_SELECT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CARD_SELECT@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
Lloh5:
	adrp	x8, _MS_MOD_SEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MS_MOD_SEL@GOTPAGEOFF]
Lloh7:
	ldr	w4, [x8]
	mov	x0, x19
	mov	w3, #7
	bl	_rtsx_pci_add_cmd
	ldr	w1, [x20]
Lloh8:
	adrp	x8, _CARD_SHARE_MODE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CARD_SHARE_MODE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x8, _CARD_SHARE_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CARD_SHARE_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
Lloh14:
	adrp	x8, _CARD_SHARE_48_MS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CARD_SHARE_48_MS@GOTPAGEOFF]
Lloh16:
	ldr	w4, [x8]
	mov	x0, x19
	bl	_rtsx_pci_add_cmd
	ldr	w1, [x20]
Lloh17:
	adrp	x8, _CARD_CLK_EN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CARD_CLK_EN@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
Lloh20:
	adrp	x8, _MS_CLK_EN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MS_CLK_EN@GOTPAGEOFF]
Lloh22:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x4, x3
	bl	_rtsx_pci_add_cmd
	mov	x0, x19
	mov	w1, #100
	bl	_rtsx_pci_send_cmd
	tbnz	w0, #31, LBB0_4
; %bb.1:
Lloh23:
	adrp	x20, _RTSX_MS_CARD@GOTPAGE
Lloh24:
	ldr	x20, [x20, _RTSX_MS_CARD@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rtsx_pci_card_pull_ctl_enable
	tbnz	w0, #31, LBB0_4
; %bb.2:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rtsx_pci_card_power_on
	tbnz	w0, #31, LBB0_4
; %bb.3:
	mov	w0, #150
	bl	_msleep
Lloh25:
	adrp	x8, _CARD_OE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CARD_OE@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x8, _MS_OUTPUT_EN@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MS_OUTPUT_EN@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x2
	bl	_rtsx_pci_write_register
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.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
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_WRITE_REG_CMD,4,2              ; @WRITE_REG_CMD
	.comm	_CARD_SELECT,4,2                ; @CARD_SELECT
	.comm	_MS_MOD_SEL,4,2                 ; @MS_MOD_SEL
	.comm	_CARD_SHARE_MODE,4,2            ; @CARD_SHARE_MODE
	.comm	_CARD_SHARE_MASK,4,2            ; @CARD_SHARE_MASK
	.comm	_CARD_SHARE_48_MS,4,2           ; @CARD_SHARE_48_MS
	.comm	_CARD_CLK_EN,4,2                ; @CARD_CLK_EN
	.comm	_MS_CLK_EN,4,2                  ; @MS_CLK_EN
	.comm	_RTSX_MS_CARD,4,2               ; @RTSX_MS_CARD
	.comm	_CARD_OE,4,2                    ; @CARD_OE
	.comm	_MS_OUTPUT_EN,4,2               ; @MS_OUTPUT_EN
	.no_dead_strip	_ms_power_on
.subsections_via_symbols
