	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdio_card_set_bus_width        ## -- Begin function sdio_card_set_bus_width
	.p2align	4, 0x90
_sdio_card_set_bus_width:               ## @sdio_card_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_SD_IO_CCCR_BUS_WIDTH@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	-36(%rbp), %r9
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_sdio_rw_direct
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	-36(%rbp), %eax
	andl	$-4, %eax
	movl	%eax, -36(%rbp)
	cmpl	$128, %r15d
	je	LBB0_3
## %bb.4:
	cmpl	$129, %r15d
	jne	LBB0_6
## %bb.5:
	movq	_CCCR_BUS_WIDTH_4@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -36(%rbp)
LBB0_6:
	movl	(%r12), %edx
	leaq	-36(%rbp), %r8
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$1, %ecx
	movq	%r8, %r9
	callq	_sdio_rw_direct
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_9
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_8
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_8
LBB0_3:
	movl	$-1, %ebx
	leaq	L_.str.1(%rip), %rdi
LBB0_8:
	callq	_warn
LBB0_9:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SD_IO_CCCR_BUS_WIDTH,4,2       ## @SD_IO_CCCR_BUS_WIDTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error getting CCCR_BUS_WIDTH value"

	.comm	_CCCR_BUS_WIDTH_4,4,2           ## @CCCR_BUS_WIDTH_4
L_.str.1:                               ## @.str.1
	.asciz	"Cannot do 8-bit on SDIO yet"

L_.str.2:                               ## @.str.2
	.asciz	"Error setting CCCR_BUS_WIDTH value"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdio_card_set_bus_width        ; -- Begin function sdio_card_set_bus_width
	.p2align	2
_sdio_card_set_bus_width:               ; @sdio_card_set_bus_width
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _SD_IO_CCCR_BUS_WIDTH@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SD_IO_CCCR_BUS_WIDTH@GOTPAGEOFF]
	ldr	w2, [x22]
	add	x5, sp, #12
	mov	w1, #0
	mov	w3, #0
	mov	x4, #0
	bl	_sdio_rw_direct
	tbnz	w0, #31, LBB0_6
; %bb.1:
	ldr	w8, [sp, #12]
	and	w8, w8, #0xfffffffc
	str	w8, [sp, #12]
	cmp	w21, #128
	b.eq	LBB0_7
; %bb.2:
	cmp	w21, #129
	b.ne	LBB0_4
; %bb.3:
Lloh2:
	adrp	x9, _CCCR_BUS_WIDTH_4@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CCCR_BUS_WIDTH_4@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #12]
LBB0_4:
	ldr	w2, [x22]
	add	x4, sp, #12
	add	x5, sp, #12
	mov	x0, x19
	mov	w1, #0
	mov	w3, #1
	bl	_sdio_rw_direct
	mov	x20, x0
	tbz	w0, #31, LBB0_9
; %bb.5:
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_6:
	mov	x20, x0
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
	mov	w20, #-1
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_warn
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SD_IO_CCCR_BUS_WIDTH,4,2       ; @SD_IO_CCCR_BUS_WIDTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error getting CCCR_BUS_WIDTH value"

	.comm	_CCCR_BUS_WIDTH_4,4,2           ; @CCCR_BUS_WIDTH_4
l_.str.1:                               ; @.str.1
	.asciz	"Cannot do 8-bit on SDIO yet"

l_.str.2:                               ; @.str.2
	.asciz	"Error setting CCCR_BUS_WIDTH value"

.subsections_via_symbols
