	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_sd_switch_hs               ## -- Begin function mmc_sd_switch_hs
	.p2align	4, 0x90
_mmc_sd_switch_hs:                      ## @mmc_sd_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	24(%rdi), %rax
	movq	_SCR_SPEC_VER_1@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	jl	LBB0_10
## %bb.1:
	movq	%rdi, %rbx
	movq	_CCC_SWITCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%rdi)
	je	LBB0_10
## %bb.2:
	movq	(%rbx), %rax
	movq	_MMC_CAP_SD_HIGHSPEED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_10
## %bb.3:
	cmpq	$0, 8(%rbx)
	je	LBB0_10
## %bb.4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$64, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r15
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	movq	%rax, %r8
	callq	_mmc_sd_switch
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movl	64(%r15), %eax
	andl	$15, %eax
	movl	$1, %r14d
	cmpl	$1, %eax
	je	LBB0_9
## %bb.8:
	movq	(%rbx), %rdi
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn
	xorl	%r14d, %r14d
LBB0_9:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_10
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_10:
	movl	%r14d, %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
	.comm	_MMC_CAP_SD_HIGHSPEED,4,2       ## @MMC_CAP_SD_HIGHSPEED
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Problem switching card into high-speed mode!\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_sd_switch_hs               ; -- Begin function mmc_sd_switch_hs
	.p2align	2
_mmc_sd_switch_hs:                      ; @mmc_sd_switch_hs
	.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, #24]
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.lt	LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0, #16]
Lloh3:
	adrp	x9, _CCC_SWITCH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CCC_SWITCH@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.2:
	ldr	x8, [x19]
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _MMC_CAP_SD_HIGHSPEED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MMC_CAP_SD_HIGHSPEED@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.4:
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w0, #64
	bl	_kmalloc
	cbz	x0, LBB0_10
; %bb.5:
	mov	x20, x0
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	mov	w3, #1
	mov	x4, x20
	bl	_mmc_sd_switch
	mov	x21, x0
	cbnz	w0, LBB0_12
; %bb.6:
	ldr	w8, [x20, #64]
	and	w8, w8, #0xf
	cmp	w8, #1
	b.ne	LBB0_11
; %bb.7:
	mov	w21, #1
	b	LBB0_12
LBB0_8:
	mov	w21, #0
LBB0_9:
	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
LBB0_10:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_11:
	ldr	x0, [x19]
	bl	_mmc_hostname
	mov	x1, x0
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
	mov	w21, #0
LBB0_12:
	mov	x0, x20
	bl	_kfree
	b	LBB0_9
	.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 AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SCR_SPEC_VER_1,8,3             ; @SCR_SPEC_VER_1
	.comm	_CCC_SWITCH,4,2                 ; @CCC_SWITCH
	.comm	_MMC_CAP_SD_HIGHSPEED,4,2       ; @MMC_CAP_SD_HIGHSPEED
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Problem switching card into high-speed mode!\n"

.subsections_via_symbols
