	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at91_mci_set_ios
_at91_mci_set_ios:                      ## @at91_mci_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_mmc_priv
	movq	%rax, %r13
	movl	12(%rax), %edi
	callq	_clk_get_rate
	movq	%rax, %r12
	movl	20(%r14), %eax
	movl	%eax, 8(%r13)
	cmpl	$0, (%r14)
	movq	_AT91_MCI_CR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	je	LBB0_1
## %bb.2:
	movq	_AT91_MCI_MCIEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_at91_mci_write
	movslq	(%r14), %rsi
	leaq	(%rsi,%rsi), %rcx
	movq	%r12, %rdi
	orq	%rsi, %rdi
	shrq	$32, %rdi
	je	LBB0_3
## %bb.4:
	movq	%r12, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %rcx
	testq	%rdi, %rdi
	je	LBB0_6
LBB0_7:
	movq	%r12, %rax
	xorl	%edx, %edx
	divq	%rsi
	movq	%rax, %r15
	jmp	LBB0_8
LBB0_1:
	movq	_AT91_MCI_MCIDIS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_at91_mci_write
	xorl	%r15d, %r15d
	jmp	LBB0_12
LBB0_3:
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %ecx
	testq	%rdi, %rdi
	jne	LBB0_7
LBB0_6:
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %r15d
LBB0_8:
	shrq	%r15
	cmpq	$1, %rcx
	sbbl	$0, %r15d
	leal	(%r15,%r15), %ecx
	addl	$2, %ecx
	movslq	%ecx, %rsi
	movq	%r12, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_9
## %bb.10:
	movq	%r12, %rax
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_11
LBB0_9:
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_11:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_pr_debug
LBB0_12:
	movq	8(%r14), %rax
	movq	_MMC_BUS_WIDTH_4@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.13:
	movq	(%r13), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_15
## %bb.14:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	_AT91_MCI_SDCR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_at91_mci_read
	movq	_AT91_MCI_SDCBUS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	jmp	LBB0_16
LBB0_15:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	_AT91_MCI_SDCR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_at91_mci_read
	movq	_AT91_MCI_SDCBUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%r13, %rdi
	movl	%ebx, %esi
LBB0_16:
	callq	_at91_mci_write
	movq	_AT91_MCI_MR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_at91_mci_read
	movq	_AT91_MCI_CLKDIV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	orl	%r15d, %edx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_at91_mci_write
	movq	(%r13), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.17:
	movl	16(%r14), %eax
	cmpl	$128, %eax
	je	LBB0_22
## %bb.18:
	cmpl	$129, %eax
	je	LBB0_24
## %bb.19:
	cmpl	$130, %eax
	jne	LBB0_23
## %bb.20:
	xorl	%esi, %esi
	jmp	LBB0_21
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movl	$1, %esi
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gpio_set_value                 ## TAILCALL
LBB0_23:
	movl	$1, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WARN_ON                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AT91_MCI_CR,4,2                ## @AT91_MCI_CR
	.comm	_AT91_MCI_MCIDIS,4,2            ## @AT91_MCI_MCIDIS
	.comm	_AT91_MCI_MCIEN,4,2             ## @AT91_MCI_MCIEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"clkdiv = %d. mcck = %ld\n"

	.comm	_MMC_BUS_WIDTH_4,8,3            ## @MMC_BUS_WIDTH_4
L_.str.1:                               ## @.str.1
	.asciz	"MMC: Setting controller bus width to 4\n"

	.comm	_AT91_MCI_SDCR,4,2              ## @AT91_MCI_SDCR
	.comm	_AT91_MCI_SDCBUS,4,2            ## @AT91_MCI_SDCBUS
L_.str.2:                               ## @.str.2
	.asciz	"MMC: Setting controller bus width to 1\n"

	.comm	_AT91_MCI_MR,4,2                ## @AT91_MCI_MR
	.comm	_AT91_MCI_CLKDIV,4,2            ## @AT91_MCI_CLKDIV
	.no_dead_strip	_at91_mci_set_ios
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function at91_mci_set_ios
_at91_mci_set_ios:                      ; @at91_mci_set_ios
	.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	x19, x1
	bl	_mmc_priv
	mov	x20, x0
	ldr	w0, [x0, #12]
	bl	_clk_get_rate
	ldr	w8, [x19, #20]
	str	w8, [x20, #8]
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _AT91_MCI_CR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AT91_MCI_CR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh3:
	adrp	x8, _AT91_MCI_MCIEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AT91_MCI_MCIEN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_at91_mci_write
	ldrsw	x8, [x19]
	lsl	x9, x8, #1
	udiv	x10, x21, x9
	msub	x9, x10, x9, x21
	cmp	x9, #0
	cset	w9, eq
	udiv	x8, x21, x8
	lsr	x8, x8, #1
	sub	x22, x8, x9
	lsl	w8, w22, #1
	add	w8, w8, #2
	sxtw	x8, w8
	udiv	x8, x21, x8
	stp	x22, x8, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x8, _AT91_MCI_MCIDIS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AT91_MCI_MCIDIS@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_at91_mci_write
	mov	w22, #0
LBB0_3:
	ldr	x8, [x19, #8]
Lloh11:
	adrp	x9, _MMC_BUS_WIDTH_4@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MMC_BUS_WIDTH_4@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_6
; %bb.5:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
Lloh16:
	adrp	x8, _AT91_MCI_SDCR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AT91_MCI_SDCR@GOTPAGEOFF]
Lloh18:
	ldr	w21, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_at91_mci_read
Lloh19:
	adrp	x8, _AT91_MCI_SDCBUS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AT91_MCI_SDCBUS@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	orr	w2, w8, w0
	b	LBB0_7
LBB0_6:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_debug
Lloh24:
	adrp	x8, _AT91_MCI_SDCR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AT91_MCI_SDCR@GOTPAGEOFF]
Lloh26:
	ldr	w21, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_at91_mci_read
Lloh27:
	adrp	x8, _AT91_MCI_SDCBUS@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AT91_MCI_SDCBUS@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	bic	w2, w0, w8
LBB0_7:
	mov	x0, x20
	mov	x1, x21
	bl	_at91_mci_write
Lloh30:
	adrp	x8, _AT91_MCI_MR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AT91_MCI_MR@GOTPAGEOFF]
Lloh32:
	ldr	w21, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_at91_mci_read
Lloh33:
	adrp	x8, _AT91_MCI_CLKDIV@GOTPAGE
Lloh34:
	ldr	x8, [x8, _AT91_MCI_CLKDIV@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	bic	w8, w0, w8
	orr	w2, w8, w22
	mov	x0, x20
	mov	x1, x21
	bl	_at91_mci_write
	ldr	x8, [x20]
	ldr	x0, [x8]
	cbz	x0, LBB0_12
; %bb.8:
	ldr	w8, [x19, #16]
	cmp	w8, #128
	b.eq	LBB0_13
; %bb.9:
	cmp	w8, #129
	b.eq	LBB0_12
; %bb.10:
	cmp	w8, #130
	b.ne	LBB0_15
; %bb.11:
	mov	w1, #0
	b	LBB0_14
LBB0_12:
	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
LBB0_13:
	mov	w1, #1
LBB0_14:
	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
	b	_gpio_set_value
LBB0_15:
	mov	w0, #1
	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
	b	_WARN_ON
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_AT91_MCI_CR,4,2                ; @AT91_MCI_CR
	.comm	_AT91_MCI_MCIDIS,4,2            ; @AT91_MCI_MCIDIS
	.comm	_AT91_MCI_MCIEN,4,2             ; @AT91_MCI_MCIEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"clkdiv = %d. mcck = %ld\n"

	.comm	_MMC_BUS_WIDTH_4,8,3            ; @MMC_BUS_WIDTH_4
l_.str.1:                               ; @.str.1
	.asciz	"MMC: Setting controller bus width to 4\n"

	.comm	_AT91_MCI_SDCR,4,2              ; @AT91_MCI_SDCR
	.comm	_AT91_MCI_SDCBUS,4,2            ; @AT91_MCI_SDCBUS
l_.str.2:                               ; @.str.2
	.asciz	"MMC: Setting controller bus width to 1\n"

	.comm	_AT91_MCI_MR,4,2                ; @AT91_MCI_MR
	.comm	_AT91_MCI_CLKDIV,4,2            ; @AT91_MCI_CLKDIV
	.no_dead_strip	_at91_mci_set_ios
.subsections_via_symbols
