	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_sdio_switch_hs
_mmc_sdio_switch_hs:                    ## @mmc_sdio_switch_hs
	.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	8(%rdi), %rcx
	movq	_MMC_CAP_SD_HIGHSPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%eax, %eax
	testl	%edx, (%rcx)
	je	LBB0_7
## %bb.1:
	movq	%rdi, %rbx
	cmpl	$0, (%rdi)
	je	LBB0_7
## %bb.2:
	movl	%esi, %r14d
	movq	_SDIO_CCCR_SPEED@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	leaq	-28(%rbp), %r9
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_mmc_io_rw_direct
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	_SDIO_SPEED_EHS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.4:
	orl	-28(%rbp), %r8d
	jmp	LBB0_6
LBB0_5:
	notl	%r8d
	andl	-28(%rbp), %r8d
LBB0_6:
	movl	%r8d, -28(%rbp)
	movl	(%r15), %ecx
	movl	$1, %r14d
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_mmc_io_rw_direct
	testl	%eax, %eax
	cmovel	%r14d, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_CAP_SD_HIGHSPEED,4,2       ## @MMC_CAP_SD_HIGHSPEED
	.comm	_SDIO_CCCR_SPEED,4,2            ## @SDIO_CCCR_SPEED
	.comm	_SDIO_SPEED_EHS,4,2             ## @SDIO_SPEED_EHS
	.no_dead_strip	_mmc_sdio_switch_hs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_sdio_switch_hs
_mmc_sdio_switch_hs:                    ; @mmc_sdio_switch_hs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _MMC_CAP_SD_HIGHSPEED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_CAP_SD_HIGHSPEED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_5
; %bb.2:
	mov	x20, x1
Lloh3:
	adrp	x21, _SDIO_CCCR_SPEED@GOTPAGE
Lloh4:
	ldr	x21, [x21, _SDIO_CCCR_SPEED@GOTPAGEOFF]
	ldr	w3, [x21]
	add	x5, sp, #12
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	mov	w4, #0
	bl	_mmc_io_rw_direct
	cbnz	w0, LBB0_6
; %bb.3:
Lloh5:
	adrp	x8, _SDIO_SPEED_EHS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SDIO_SPEED_EHS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cbz	w20, LBB0_7
; %bb.4:
	ldr	w9, [sp, #12]
	orr	w4, w9, w8
	b	LBB0_8
LBB0_5:
	mov	w0, #0
LBB0_6:
	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
	add	sp, sp, #64
	ret
LBB0_7:
	ldr	w9, [sp, #12]
	bic	w4, w9, w8
LBB0_8:
	str	w4, [sp, #12]
	ldr	w3, [x21]
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	mov	x5, #0
	bl	_mmc_io_rw_direct
	cmp	w0, #0
	csinc	w0, w0, wzr, ne
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_CAP_SD_HIGHSPEED,4,2       ; @MMC_CAP_SD_HIGHSPEED
	.comm	_SDIO_CCCR_SPEED,4,2            ; @SDIO_CCCR_SPEED
	.comm	_SDIO_SPEED_EHS,4,2             ; @SDIO_SPEED_EHS
	.no_dead_strip	_mmc_sdio_switch_hs
.subsections_via_symbols
