	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_update_bus_speed_mode
_sd_update_bus_speed_mode:              ## @sd_update_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rdi
	callq	_mmc_host_uhs
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	16(%rbx), %rax
	movl	(%rax), %eax
	movq	_MMC_CAP_UHS_SDR104@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_5
## %bb.3:
	movq	_SD_MODE_UHS_SDR104@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 8(%rbx)
	je	LBB0_5
## %bb.4:
	movq	_UHS_SDR104_BUS_SPEED@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_5:
	movq	_MMC_CAP_UHS_DDR50@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_8
## %bb.6:
	movq	_SD_MODE_UHS_DDR50@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 8(%rbx)
	je	LBB0_8
## %bb.7:
	movq	_UHS_DDR50_BUS_SPEED@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_8:
	movq	_MMC_CAP_UHS_SDR50@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	je	LBB0_11
## %bb.9:
	movq	_SD_MODE_UHS_SDR50@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 8(%rbx)
	je	LBB0_11
## %bb.10:
	movq	_UHS_SDR50_BUS_SPEED@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_11:
	movq	_MMC_CAP_UHS_SDR25@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	je	LBB0_14
## %bb.12:
	movq	_SD_MODE_UHS_SDR25@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 8(%rbx)
	je	LBB0_14
## %bb.13:
	movq	_UHS_SDR25_BUS_SPEED@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_14:
	movq	_MMC_CAP_UHS_SDR12@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	je	LBB0_19
## %bb.15:
	movq	_SD_MODE_UHS_SDR12@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_19
## %bb.16:
	movq	_UHS_SDR12_BUS_SPEED@GOTPCREL(%rip), %rax
LBB0_17:
	movq	(%rax), %rax
LBB0_18:
	movq	%rax, (%rbx)
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_CAP_UHS_SDR104,4,2         ## @MMC_CAP_UHS_SDR104
	.comm	_SD_MODE_UHS_SDR104,4,2         ## @SD_MODE_UHS_SDR104
	.comm	_UHS_SDR104_BUS_SPEED,8,3       ## @UHS_SDR104_BUS_SPEED
	.comm	_MMC_CAP_UHS_DDR50,4,2          ## @MMC_CAP_UHS_DDR50
	.comm	_SD_MODE_UHS_DDR50,4,2          ## @SD_MODE_UHS_DDR50
	.comm	_UHS_DDR50_BUS_SPEED,8,3        ## @UHS_DDR50_BUS_SPEED
	.comm	_MMC_CAP_UHS_SDR50,4,2          ## @MMC_CAP_UHS_SDR50
	.comm	_SD_MODE_UHS_SDR50,4,2          ## @SD_MODE_UHS_SDR50
	.comm	_UHS_SDR50_BUS_SPEED,8,3        ## @UHS_SDR50_BUS_SPEED
	.comm	_MMC_CAP_UHS_SDR25,4,2          ## @MMC_CAP_UHS_SDR25
	.comm	_SD_MODE_UHS_SDR25,4,2          ## @SD_MODE_UHS_SDR25
	.comm	_UHS_SDR25_BUS_SPEED,8,3        ## @UHS_SDR25_BUS_SPEED
	.comm	_MMC_CAP_UHS_SDR12,4,2          ## @MMC_CAP_UHS_SDR12
	.comm	_SD_MODE_UHS_SDR12,4,2          ## @SD_MODE_UHS_SDR12
	.comm	_UHS_SDR12_BUS_SPEED,8,3        ## @UHS_SDR12_BUS_SPEED
	.no_dead_strip	_sd_update_bus_speed_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sd_update_bus_speed_mode
_sd_update_bus_speed_mode:              ; @sd_update_bus_speed_mode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x0, [x0, #16]
	bl	_mmc_host_uhs
	cbz	w0, LBB0_7
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _MMC_CAP_UHS_SDR104@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_CAP_UHS_SDR104@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	ldr	w10, [x19, #8]
Lloh3:
	adrp	x11, _SD_MODE_UHS_SDR104@GOTPAGE
Lloh4:
	ldr	x11, [x11, _SD_MODE_UHS_SDR104@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _UHS_SDR104_BUS_SPEED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UHS_SDR104_BUS_SPEED@GOTPAGEOFF]
	b	LBB0_17
LBB0_4:
Lloh8:
	adrp	x10, _MMC_CAP_UHS_DDR50@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MMC_CAP_UHS_DDR50@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	tst	w10, w8
	b.eq	LBB0_8
; %bb.5:
	ldr	w10, [x19, #8]
Lloh11:
	adrp	x11, _SD_MODE_UHS_DDR50@GOTPAGE
Lloh12:
	ldr	x11, [x11, _SD_MODE_UHS_DDR50@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_8
; %bb.6:
Lloh14:
	adrp	x8, _UHS_DDR50_BUS_SPEED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _UHS_DDR50_BUS_SPEED@GOTPAGEOFF]
	b	LBB0_17
LBB0_7:
	mov	x8, #0
	b	LBB0_18
LBB0_8:
Lloh16:
	adrp	x10, _MMC_CAP_UHS_SDR50@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MMC_CAP_UHS_SDR50@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_11
; %bb.9:
	ldr	w10, [x19, #8]
Lloh19:
	adrp	x11, _SD_MODE_UHS_SDR50@GOTPAGE
Lloh20:
	ldr	x11, [x11, _SD_MODE_UHS_SDR50@GOTPAGEOFF]
Lloh21:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_11
; %bb.10:
Lloh22:
	adrp	x8, _UHS_SDR50_BUS_SPEED@GOTPAGE
Lloh23:
	ldr	x8, [x8, _UHS_SDR50_BUS_SPEED@GOTPAGEOFF]
	b	LBB0_17
LBB0_11:
Lloh24:
	adrp	x10, _MMC_CAP_UHS_SDR25@GOTPAGE
Lloh25:
	ldr	x10, [x10, _MMC_CAP_UHS_SDR25@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_14
; %bb.12:
	ldr	w10, [x19, #8]
Lloh27:
	adrp	x11, _SD_MODE_UHS_SDR25@GOTPAGE
Lloh28:
	ldr	x11, [x11, _SD_MODE_UHS_SDR25@GOTPAGEOFF]
Lloh29:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_14
; %bb.13:
Lloh30:
	adrp	x8, _UHS_SDR25_BUS_SPEED@GOTPAGE
Lloh31:
	ldr	x8, [x8, _UHS_SDR25_BUS_SPEED@GOTPAGEOFF]
	b	LBB0_17
LBB0_14:
Lloh32:
	adrp	x10, _MMC_CAP_UHS_SDR12@GOTPAGE
Lloh33:
	ldr	x10, [x10, _MMC_CAP_UHS_SDR12@GOTPAGEOFF]
Lloh34:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_19
; %bb.15:
	ldr	w8, [x19, #8]
Lloh35:
	adrp	x9, _SD_MODE_UHS_SDR12@GOTPAGE
Lloh36:
	ldr	x9, [x9, _SD_MODE_UHS_SDR12@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.16:
Lloh38:
	adrp	x8, _UHS_SDR12_BUS_SPEED@GOTPAGE
Lloh39:
	ldr	x8, [x8, _UHS_SDR12_BUS_SPEED@GOTPAGEOFF]
LBB0_17:
	ldr	x8, [x8]
LBB0_18:
	str	x8, [x19]
LBB0_19:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_CAP_UHS_SDR104,4,2         ; @MMC_CAP_UHS_SDR104
	.comm	_SD_MODE_UHS_SDR104,4,2         ; @SD_MODE_UHS_SDR104
	.comm	_UHS_SDR104_BUS_SPEED,8,3       ; @UHS_SDR104_BUS_SPEED
	.comm	_MMC_CAP_UHS_DDR50,4,2          ; @MMC_CAP_UHS_DDR50
	.comm	_SD_MODE_UHS_DDR50,4,2          ; @SD_MODE_UHS_DDR50
	.comm	_UHS_DDR50_BUS_SPEED,8,3        ; @UHS_DDR50_BUS_SPEED
	.comm	_MMC_CAP_UHS_SDR50,4,2          ; @MMC_CAP_UHS_SDR50
	.comm	_SD_MODE_UHS_SDR50,4,2          ; @SD_MODE_UHS_SDR50
	.comm	_UHS_SDR50_BUS_SPEED,8,3        ; @UHS_SDR50_BUS_SPEED
	.comm	_MMC_CAP_UHS_SDR25,4,2          ; @MMC_CAP_UHS_SDR25
	.comm	_SD_MODE_UHS_SDR25,4,2          ; @SD_MODE_UHS_SDR25
	.comm	_UHS_SDR25_BUS_SPEED,8,3        ; @UHS_SDR25_BUS_SPEED
	.comm	_MMC_CAP_UHS_SDR12,4,2          ; @MMC_CAP_UHS_SDR12
	.comm	_SD_MODE_UHS_SDR12,4,2          ; @SD_MODE_UHS_SDR12
	.comm	_UHS_SDR12_BUS_SPEED,8,3        ; @UHS_SDR12_BUS_SPEED
	.no_dead_strip	_sd_update_bus_speed_mode
.subsections_via_symbols
