	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdhci_set_bus_width            ## -- Begin function sdhci_set_bus_width
	.p2align	4, 0x90
_sdhci_set_bus_width:                   ## @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, %ebx
	movq	%rdi, %r14
	movq	_SDHCI_HOST_CONTROL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_sdhci_readb
	movq	_MMC_BUS_WIDTH_8@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	jne	LBB0_2
## %bb.1:
	movq	_SDHCI_CTRL_4BITBUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movq	_SDHCI_CTRL_8BITBUS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_5
LBB0_2:
	movq	(%r14), %rcx
	movq	_MMC_CAP_8_BIT_DATA@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	(%rcx), %edx
	movq	_SDHCI_CTRL_8BITBUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorl	%ecx, %ecx
	cmpl	$1, %edx
	sbbl	%ecx, %ecx
	notl	%esi
	orl	%esi, %ecx
	andl	%eax, %ecx
	movq	_MMC_BUS_WIDTH_4@GOTPCREL(%rip), %rdx
	movq	_SDHCI_CTRL_4BITBUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%ebx, (%rdx)
	jne	LBB0_4
## %bb.3:
	orl	%ecx, %eax
	jmp	LBB0_5
LBB0_4:
	notl	%eax
	andl	%ecx, %eax
LBB0_5:
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdhci_writeb                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SDHCI_HOST_CONTROL,4,2         ## @SDHCI_HOST_CONTROL
	.comm	_MMC_BUS_WIDTH_8,4,2            ## @MMC_BUS_WIDTH_8
	.comm	_SDHCI_CTRL_4BITBUS,4,2         ## @SDHCI_CTRL_4BITBUS
	.comm	_SDHCI_CTRL_8BITBUS,4,2         ## @SDHCI_CTRL_8BITBUS
	.comm	_MMC_CAP_8_BIT_DATA,4,2         ## @MMC_CAP_8_BIT_DATA
	.comm	_MMC_BUS_WIDTH_4,4,2            ## @MMC_BUS_WIDTH_4
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdhci_set_bus_width            ; -- Begin function sdhci_set_bus_width
	.p2align	2
_sdhci_set_bus_width:                   ; @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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _SDHCI_HOST_CONTROL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SDHCI_HOST_CONTROL@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_sdhci_readb
Lloh2:
	adrp	x8, _MMC_BUS_WIDTH_8@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MMC_BUS_WIDTH_8@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _SDHCI_CTRL_4BITBUS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SDHCI_CTRL_4BITBUS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh8:
	adrp	x9, _SDHCI_CTRL_8BITBUS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SDHCI_CTRL_8BITBUS@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w1, w8, w9
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19]
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _MMC_CAP_8_BIT_DATA@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MMC_CAP_8_BIT_DATA@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _SDHCI_CTRL_8BITBUS@GOTPAGE
Lloh15:
	ldr	x10, [x10, _SDHCI_CTRL_8BITBUS@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	tst	w9, w8
	mov	w8, #-1
	csinv	w8, w8, w10, eq
	and	w8, w8, w0
Lloh17:
	adrp	x9, _MMC_BUS_WIDTH_4@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MMC_BUS_WIDTH_4@GOTPAGEOFF]
Lloh19:
	adrp	x10, _SDHCI_CTRL_4BITBUS@GOTPAGE
Lloh20:
	ldr	x10, [x10, _SDHCI_CTRL_4BITBUS@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	ldr	w10, [x10]
	bic	w11, w8, w10
	orr	w8, w10, w8
	cmp	w9, w20
	csel	w1, w11, w8, ne
LBB0_3:
	ldr	w2, [x21]
	mov	x0, x19
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_SDHCI_HOST_CONTROL,4,2         ; @SDHCI_HOST_CONTROL
	.comm	_MMC_BUS_WIDTH_8,4,2            ; @MMC_BUS_WIDTH_8
	.comm	_SDHCI_CTRL_4BITBUS,4,2         ; @SDHCI_CTRL_4BITBUS
	.comm	_SDHCI_CTRL_8BITBUS,4,2         ; @SDHCI_CTRL_8BITBUS
	.comm	_MMC_CAP_8_BIT_DATA,4,2         ; @MMC_CAP_8_BIT_DATA
	.comm	_MMC_BUS_WIDTH_4,4,2            ; @MMC_BUS_WIDTH_4
.subsections_via_symbols
