	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtsx_base_card_power_off
_rtsx_base_card_power_off:              ## @rtsx_base_card_power_off
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	cmpq	$0, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_rtsx_pci_disable_ocp
LBB0_2:
	movq	_CARD_PWR_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SD_POWER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SD_POWER_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_rtsx_pci_write_register
	movq	_PWR_GATE_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LDO3318_PWR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_rtsx_pci_write_register
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CARD_PWR_CTL,4,2               ## @CARD_PWR_CTL
	.comm	_SD_POWER_MASK,4,2              ## @SD_POWER_MASK
	.comm	_SD_POWER_OFF,4,2               ## @SD_POWER_OFF
	.comm	_PWR_GATE_CTRL,4,2              ## @PWR_GATE_CTRL
	.comm	_LDO3318_PWR_MASK,4,2           ## @LDO3318_PWR_MASK
	.no_dead_strip	_rtsx_base_card_power_off
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtsx_base_card_power_off
_rtsx_base_card_power_off:              ; @rtsx_base_card_power_off
	.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
	mov	x19, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_rtsx_pci_disable_ocp
LBB0_2:
Lloh0:
	adrp	x8, _CARD_PWR_CTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CARD_PWR_CTL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _SD_POWER_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SD_POWER_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _SD_POWER_OFF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SD_POWER_OFF@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_rtsx_pci_write_register
Lloh9:
	adrp	x8, _PWR_GATE_CTRL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PWR_GATE_CTRL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _LDO3318_PWR_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LDO3318_PWR_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_rtsx_pci_write_register
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.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
	.cfi_endproc
                                        ; -- End function
	.comm	_CARD_PWR_CTL,4,2               ; @CARD_PWR_CTL
	.comm	_SD_POWER_MASK,4,2              ; @SD_POWER_MASK
	.comm	_SD_POWER_OFF,4,2               ; @SD_POWER_OFF
	.comm	_PWR_GATE_CTRL,4,2              ; @PWR_GATE_CTRL
	.comm	_LDO3318_PWR_MASK,4,2           ; @LDO3318_PWR_MASK
	.no_dead_strip	_rtsx_base_card_power_off
.subsections_via_symbols
