	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmci_set_ios
_mmci_set_ios:                          ## @mmci_set_ios
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_mmc_priv
	movq	%rax, %r14
	movq	48(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	72(%r14), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	movq	%r12, %rdi
	callq	_mmc_dev
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	*%rbx
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r12, %rdi
	callq	_mmc_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_3:
	movq	%r14, %r13
	movl	(%r15), %eax
	cmpl	$128, %eax
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_11
## %bb.4:
	cmpl	$129, %eax
	je	LBB0_14
## %bb.5:
	xorl	%r14d, %r14d
	cmpl	$130, %eax
	jne	LBB0_20
## %bb.6:
	movl	4(%r12), %edi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movl	4(%r12), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_mmc_regulator_set_ocr
LBB0_8:
	movl	(%r12), %edi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_20
## %bb.9:
	cmpl	$0, (%r13)
	je	LBB0_20
## %bb.10:
	movl	(%r12), %edi
	callq	_regulator_disable
	movl	$0, (%r13)
	jmp	LBB0_20
LBB0_11:
	movl	4(%r12), %edi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	movl	4(%r12), %esi
	movl	32(%r15), %edx
	movq	%r12, %rdi
	callq	_mmc_regulator_set_ocr
LBB0_13:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %r14d
	cmpq	$0, 24(%rbx)
	jne	LBB0_22
	jmp	LBB0_27
LBB0_14:
	movl	(%r12), %edi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_19
## %bb.15:
	cmpl	$0, (%r13)
	jne	LBB0_19
## %bb.16:
	movl	(%r12), %edi
	callq	_regulator_enable
	testl	%eax, %eax
	js	LBB0_17
## %bb.18:
	movl	$1, (%r13)
	jmp	LBB0_19
LBB0_17:
	movq	%r12, %rdi
	callq	_mmc_dev
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_19:
	movq	_MCI_PWR_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_20:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpq	$0, 24(%rbx)
	je	LBB0_27
LBB0_22:
	cmpl	$130, (%r15)
	je	LBB0_27
## %bb.23:
	orl	4(%r13), %r14d
	movq	8(%r15), %rax
	movq	_MMC_BUS_WIDTH_4@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_25
## %bb.24:
	movq	_MCI_ST_DATA74DIREN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r14d
	jmp	LBB0_27
LBB0_25:
	movq	_MMC_BUS_WIDTH_1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_27
## %bb.26:
	movq	_MCI_ST_DATA74DIREN@GOTPCREL(%rip), %rax
	movq	_MCI_ST_DATA31DIREN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_MCI_ST_DATA2DIREN@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, %r14d
LBB0_27:
	movl	4(%rbx), %eax
	movq	16(%r15), %rcx
	movq	_MMC_BUSMODE_OPENDRAIN@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	testl	%eax, %eax
	je	LBB0_29
## %bb.28:
	xorl	%esi, %esi
	cmpq	%rdx, %rcx
	cmovel	%eax, %esi
	orl	%esi, %r14d
	jmp	LBB0_33
LBB0_29:
	movl	60(%r13), %edi
	cmpq	%rdx, %rcx
	jne	LBB0_31
## %bb.30:
	movl	64(%r13), %esi
	jmp	LBB0_32
LBB0_31:
	movl	56(%r13), %esi
LBB0_32:
	callq	_pinctrl_select_state
LBB0_33:
	movq	24(%r15), %rsi
	testq	%rsi, %rsi
	jne	LBB0_36
## %bb.34:
	cmpq	$0, 16(%rbx)
	je	LBB0_36
## %bb.35:
	movq	_MCI_PWR_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r14d
LBB0_36:
	movq	48(%r13), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_41
## %bb.37:
	cmpq	8(%r13), %rsi
	je	LBB0_41
## %bb.38:
	movl	32(%r13), %edi
	callq	_clk_set_rate
	testl	%eax, %eax
	js	LBB0_39
## %bb.40:
	movl	32(%r13), %edi
	callq	_clk_get_rate
	movl	%eax, 36(%r13)
	jmp	LBB0_41
LBB0_39:
	movl	%eax, %ebx
	movq	40(%r13), %rdi
	callq	_mmc_dev
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_41:
	movq	24(%r15), %rax
	movq	%rax, 8(%r13)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$16, %rdi
	movq	%rdi, %rbx
	callq	_spin_lock_irqsave
	movq	24(%r13), %rax
	testq	%rax, %rax
	je	LBB0_44
## %bb.42:
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_44
## %bb.43:
	movq	24(%r15), %rsi
	movq	%r13, %rdi
	callq	*%rax
	jmp	LBB0_45
LBB0_44:
	movq	24(%r15), %rsi
	movq	%r13, %rdi
	callq	_mmci_set_clkreg
LBB0_45:
	movq	24(%r13), %rax
	testq	%rax, %rax
	je	LBB0_48
## %bb.46:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_48
## %bb.47:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	*%rax
	jmp	LBB0_49
LBB0_48:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_mmci_write_pwrreg
LBB0_49:
	movq	%r13, %rdi
	callq	_mmci_reg_delay
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"platform ios_handler failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to enable vqmmc regulator\n"

	.comm	_MCI_PWR_ON,4,2                 ## @MCI_PWR_ON
	.comm	_MMC_BUS_WIDTH_4,8,3            ## @MMC_BUS_WIDTH_4
	.comm	_MCI_ST_DATA74DIREN,4,2         ## @MCI_ST_DATA74DIREN
	.comm	_MMC_BUS_WIDTH_1,8,3            ## @MMC_BUS_WIDTH_1
	.comm	_MCI_ST_DATA31DIREN,4,2         ## @MCI_ST_DATA31DIREN
	.comm	_MCI_ST_DATA2DIREN,4,2          ## @MCI_ST_DATA2DIREN
	.comm	_MMC_BUSMODE_OPENDRAIN,8,3      ## @MMC_BUSMODE_OPENDRAIN
L_.str.2:                               ## @.str.2
	.asciz	"Error setting clock rate (%d)\n"

	.no_dead_strip	_mmci_set_ios
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmci_set_ios
_mmci_set_ios:                          ; @mmci_set_ios
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x21, x0
	bl	_mmc_priv
	mov	x19, x0
	ldr	x22, [x0, #48]
	ldr	x8, [x0, #72]
	ldr	x23, [x8]
	cbz	x23, LBB0_3
; %bb.1:
	mov	x0, x21
	bl	_mmc_dev
	mov	x1, x20
	blr	x23
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_mmc_dev
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_3:
	ldr	w8, [x20]
	cmp	w8, #128
	b.eq	LBB0_10
; %bb.4:
	cmp	w8, #129
	b.eq	LBB0_13
; %bb.5:
	cmp	w8, #130
	b.ne	LBB0_9
; %bb.6:
	ldr	w0, [x21, #4]
	bl	_IS_ERR
	cbnz	w0, LBB0_8
; %bb.7:
	ldr	w1, [x21, #4]
	mov	x0, x21
	mov	w2, #0
	bl	_mmc_regulator_set_ocr
LBB0_8:
	ldr	w0, [x21]
	bl	_IS_ERR
	cbz	w0, LBB0_17
LBB0_9:
	mov	w21, #0
	b	LBB0_21
LBB0_10:
	ldr	w0, [x21, #4]
	bl	_IS_ERR
	cbnz	w0, LBB0_12
; %bb.11:
	ldr	w1, [x21, #4]
	ldr	w2, [x20, #32]
	mov	x0, x21
	bl	_mmc_regulator_set_ocr
LBB0_12:
	ldr	w21, [x22]
	b	LBB0_21
LBB0_13:
	ldr	w0, [x21]
	bl	_IS_ERR
	cbnz	w0, LBB0_20
; %bb.14:
	ldr	w8, [x19]
	cbnz	w8, LBB0_20
; %bb.15:
	ldr	w0, [x21]
	bl	_regulator_enable
	tbnz	w0, #31, LBB0_19
; %bb.16:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_20
LBB0_17:
	ldr	w8, [x19]
	cbz	w8, LBB0_9
; %bb.18:
	ldr	w0, [x21]
	bl	_regulator_disable
	mov	w21, #0
	str	wzr, [x19]
	b	LBB0_21
LBB0_19:
	mov	x0, x21
	bl	_mmc_dev
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_20:
Lloh4:
	adrp	x8, _MCI_PWR_ON@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MCI_PWR_ON@GOTPAGEOFF]
Lloh6:
	ldr	w21, [x8]
LBB0_21:
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_28
; %bb.22:
	ldr	w8, [x20]
	cmp	w8, #130
	b.eq	LBB0_28
; %bb.23:
	ldr	w8, [x19, #4]
	orr	w21, w8, w21
	ldr	x8, [x20, #8]
Lloh7:
	adrp	x9, _MMC_BUS_WIDTH_4@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MMC_BUS_WIDTH_4@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_25
; %bb.24:
Lloh10:
	adrp	x8, _MCI_ST_DATA74DIREN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MCI_ST_DATA74DIREN@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	b	LBB0_27
LBB0_25:
Lloh13:
	adrp	x9, _MMC_BUS_WIDTH_1@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MMC_BUS_WIDTH_1@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_28
; %bb.26:
Lloh16:
	adrp	x8, _MCI_ST_DATA74DIREN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MCI_ST_DATA74DIREN@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _MCI_ST_DATA31DIREN@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MCI_ST_DATA31DIREN@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh22:
	adrp	x9, _MCI_ST_DATA2DIREN@GOTPAGE
Lloh23:
	ldr	x9, [x9, _MCI_ST_DATA2DIREN@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w8, w9
LBB0_27:
	bic	w21, w21, w8
LBB0_28:
	ldr	w9, [x22, #4]
	ldr	x8, [x20, #16]
Lloh25:
	adrp	x10, _MMC_BUSMODE_OPENDRAIN@GOTPAGE
Lloh26:
	ldr	x10, [x10, _MMC_BUSMODE_OPENDRAIN@GOTPAGEOFF]
Lloh27:
	ldr	x10, [x10]
	cbz	w9, LBB0_30
; %bb.29:
	cmp	x8, x10
	csel	w8, w9, wzr, eq
	orr	w21, w8, w21
	ldr	x1, [x20, #24]
	cbnz	x1, LBB0_36
	b	LBB0_34
LBB0_30:
	ldr	w0, [x19, #60]
	cmp	x8, x10
	b.ne	LBB0_32
; %bb.31:
	ldr	w1, [x19, #64]
	b	LBB0_33
LBB0_32:
	ldr	w1, [x19, #56]
LBB0_33:
	bl	_pinctrl_select_state
	ldr	x1, [x20, #24]
	cbnz	x1, LBB0_36
LBB0_34:
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_36
; %bb.35:
Lloh28:
	adrp	x8, _MCI_PWR_ON@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MCI_PWR_ON@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	bic	w21, w21, w8
LBB0_36:
	ldr	x8, [x19, #48]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_41
; %bb.37:
	ldr	x8, [x19, #8]
	cmp	x1, x8
	b.eq	LBB0_41
; %bb.38:
	ldr	w0, [x19, #32]
	bl	_clk_set_rate
	tbnz	w0, #31, LBB0_40
; %bb.39:
	ldr	w0, [x19, #32]
	bl	_clk_get_rate
	str	w0, [x19, #36]
	b	LBB0_41
LBB0_40:
	mov	x22, x0
	ldr	x0, [x19, #40]
	bl	_mmc_dev
	str	x22, [sp]
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
LBB0_41:
	ldr	x8, [x20, #24]
	str	x8, [x19, #8]
	add	x22, x19, #16
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_44
; %bb.42:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_44
; %bb.43:
	ldr	x1, [x20, #24]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_45
	b	LBB0_47
LBB0_44:
	ldr	x1, [x20, #24]
	mov	x0, x19
	bl	_mmci_set_clkreg
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_47
LBB0_45:
	ldr	x8, [x8]
	cbz	x8, LBB0_47
; %bb.46:
	mov	x0, x19
	mov	x1, x21
	blr	x8
	b	LBB0_48
LBB0_47:
	mov	x0, x19
	mov	x1, x21
	bl	_mmci_write_pwrreg
LBB0_48:
	mov	x0, x19
	bl	_mmci_reg_delay
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_spin_unlock_irqrestore
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"platform ios_handler failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to enable vqmmc regulator\n"

	.comm	_MCI_PWR_ON,4,2                 ; @MCI_PWR_ON
	.comm	_MMC_BUS_WIDTH_4,8,3            ; @MMC_BUS_WIDTH_4
	.comm	_MCI_ST_DATA74DIREN,4,2         ; @MCI_ST_DATA74DIREN
	.comm	_MMC_BUS_WIDTH_1,8,3            ; @MMC_BUS_WIDTH_1
	.comm	_MCI_ST_DATA31DIREN,4,2         ; @MCI_ST_DATA31DIREN
	.comm	_MCI_ST_DATA2DIREN,4,2          ; @MCI_ST_DATA2DIREN
	.comm	_MMC_BUSMODE_OPENDRAIN,8,3      ; @MMC_BUSMODE_OPENDRAIN
l_.str.2:                               ; @.str.2
	.asciz	"Error setting clock rate (%d)\n"

	.no_dead_strip	_mmci_set_ios
.subsections_via_symbols
