	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aspeed_sdhci_set_bus_width
_aspeed_sdhci_set_bus_width:            ## @aspeed_sdhci_set_bus_width
	.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	%esi, %r14d
	movq	%rdi, %rbx
	callq	_sdhci_priv
	movq	%rax, %rdi
	callq	_sdhci_pltfm_priv
	movq	(%rax), %rdi
	movq	_MMC_BUS_WIDTH_8@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpl	%r14d, (%rcx)
	sete	%dl
	movq	%rax, %rsi
	callq	_aspeed_sdc_configure_8bit_mode
	movq	_SDHCI_HOST_CONTROL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_sdhci_readb
	movq	_MMC_BUS_WIDTH_4@GOTPCREL(%rip), %rcx
	movq	_SDHCI_CTRL_4BITBUS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	%esi, %edx
	orl	%eax, %edx
	notl	%esi
	andl	%eax, %esi
	cmpl	%r14d, (%rcx)
	cmovel	%edx, %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdhci_writeb                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_BUS_WIDTH_8,4,2            ## @MMC_BUS_WIDTH_8
	.comm	_SDHCI_HOST_CONTROL,4,2         ## @SDHCI_HOST_CONTROL
	.comm	_MMC_BUS_WIDTH_4,4,2            ## @MMC_BUS_WIDTH_4
	.comm	_SDHCI_CTRL_4BITBUS,4,2         ## @SDHCI_CTRL_4BITBUS
	.no_dead_strip	_aspeed_sdhci_set_bus_width
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aspeed_sdhci_set_bus_width
_aspeed_sdhci_set_bus_width:            ; @aspeed_sdhci_set_bus_width
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_sdhci_priv
	bl	_sdhci_pltfm_priv
	mov	x1, x0
	ldr	x0, [x0]
Lloh0:
	adrp	x8, _MMC_BUS_WIDTH_8@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMC_BUS_WIDTH_8@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w19
	cset	w2, eq
	bl	_aspeed_sdc_configure_8bit_mode
Lloh3:
	adrp	x21, _SDHCI_HOST_CONTROL@GOTPAGE
Lloh4:
	ldr	x21, [x21, _SDHCI_HOST_CONTROL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_sdhci_readb
Lloh5:
	adrp	x8, _MMC_BUS_WIDTH_4@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MMC_BUS_WIDTH_4@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _SDHCI_CTRL_4BITBUS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SDHCI_CTRL_4BITBUS@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w10, w9, w0
	bic	w9, w0, w9
	cmp	w8, w19
	csel	w1, w10, w9, eq
	ldr	w2, [x21]
	mov	x0, x20
	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
	b	_sdhci_writeb
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_BUS_WIDTH_8,4,2            ; @MMC_BUS_WIDTH_8
	.comm	_SDHCI_HOST_CONTROL,4,2         ; @SDHCI_HOST_CONTROL
	.comm	_MMC_BUS_WIDTH_4,4,2            ; @MMC_BUS_WIDTH_4
	.comm	_SDHCI_CTRL_4BITBUS,4,2         ; @SDHCI_CTRL_4BITBUS
	.no_dead_strip	_aspeed_sdhci_set_bus_width
.subsections_via_symbols
