	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_sd_switch                  ## -- Begin function mmc_sd_switch
	.p2align	4, 0x90
_mmc_sd_switch:                         ## @mmc_sd_switch
	.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
	subq	$80, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%ecx, %eax
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdi, %rbx
	movl	$0, -24(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -64(%rbp)
	movq	$0, -48(%rbp)
	andl	$15, %eax
	testl	%esi, %esi
	leaq	-32(%rbp), %rcx
	movq	%rcx, -80(%rbp)
	leaq	-72(%rbp), %r14
	movq	%r14, -88(%rbp)
	movq	_SD_SWITCH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -20(%rbp)
	movl	$16777215, %ecx                 ## imm = 0xFFFFFF
	movl	$-2130706433, %esi              ## imm = 0x80FFFFFF
	cmovel	%ecx, %esi
	leal	(,%rdx,4), %ecx
	movl	$15, %edx
	shll	%cl, %edx
	notl	%edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	andl	%esi, %edx
	orl	%edx, %eax
	movl	%eax, -32(%rbp)
	movq	_MMC_RSP_SPI_R1@GOTPCREL(%rip), %rax
	movq	_MMC_RSP_R1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_MMC_CMD_ADTC@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -28(%rbp)
	movabsq	$4294967360, %rax               ## imm = 0x100000040
	movq	%rax, -72(%rbp)
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	leaq	-40(%rbp), %rdi
	movq	%rdi, -56(%rbp)
	movl	$1, -64(%rbp)
	movq	%r8, %rsi
	movl	$64, %edx
	callq	_sg_init_one
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mmc_set_data_timeout
	movl	(%rbx), %edi
	leaq	-88(%rbp), %rsi
	callq	_mmc_wait_for_req
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	-60(%rbp), %eax
LBB0_2:
	addq	$80, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SD_SWITCH,4,2                  ## @SD_SWITCH
	.comm	_MMC_RSP_SPI_R1,4,2             ## @MMC_RSP_SPI_R1
	.comm	_MMC_RSP_R1,4,2                 ## @MMC_RSP_R1
	.comm	_MMC_CMD_ADTC,4,2               ## @MMC_CMD_ADTC
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function mmc_sd_switch
lCPI0_0:
	.long	64                              ; 0x40
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_mmc_sd_switch
	.p2align	2
_mmc_sd_switch:                         ; @mmc_sd_switch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	stp	xzr, xzr, [sp, #24]
	and	w8, w3, #0xf
	add	x9, sp, #48
	add	x10, sp, #16
	stp	x10, x9, [x29, #-32]
Lloh0:
	adrp	x9, _SD_SWITCH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SD_SWITCH@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	stp	wzr, w9, [sp, #56]
	mov	w9, #-2130706433
	mov	w10, #16777215
	cmp	w1, #0
	csel	w9, w10, w9, eq
	lsl	w10, w2, #2
	mov	w11, #15
	lsl	w11, w11, w10
	bic	w9, w9, w11
	lsl	w8, w8, w10
Lloh3:
	adrp	x10, _MMC_RSP_SPI_R1@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MMC_RSP_SPI_R1@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh5:
	ldr	w9, [x10]
Lloh6:
	adrp	x10, _MMC_RSP_R1@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MMC_RSP_R1@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh9:
	adrp	x10, _MMC_CMD_ADTC@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MMC_CMD_ADTC@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w9, w10
	stp	w8, w9, [sp, #48]
Lloh12:
	adrp	x8, lCPI0_0@PAGE
Lloh13:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #16]
Lloh14:
	adrp	x8, _MMC_DATA_READ@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MMC_DATA_READ@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	add	x9, sp, #8
	stp	x9, xzr, [sp, #32]
	str	w8, [sp, #40]
	mov	w8, #1
	str	w8, [sp, #24]
	add	x0, sp, #8
	mov	x1, x4
	mov	w2, #64
	bl	_sg_init_one
	add	x0, sp, #16
	mov	x1, x19
	bl	_mmc_set_data_timeout
	ldr	w0, [x19]
	sub	x1, x29, #32
	bl	_mmc_wait_for_req
	ldr	w8, [sp, #56]
	ldr	w9, [sp, #28]
	cmp	w8, #0
	csel	w0, w9, w8, eq
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdrp	Lloh12, Lloh14
	.loh AdrpLdr	Lloh12, Lloh13
	.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	_SD_SWITCH,4,2                  ; @SD_SWITCH
	.comm	_MMC_RSP_SPI_R1,4,2             ; @MMC_RSP_SPI_R1
	.comm	_MMC_RSP_R1,4,2                 ; @MMC_RSP_R1
	.comm	_MMC_CMD_ADTC,4,2               ; @MMC_CMD_ADTC
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
.subsections_via_symbols
