	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_read_switch
_mmc_read_switch:                       ## @mmc_read_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %rax
	movq	_SCR_SPEC_VER_1@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	jl	LBB0_15
## %bb.1:
	movq	%rdi, %rbx
	movq	_CCC_SWITCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 36(%rdi)
	je	LBB0_2
## %bb.3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$64, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%rax, %r8
	callq	_mmc_sd_switch
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	movl	%eax, %r15d
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	je	LBB0_9
## %bb.7:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	je	LBB0_9
## %bb.8:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	jne	LBB0_14
LBB0_9:
	movl	32(%rbx), %edi
	callq	_mmc_hostname
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn
	xorl	%r15d, %r15d
	jmp	LBB0_14
LBB0_2:
	movl	32(%rbx), %edi
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn
	jmp	LBB0_15
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_15
LBB0_10:
	movq	_SD_MODE_HIGH_SPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 52(%r14)
	je	LBB0_12
## %bb.11:
	movq	_HIGH_SPEED_MAX_DTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
LBB0_12:
	xorl	%r15d, %r15d
	cmpq	$0, 24(%rbx)
	je	LBB0_14
## %bb.13:
	movl	52(%r14), %eax
	movl	%eax, (%rbx)
	movl	36(%r14), %eax
	movl	%eax, 4(%rbx)
	movl	24(%r14), %eax
	shll	$8, %eax
	orl	28(%r14), %eax
	movl	%eax, 8(%rbx)
LBB0_14:
	movq	%r14, %rdi
	callq	_kfree
LBB0_15:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCR_SPEC_VER_1,8,3             ## @SCR_SPEC_VER_1
	.comm	_CCC_SWITCH,4,2                 ## @CCC_SWITCH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: card lacks mandatory switch function, performance might suffer\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_EFAULT,4,2                     ## @EFAULT
L_.str.1:                               ## @.str.1
	.asciz	"%s: problem reading Bus Speed modes\n"

	.comm	_SD_MODE_HIGH_SPEED,4,2         ## @SD_MODE_HIGH_SPEED
	.comm	_HIGH_SPEED_MAX_DTR,4,2         ## @HIGH_SPEED_MAX_DTR
	.no_dead_strip	_mmc_read_switch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_read_switch
_mmc_read_switch:                       ; @mmc_read_switch
	.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
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x9, _SCR_SPEC_VER_1@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SCR_SPEC_VER_1@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_17
LBB0_2:
	mov	x20, x0
	ldr	w8, [x0, #36]
Lloh3:
	adrp	x9, _CCC_SWITCH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CCC_SWITCH@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.3:
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w0, #64
	bl	_kmalloc
	cbz	x0, LBB0_11
; %bb.4:
	mov	x19, x0
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	x4, x19
	bl	_mmc_sd_switch
	cbz	w0, LBB0_12
; %bb.5:
	mov	x21, x0
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_8
; %bb.6:
Lloh12:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmn	w21, w8
	b.eq	LBB0_8
; %bb.7:
Lloh15:
	adrp	x8, _EFAULT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmn	w21, w8
	b.ne	LBB0_16
LBB0_8:
	ldr	w0, [x20, #32]
	bl	_mmc_hostname
	mov	x1, x0
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
LBB0_9:
	mov	w21, #0
	b	LBB0_16
LBB0_10:
	ldr	w0, [x20, #32]
	bl	_mmc_hostname
	mov	x1, x0
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
	mov	w21, #0
	b	LBB0_17
LBB0_11:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_17
LBB0_12:
	ldr	w8, [x19, #52]
Lloh25:
	adrp	x9, _SD_MODE_HIGH_SPEED@GOTPAGE
Lloh26:
	ldr	x9, [x9, _SD_MODE_HIGH_SPEED@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
Lloh28:
	adrp	x8, _HIGH_SPEED_MAX_DTR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _HIGH_SPEED_MAX_DTR@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	str	w8, [x20, #12]
LBB0_14:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_9
; %bb.15:
	mov	w21, #0
	ldr	w8, [x19, #52]
	str	w8, [x20]
	ldr	w8, [x19, #36]
	str	w8, [x20, #4]
	ldp	w9, w8, [x19, #24]
	orr	w8, w8, w9, lsl #8
	str	w8, [x20, #8]
LBB0_16:
	mov	x0, x19
	bl	_kfree
LBB0_17:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_SCR_SPEC_VER_1,8,3             ; @SCR_SPEC_VER_1
	.comm	_CCC_SWITCH,4,2                 ; @CCC_SWITCH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: card lacks mandatory switch function, performance might suffer\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_EFAULT,4,2                     ; @EFAULT
l_.str.1:                               ; @.str.1
	.asciz	"%s: problem reading Bus Speed modes\n"

	.comm	_SD_MODE_HIGH_SPEED,4,2         ; @SD_MODE_HIGH_SPEED
	.comm	_HIGH_SPEED_MAX_DTR,4,2         ; @HIGH_SPEED_MAX_DTR
	.no_dead_strip	_mmc_read_switch
.subsections_via_symbols
