	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_set_power_mode
_sd_set_power_mode:                     ## @sd_set_power_mode
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_MMC_POWER_OFF@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	cmpb	%sil, %al
	movq	_MMC_POWER_ON@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ebx
	cmovel	%esi, %ebx
	xorl	%r15d, %r15d
	cmpb	(%rdi), %bl
	je	LBB0_6
## %bb.1:
	movq	%rdi, %r14
	cmpb	%al, %bl
	jne	LBB0_3
## %bb.2:
	callq	_sd_power_off
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_sdmmc_dev
	movl	%eax, %edi
	callq	_pm_runtime_put_noidle
	testl	%r15d, %r15d
	jne	LBB0_6
	jmp	LBB0_5
LBB0_3:
	callq	_sdmmc_dev
	movl	%eax, %edi
	callq	_pm_runtime_get_noresume
	movq	%r14, %rdi
	callq	_sd_power_on
	movl	%eax, %r15d
	testl	%r15d, %r15d
	jne	LBB0_6
LBB0_5:
	movb	%bl, (%r14)
	xorl	%r15d, %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_POWER_OFF,1,0              ## @MMC_POWER_OFF
	.comm	_MMC_POWER_ON,1,0               ## @MMC_POWER_ON
	.no_dead_strip	_sd_set_power_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sd_set_power_mode
_sd_set_power_mode:                     ; @sd_set_power_mode
	.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
Lloh0:
	adrp	x8, _MMC_POWER_OFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMC_POWER_OFF@GOTPAGEOFF]
Lloh2:
	adrp	x9, _MMC_POWER_ON@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MMC_POWER_ON@GOTPAGEOFF]
	ldrb	w8, [x8]
	ldrb	w9, [x9]
	cmp	w8, w1
	csel	w21, w1, w9, eq
	ldrb	w9, [x0]
	cmp	w21, w9
	b.ne	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_6
LBB0_2:
	mov	x19, x0
	cmp	w21, w8
	b.ne	LBB0_4
; %bb.3:
	bl	_sd_power_off
	mov	x20, x0
	mov	x0, x19
	bl	_sdmmc_dev
	bl	_pm_runtime_put_noidle
	cbnz	w20, LBB0_6
	b	LBB0_5
LBB0_4:
	bl	_sdmmc_dev
	bl	_pm_runtime_get_noresume
	mov	x0, x19
	bl	_sd_power_on
	mov	x20, x0
	cbnz	w20, LBB0_6
LBB0_5:
	strb	w21, [x19]
LBB0_6:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_POWER_OFF,1,0              ; @MMC_POWER_OFF
	.comm	_MMC_POWER_ON,1,0               ; @MMC_POWER_ON
	.no_dead_strip	_sd_set_power_mode
.subsections_via_symbols
