	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_select_hs_ddr
_mmc_select_hs_ddr:                     ## @mmc_select_hs_ddr
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_EXT_CSD_CARD_TYPE_DDR_52@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	testl	%eax, (%rdi)
	je	LBB0_16
## %bb.1:
	movq	%rdi, %r12
	movq	8(%rdi), %r14
	movl	4(%r14), %r15d
	movq	_MMC_BUS_WIDTH_1@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_16
## %bb.2:
	movq	_MMC_BUS_WIDTH_8@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_3
## %bb.4:
	movq	_EXT_CSD_DDR_BUS_WIDTH_8@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_EXT_CSD_DDR_BUS_WIDTH_4@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %ecx
	movq	_EXT_CSD_CMD_SET_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EXT_CSD_BUS_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	4(%r12), %r8d
	movq	_MMC_TIMING_MMC_DDR52@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	subq	$8, %rsp
	movq	%r12, %rdi
	pushq	$1
	pushq	$1
	pushq	$1
	callq	___mmc_switch
	addq	$32, %rsp
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mmc_hostname
	movl	$1, %edx
	movl	%r15d, %ecx
	shll	%cl, %edx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	jmp	LBB0_16
LBB0_7:
	movl	(%r12), %ecx
	movq	_EXT_CSD_CARD_TYPE_DDR_1_2V@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_8
## %bb.9:
	movq	_MMC_SIGNAL_VOLTAGE_120@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mmc_set_signal_voltage
	testl	%eax, %eax
	je	LBB0_15
## %bb.10:
	movl	(%r12), %ecx
	jmp	LBB0_11
LBB0_8:
	xorl	%eax, %eax
LBB0_11:
	movq	_EXT_CSD_CARD_TYPE_DDR_1_8V@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_14
## %bb.12:
	movq	_MMC_CAP_1_8V_DDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r14)
	je	LBB0_14
## %bb.13:
	movq	_MMC_SIGNAL_VOLTAGE_180@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mmc_set_signal_voltage
LBB0_14:
	testl	%eax, %eax
	je	LBB0_15
## %bb.17:
	movq	_MMC_SIGNAL_VOLTAGE_330@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mmc_set_signal_voltage         ## TAILCALL
LBB0_15:
	xorl	%ebx, %ebx
LBB0_16:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXT_CSD_CARD_TYPE_DDR_52,4,2   ## @EXT_CSD_CARD_TYPE_DDR_52
	.comm	_MMC_BUS_WIDTH_1,4,2            ## @MMC_BUS_WIDTH_1
	.comm	_MMC_BUS_WIDTH_8,4,2            ## @MMC_BUS_WIDTH_8
	.comm	_EXT_CSD_DDR_BUS_WIDTH_8,4,2    ## @EXT_CSD_DDR_BUS_WIDTH_8
	.comm	_EXT_CSD_DDR_BUS_WIDTH_4,4,2    ## @EXT_CSD_DDR_BUS_WIDTH_4
	.comm	_EXT_CSD_CMD_SET_NORMAL,4,2     ## @EXT_CSD_CMD_SET_NORMAL
	.comm	_EXT_CSD_BUS_WIDTH,4,2          ## @EXT_CSD_BUS_WIDTH
	.comm	_MMC_TIMING_MMC_DDR52,4,2       ## @MMC_TIMING_MMC_DDR52
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: switch to bus width %d ddr failed\n"

	.comm	_EXT_CSD_CARD_TYPE_DDR_1_2V,4,2 ## @EXT_CSD_CARD_TYPE_DDR_1_2V
	.comm	_MMC_SIGNAL_VOLTAGE_120,4,2     ## @MMC_SIGNAL_VOLTAGE_120
	.comm	_EXT_CSD_CARD_TYPE_DDR_1_8V,4,2 ## @EXT_CSD_CARD_TYPE_DDR_1_8V
	.comm	_MMC_CAP_1_8V_DDR,4,2           ## @MMC_CAP_1_8V_DDR
	.comm	_MMC_SIGNAL_VOLTAGE_180,4,2     ## @MMC_SIGNAL_VOLTAGE_180
	.comm	_MMC_SIGNAL_VOLTAGE_330,4,2     ## @MMC_SIGNAL_VOLTAGE_330
	.no_dead_strip	_mmc_select_hs_ddr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_select_hs_ddr
_mmc_select_hs_ddr:                     ; @mmc_select_hs_ddr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _EXT_CSD_CARD_TYPE_DDR_52@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EXT_CSD_CARD_TYPE_DDR_52@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	x19, [x0, #8]
	ldr	w22, [x19, #4]
Lloh3:
	adrp	x8, _MMC_BUS_WIDTH_1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMC_BUS_WIDTH_1@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_3
LBB0_2:
	mov	w21, #0
	b	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _MMC_BUS_WIDTH_8@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MMC_BUS_WIDTH_8@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _EXT_CSD_DDR_BUS_WIDTH_8@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EXT_CSD_DDR_BUS_WIDTH_8@GOTPAGEOFF]
Lloh11:
	adrp	x10, _EXT_CSD_DDR_BUS_WIDTH_4@GOTPAGE
Lloh12:
	ldr	x10, [x10, _EXT_CSD_DDR_BUS_WIDTH_4@GOTPAGEOFF]
	cmp	w22, w8
	csel	x8, x9, x10, eq
	ldr	w3, [x8]
Lloh13:
	adrp	x8, _EXT_CSD_CMD_SET_NORMAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EXT_CSD_CMD_SET_NORMAL@GOTPAGEOFF]
Lloh15:
	adrp	x9, _EXT_CSD_BUS_WIDTH@GOTPAGE
Lloh16:
	ldr	x9, [x9, _EXT_CSD_BUS_WIDTH@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	ldr	w2, [x9]
	ldr	w4, [x20, #4]
Lloh19:
	adrp	x8, _MMC_TIMING_MMC_DDR52@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MMC_TIMING_MMC_DDR52@GOTPAGEOFF]
Lloh21:
	ldr	w5, [x8]
	mov	w23, #1
	str	w23, [sp]
	mov	x0, x20
	mov	w6, #1
	mov	w7, #1
	bl	___mmc_switch
	cbz	w0, LBB0_6
; %bb.4:
	mov	x21, x0
	mov	x0, x19
	bl	_mmc_hostname
	mov	x1, x0
	lsl	w2, w23, w22
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
	ldr	w8, [x20]
Lloh24:
	adrp	x9, _EXT_CSD_CARD_TYPE_DDR_1_2V@GOTPAGE
Lloh25:
	ldr	x9, [x9, _EXT_CSD_CARD_TYPE_DDR_1_2V@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.7:
Lloh27:
	adrp	x8, _MMC_SIGNAL_VOLTAGE_120@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MMC_SIGNAL_VOLTAGE_120@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mmc_set_signal_voltage
	cbz	w0, LBB0_2
; %bb.8:
	ldr	w8, [x20]
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
Lloh30:
	adrp	x9, _EXT_CSD_CARD_TYPE_DDR_1_8V@GOTPAGE
Lloh31:
	ldr	x9, [x9, _EXT_CSD_CARD_TYPE_DDR_1_8V@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.11:
	ldr	w8, [x19]
Lloh33:
	adrp	x9, _MMC_CAP_1_8V_DDR@GOTPAGE
Lloh34:
	ldr	x9, [x9, _MMC_CAP_1_8V_DDR@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.12:
Lloh36:
	adrp	x8, _MMC_SIGNAL_VOLTAGE_180@GOTPAGE
Lloh37:
	ldr	x8, [x8, _MMC_SIGNAL_VOLTAGE_180@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mmc_set_signal_voltage
LBB0_13:
	cbz	w0, LBB0_2
; %bb.14:
Lloh39:
	adrp	x8, _MMC_SIGNAL_VOLTAGE_330@GOTPAGE
Lloh40:
	ldr	x8, [x8, _MMC_SIGNAL_VOLTAGE_330@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_mmc_set_signal_voltage
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_EXT_CSD_CARD_TYPE_DDR_52,4,2   ; @EXT_CSD_CARD_TYPE_DDR_52
	.comm	_MMC_BUS_WIDTH_1,4,2            ; @MMC_BUS_WIDTH_1
	.comm	_MMC_BUS_WIDTH_8,4,2            ; @MMC_BUS_WIDTH_8
	.comm	_EXT_CSD_DDR_BUS_WIDTH_8,4,2    ; @EXT_CSD_DDR_BUS_WIDTH_8
	.comm	_EXT_CSD_DDR_BUS_WIDTH_4,4,2    ; @EXT_CSD_DDR_BUS_WIDTH_4
	.comm	_EXT_CSD_CMD_SET_NORMAL,4,2     ; @EXT_CSD_CMD_SET_NORMAL
	.comm	_EXT_CSD_BUS_WIDTH,4,2          ; @EXT_CSD_BUS_WIDTH
	.comm	_MMC_TIMING_MMC_DDR52,4,2       ; @MMC_TIMING_MMC_DDR52
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: switch to bus width %d ddr failed\n"

	.comm	_EXT_CSD_CARD_TYPE_DDR_1_2V,4,2 ; @EXT_CSD_CARD_TYPE_DDR_1_2V
	.comm	_MMC_SIGNAL_VOLTAGE_120,4,2     ; @MMC_SIGNAL_VOLTAGE_120
	.comm	_EXT_CSD_CARD_TYPE_DDR_1_8V,4,2 ; @EXT_CSD_CARD_TYPE_DDR_1_8V
	.comm	_MMC_CAP_1_8V_DDR,4,2           ; @MMC_CAP_1_8V_DDR
	.comm	_MMC_SIGNAL_VOLTAGE_180,4,2     ; @MMC_SIGNAL_VOLTAGE_180
	.comm	_MMC_SIGNAL_VOLTAGE_330,4,2     ; @MMC_SIGNAL_VOLTAGE_330
	.no_dead_strip	_mmc_select_hs_ddr
.subsections_via_symbols
