	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pic32_sdhci_set_bus_width
_pic32_sdhci_set_bus_width:             ## @pic32_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_3
## %bb.1:
	movq	_SDHCI_CTRL_4BITBUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movq	(%r14), %rcx
	movq	_SDHCI_SPEC_300@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jl	LBB0_6
## %bb.2:
	movq	_SDHCI_CTRL_8BITBUS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_6
LBB0_3:
	movq	(%r14), %rcx
	movq	_SDHCI_SPEC_300@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	movq	_SDHCI_CTRL_8BITBUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	movl	$-1, %ecx
	cmovgel	%edx, %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_5
## %bb.4:
	orl	%ecx, %eax
	jmp	LBB0_6
LBB0_5:
	notl	%eax
	andl	%ecx, %eax
LBB0_6:
	movq	_SDHCI_CTRL_CDTLVL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movq	_SDHCI_CTRL_CDSSEL@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r14, %rdi
	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_SPEC_300,8,3             ## @SDHCI_SPEC_300
	.comm	_SDHCI_CTRL_8BITBUS,4,2         ## @SDHCI_CTRL_8BITBUS
	.comm	_MMC_BUS_WIDTH_4,4,2            ## @MMC_BUS_WIDTH_4
	.comm	_SDHCI_CTRL_CDTLVL,4,2          ## @SDHCI_CTRL_CDTLVL
	.comm	_SDHCI_CTRL_CDSSEL,4,2          ## @SDHCI_CTRL_CDSSEL
	.no_dead_strip	_pic32_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 pic32_sdhci_set_bus_width
_pic32_sdhci_set_bus_width:             ; @pic32_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_3
; %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
	ldr	x9, [x19]
Lloh8:
	adrp	x10, _SDHCI_SPEC_300@GOTPAGE
Lloh9:
	ldr	x10, [x10, _SDHCI_SPEC_300@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	x9, x10
	b.lt	LBB0_4
; %bb.2:
Lloh11:
	adrp	x9, _SDHCI_CTRL_8BITBUS@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SDHCI_CTRL_8BITBUS@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
	b	LBB0_4
LBB0_3:
	ldr	x8, [x19]
Lloh14:
	adrp	x9, _SDHCI_SPEC_300@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SDHCI_SPEC_300@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
Lloh17:
	adrp	x10, _SDHCI_CTRL_8BITBUS@GOTPAGE
Lloh18:
	ldr	x10, [x10, _SDHCI_CTRL_8BITBUS@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	cmp	x8, x9
	mov	w8, #-1
	csinv	w8, w8, w10, lt
	and	w8, w8, w0
Lloh20:
	adrp	x9, _MMC_BUS_WIDTH_4@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MMC_BUS_WIDTH_4@GOTPAGEOFF]
Lloh22:
	adrp	x10, _SDHCI_CTRL_4BITBUS@GOTPAGE
Lloh23:
	ldr	x10, [x10, _SDHCI_CTRL_4BITBUS@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
Lloh25:
	ldr	w10, [x10]
	bic	w11, w8, w10
	orr	w8, w10, w8
	cmp	w9, w20
	csel	w8, w11, w8, ne
LBB0_4:
Lloh26:
	adrp	x9, _SDHCI_CTRL_CDTLVL@GOTPAGE
Lloh27:
	ldr	x9, [x9, _SDHCI_CTRL_CDTLVL@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	bic	w8, w8, w9
Lloh29:
	adrp	x9, _SDHCI_CTRL_CDSSEL@GOTPAGE
Lloh30:
	ldr	x9, [x9, _SDHCI_CTRL_CDSSEL@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w1, w8, w9
	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	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.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_SPEC_300,8,3             ; @SDHCI_SPEC_300
	.comm	_SDHCI_CTRL_8BITBUS,4,2         ; @SDHCI_CTRL_8BITBUS
	.comm	_MMC_BUS_WIDTH_4,4,2            ; @MMC_BUS_WIDTH_4
	.comm	_SDHCI_CTRL_CDTLVL,4,2          ; @SDHCI_CTRL_CDTLVL
	.comm	_SDHCI_CTRL_CDSSEL,4,2          ; @SDHCI_CTRL_CDSSEL
	.no_dead_strip	_pic32_sdhci_set_bus_width
.subsections_via_symbols
