	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_set_bus_speed_mode
_sd_set_bus_speed_mode:                 ## @sd_set_bus_speed_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
	movl	(%rdi), %ecx
	leal	-128(%rcx), %edx
	xorl	%eax, %eax
	cmpl	$4, %edx
	ja	LBB0_6
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movslq	%edx, %rax
	leaq	l_switch.table.sd_set_bus_speed_mode(%rip), %rdx
	movq	(%rdx,%rax,8), %rdx
	leaq	l_switch.table.sd_set_bus_speed_mode.1(%rip), %rsi
	movq	(%rsi,%rax,8), %rax
	movl	(%rdx), %r15d
	movl	(%rax), %eax
	movl	%eax, 4(%rdi)
	movl	$1, %esi
	xorl	%edx, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	%r14, %r8
	callq	_mmc_sd_switch
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movl	64(%r14), %eax
	andl	$15, %eax
	movl	8(%rbx), %edi
	cmpl	(%rbx), %eax
	jne	LBB0_3
## %bb.4:
	movl	%r15d, %esi
	callq	_mmc_set_timing
	movl	4(%rbx), %esi
	movl	8(%rbx), %edi
	callq	_mmc_set_clock
	jmp	LBB0_5
LBB0_3:
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn
LBB0_5:
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_TIMING_UHS_SDR104,4,2      ## @MMC_TIMING_UHS_SDR104
	.comm	_UHS_SDR104_MAX_DTR,4,2         ## @UHS_SDR104_MAX_DTR
	.comm	_MMC_TIMING_UHS_DDR50,4,2       ## @MMC_TIMING_UHS_DDR50
	.comm	_UHS_DDR50_MAX_DTR,4,2          ## @UHS_DDR50_MAX_DTR
	.comm	_MMC_TIMING_UHS_SDR50,4,2       ## @MMC_TIMING_UHS_SDR50
	.comm	_UHS_SDR50_MAX_DTR,4,2          ## @UHS_SDR50_MAX_DTR
	.comm	_MMC_TIMING_UHS_SDR25,4,2       ## @MMC_TIMING_UHS_SDR25
	.comm	_UHS_SDR25_MAX_DTR,4,2          ## @UHS_SDR25_MAX_DTR
	.comm	_MMC_TIMING_UHS_SDR12,4,2       ## @MMC_TIMING_UHS_SDR12
	.comm	_UHS_SDR12_MAX_DTR,4,2          ## @UHS_SDR12_MAX_DTR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Problem setting bus speed mode!\n"

	.no_dead_strip	_sd_set_bus_speed_mode
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.sd_set_bus_speed_mode
l_switch.table.sd_set_bus_speed_mode:
	.quad	_MMC_TIMING_UHS_SDR50
	.quad	_MMC_TIMING_UHS_SDR25
	.quad	_MMC_TIMING_UHS_SDR12
	.quad	_MMC_TIMING_UHS_SDR104
	.quad	_MMC_TIMING_UHS_DDR50

	.p2align	3                               ## @switch.table.sd_set_bus_speed_mode.1
l_switch.table.sd_set_bus_speed_mode.1:
	.quad	_UHS_SDR50_MAX_DTR
	.quad	_UHS_SDR25_MAX_DTR
	.quad	_UHS_SDR12_MAX_DTR
	.quad	_UHS_SDR104_MAX_DTR
	.quad	_UHS_DDR50_MAX_DTR

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sd_set_bus_speed_mode
_sd_set_bus_speed_mode:                 ; @sd_set_bus_speed_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
	ldr	w3, [x0]
	sub	w8, w3, #128
	cmp	w8, #4
	b.hi	LBB0_5
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	sbfiz	x8, x8, #3, #32
Lloh0:
	adrp	x9, l_switch.table.sd_set_bus_speed_mode@PAGE
Lloh1:
	add	x9, x9, l_switch.table.sd_set_bus_speed_mode@PAGEOFF
	ldr	x9, [x9, x8]
Lloh2:
	adrp	x10, l_switch.table.sd_set_bus_speed_mode.1@PAGE
Lloh3:
	add	x10, x10, l_switch.table.sd_set_bus_speed_mode.1@PAGEOFF
	ldr	x8, [x10, x8]
	ldr	w21, [x9]
	ldr	w8, [x8]
	str	w8, [x0, #4]
	mov	w1, #1
	mov	w2, #0
	mov	x4, x20
	bl	_mmc_sd_switch
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	w8, [x20, #64]
	and	w8, w8, #0xf
	ldr	w9, [x19]
	ldr	w0, [x19, #8]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.3:
	mov	x1, x21
	bl	_mmc_set_timing
	ldp	w1, w0, [x19, #4]
	bl	_mmc_set_clock
	b	LBB0_5
LBB0_4:
	bl	_mmc_hostname
	mov	x1, x0
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
LBB0_5:
	mov	w0, #0
LBB0_6:
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_TIMING_UHS_SDR104,4,2      ; @MMC_TIMING_UHS_SDR104
	.comm	_UHS_SDR104_MAX_DTR,4,2         ; @UHS_SDR104_MAX_DTR
	.comm	_MMC_TIMING_UHS_DDR50,4,2       ; @MMC_TIMING_UHS_DDR50
	.comm	_UHS_DDR50_MAX_DTR,4,2          ; @UHS_DDR50_MAX_DTR
	.comm	_MMC_TIMING_UHS_SDR50,4,2       ; @MMC_TIMING_UHS_SDR50
	.comm	_UHS_SDR50_MAX_DTR,4,2          ; @UHS_SDR50_MAX_DTR
	.comm	_MMC_TIMING_UHS_SDR25,4,2       ; @MMC_TIMING_UHS_SDR25
	.comm	_UHS_SDR25_MAX_DTR,4,2          ; @UHS_SDR25_MAX_DTR
	.comm	_MMC_TIMING_UHS_SDR12,4,2       ; @MMC_TIMING_UHS_SDR12
	.comm	_UHS_SDR12_MAX_DTR,4,2          ; @UHS_SDR12_MAX_DTR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Problem setting bus speed mode!\n"

	.no_dead_strip	_sd_set_bus_speed_mode
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.sd_set_bus_speed_mode
l_switch.table.sd_set_bus_speed_mode:
	.quad	_MMC_TIMING_UHS_SDR50
	.quad	_MMC_TIMING_UHS_SDR25
	.quad	_MMC_TIMING_UHS_SDR12
	.quad	_MMC_TIMING_UHS_SDR104
	.quad	_MMC_TIMING_UHS_DDR50

	.p2align	3                               ; @switch.table.sd_set_bus_speed_mode.1
l_switch.table.sd_set_bus_speed_mode.1:
	.quad	_UHS_SDR50_MAX_DTR
	.quad	_UHS_SDR25_MAX_DTR
	.quad	_UHS_SDR12_MAX_DTR
	.quad	_UHS_SDR104_MAX_DTR
	.quad	_UHS_DDR50_MAX_DTR

.subsections_via_symbols
