	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_app_set_bus_width          ## -- Begin function mmc_app_set_bus_width
	.p2align	4, 0x90
_mmc_app_set_bus_width:                 ## @mmc_app_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_BUG_ON
	xorl	%edi, %edi
	cmpl	$0, (%rbx)
	sete	%dil
	callq	_BUG_ON
	leaq	-32(%rbp), %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movq	_SD_APP_SET_BUS_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movq	_MMC_RSP_R1@GOTPCREL(%rip), %rax
	movq	_MMC_CMD_AC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -32(%rbp)
	cmpl	$129, %r14d
	je	LBB0_1
## %bb.2:
	cmpl	$128, %r14d
	jne	LBB0_6
## %bb.3:
	movq	_SD_BUS_WIDTH_4@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	movq	_SD_BUS_WIDTH_1@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movl	(%rbx), %edi
	movq	_MMC_CMD_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rsi
	callq	_mmc_wait_for_app_cmd
	jmp	LBB0_5
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SD_APP_SET_BUS_WIDTH,4,2       ## @SD_APP_SET_BUS_WIDTH
	.comm	_MMC_RSP_R1,4,2                 ## @MMC_RSP_R1
	.comm	_MMC_CMD_AC,4,2                 ## @MMC_CMD_AC
	.comm	_SD_BUS_WIDTH_1,4,2             ## @SD_BUS_WIDTH_1
	.comm	_SD_BUS_WIDTH_4,4,2             ## @SD_BUS_WIDTH_4
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MMC_CMD_RETRIES,4,2            ## @MMC_CMD_RETRIES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_app_set_bus_width          ; -- Begin function mmc_app_set_bus_width
	.p2align	2
_mmc_app_set_bus_width:                 ; @mmc_app_set_bus_width
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w0, eq
	bl	_BUG_ON
	mov	x0, sp
	mov	w1, #0
	mov	w2, #12
	bl	_memset
Lloh0:
	adrp	x8, _SD_APP_SET_BUS_WIDTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SD_APP_SET_BUS_WIDTH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MMC_RSP_R1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MMC_RSP_R1@GOTPAGEOFF]
Lloh5:
	adrp	x10, _MMC_CMD_AC@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MMC_CMD_AC@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w8, [sp, #8]
	str	w9, [sp]
	cmp	w20, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w20, #128
	b.ne	LBB0_5
; %bb.2:
Lloh9:
	adrp	x8, _SD_BUS_WIDTH_4@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SD_BUS_WIDTH_4@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _SD_BUS_WIDTH_1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SD_BUS_WIDTH_1@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	str	w8, [sp, #4]
	ldr	w0, [x19]
Lloh13:
	adrp	x8, _MMC_CMD_RETRIES@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MMC_CMD_RETRIES@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	mov	x2, sp
	mov	x1, x19
	bl	_mmc_wait_for_app_cmd
	b	LBB0_6
LBB0_5:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SD_APP_SET_BUS_WIDTH,4,2       ; @SD_APP_SET_BUS_WIDTH
	.comm	_MMC_RSP_R1,4,2                 ; @MMC_RSP_R1
	.comm	_MMC_CMD_AC,4,2                 ; @MMC_CMD_AC
	.comm	_SD_BUS_WIDTH_1,4,2             ; @SD_BUS_WIDTH_1
	.comm	_SD_BUS_WIDTH_4,4,2             ; @SD_BUS_WIDTH_4
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MMC_CMD_RETRIES,4,2            ; @MMC_CMD_RETRIES
.subsections_via_symbols
