	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cvm_mmc_of_parse
_cvm_mmc_of_parse:                      ## @cvm_mmc_of_parse
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	(%rdi), %r12
	movq	24(%rsi), %r15
	leaq	L_.str(%rip), %rsi
	leaq	-72(%rbp), %rdx
	movq	%r12, %rdi
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_dev_err
	jmp	LBB0_26
LBB0_2:
	movq	-72(%rbp), %rax
	movq	_CAVIUM_MAX_MMC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_4
## %bb.3:
	movq	16(%r14), %rcx
	movq	8(%rcx), %rcx
	cmpq	$0, (%rcx,%rax,8)
	je	LBB0_5
LBB0_4:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_26:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	callq	_mmc_regulator_get_supply
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_26
## %bb.6:
	movl	20(%r15), %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_MMC_VDD_32_33@GOTPCREL(%rip), %rax
	movq	_MMC_VDD_33_34@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%r15)
LBB0_8:
	movq	%r15, %rdi
	callq	_mmc_of_parse
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_26
## %bb.9:
	movq	_MMC_CAP_8_BIT_DATA@GOTPCREL(%rip), %rcx
	movq	_MMC_CAP_4_BIT_DATA@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	orl	(%rcx), %eax
	testl	%eax, 4(%r15)
	jne	LBB0_15
## %bb.10:
	leaq	4(%r15), %r13
	leaq	L_.str.3(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	callq	_of_property_read_u32
	movq	-48(%rbp), %rax
	cmpq	$4, %rax
	je	LBB0_13
## %bb.11:
	cmpq	$8, %rax
	movq	_MMC_CAP_8_BIT_DATA@GOTPCREL(%rip), %rcx
	jne	LBB0_15
## %bb.12:
	movl	(%rbx), %eax
	orl	(%rcx), %eax
	movq	%r13, %rbx
	jmp	LBB0_14
LBB0_13:
	movl	(%r13), %eax
LBB0_14:
	orl	(%rbx), %eax
	movl	%eax, (%r13)
LBB0_15:
	leaq	8(%r15), %rbx
	movq	8(%r15), %rax
	testq	%rax, %rax
	jne	LBB0_17
## %bb.16:
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	_of_property_read_u32
	movq	(%rbx), %rax
LBB0_17:
	addq	$-52000001, %rax                ## imm = 0xFCE68AFF
	cmpq	$-52000001, %rax                ## imm = 0xFCE68AFF
	ja	LBB0_19
## %bb.18:
	movq	$52000000, (%rbx)               ## imm = 0x3197500
LBB0_19:
	movl	$400000, 16(%r15)               ## imm = 0x61A80
	movq	16(%r14), %rcx
	movabsq	$1000000000000, %rax            ## imm = 0xE8D4A51000
	xorl	%edx, %edx
	divq	(%rcx)
	movq	%rax, %r15
	leaq	L_.str.5(%rip), %rsi
	leaq	-64(%rbp), %rdx
	movq	%r12, %rdi
	callq	_of_property_read_u32
	leaq	L_.str.6(%rip), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	callq	_of_property_read_u32
	movl	%r15d, %eax
	shrl	$31, %eax
	addl	%r15d, %eax
	sarl	%eax
	movslq	%eax, %rcx
	movq	-64(%rbp), %rax
	addq	%rcx, %rax
	movslq	%r15d, %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_20
## %bb.21:
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_22
LBB0_20:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r15d
                                        ## kill: def $eax killed $eax def $rax
LBB0_22:
	movq	%rax, (%r14)
	addq	-56(%rbp), %rcx
	movq	%rcx, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_23
## %bb.24:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_25
LBB0_23:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%r15d
                                        ## kill: def $eax killed $eax def $rax
LBB0_25:
	movq	%rax, 8(%r14)
	movl	-72(%rbp), %ebx
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reg"

L_.str.1:                               ## @.str.1
	.asciz	"Missing or invalid reg property on %pOF\n"

	.comm	_CAVIUM_MAX_MMC,8,3             ## @CAVIUM_MAX_MMC
L_.str.2:                               ## @.str.2
	.asciz	"Invalid reg property on %pOF\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MMC_VDD_32_33,4,2              ## @MMC_VDD_32_33
	.comm	_MMC_VDD_33_34,4,2              ## @MMC_VDD_33_34
	.comm	_MMC_CAP_8_BIT_DATA,4,2         ## @MMC_CAP_8_BIT_DATA
	.comm	_MMC_CAP_4_BIT_DATA,4,2         ## @MMC_CAP_4_BIT_DATA
L_.str.3:                               ## @.str.3
	.asciz	"cavium,bus-max-width"

L_.str.4:                               ## @.str.4
	.asciz	"spi-max-frequency"

L_.str.5:                               ## @.str.5
	.asciz	"cavium,cmd-clk-skew"

L_.str.6:                               ## @.str.6
	.asciz	"cavium,dat-clk-skew"

	.no_dead_strip	_cvm_mmc_of_parse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cvm_mmc_of_parse
_cvm_mmc_of_parse:                      ; @cvm_mmc_of_parse
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x1
	mov	x22, x0
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp]
	ldr	x20, [x0]
	ldr	x21, [x1, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #24
	mov	x0, x20
	bl	_of_property_read_u32
	cbz	w0, LBB0_2
; %bb.1:
	mov	x23, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x2, x20
	bl	_dev_err
	b	LBB0_5
LBB0_2:
	ldr	x8, [sp, #24]
Lloh4:
	adrp	x9, _CAVIUM_MAX_MMC@GOTPAGE
Lloh5:
	ldr	x9, [x9, _CAVIUM_MAX_MMC@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_4
; %bb.3:
	ldr	x9, [x19, #16]
	ldr	x9, [x9, #8]
	ldr	x8, [x9, x8, lsl #3]
	cbz	x8, LBB0_6
LBB0_4:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	mov	x2, x20
	bl	_dev_err
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_5:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_6:
	mov	x0, x21
	bl	_mmc_regulator_get_supply
	mov	x23, x0
	cbnz	w0, LBB0_5
; %bb.7:
	ldr	w0, [x21, #20]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.8:
Lloh12:
	adrp	x8, _MMC_VDD_32_33@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MMC_VDD_32_33@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _MMC_VDD_33_34@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MMC_VDD_33_34@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x21]
LBB0_9:
	mov	x0, x21
	bl	_mmc_of_parse
	mov	x23, x0
	cbnz	w0, LBB0_5
; %bb.10:
	mov	x22, x21
	ldr	w8, [x22, #4]!
Lloh18:
	adrp	x23, _MMC_CAP_8_BIT_DATA@GOTPAGE
Lloh19:
	ldr	x23, [x23, _MMC_CAP_8_BIT_DATA@GOTPAGEOFF]
	ldr	w9, [x23]
Lloh20:
	adrp	x24, _MMC_CAP_4_BIT_DATA@GOTPAGE
Lloh21:
	ldr	x24, [x24, _MMC_CAP_4_BIT_DATA@GOTPAGEOFF]
	ldr	w10, [x24]
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_16
; %bb.11:
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, sp
	mov	x0, x20
	bl	_of_property_read_u32
	ldr	x8, [sp]
	cmp	x8, #4
	b.eq	LBB0_14
; %bb.12:
	cmp	x8, #8
	b.ne	LBB0_16
; %bb.13:
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w9, w8
	mov	x9, x22
	b	LBB0_15
LBB0_14:
	ldr	w8, [x22]
Lloh24:
	adrp	x9, _MMC_CAP_4_BIT_DATA@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MMC_CAP_4_BIT_DATA@GOTPAGEOFF]
LBB0_15:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x22]
LBB0_16:
	mov	x22, x21
	ldr	x8, [x22, #8]!
	cbnz	x8, LBB0_18
; %bb.17:
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	bl	_of_property_read_u32
	ldr	x8, [x22]
LBB0_18:
	mov	x9, #-29953
	movk	x9, #64742, lsl #16
	add	x10, x9, #1
	add	x8, x8, x9
	cmp	x8, x10
	b.hs	LBB0_20
; %bb.19:
	mov	w8, #29952
	movk	w8, #793, lsl #16
	str	x8, [x22]
LBB0_20:
	mov	w8, #6784
	movk	w8, #6, lsl #16
	str	w8, [x21, #16]
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	mov	x9, #4096
	movk	x9, #54437, lsl #16
	movk	x9, #232, lsl #32
	udiv	x21, x9, x8
Lloh28:
	adrp	x1, l_.str.5@PAGE
Lloh29:
	add	x1, x1, l_.str.5@PAGEOFF
	add	x2, sp, #16
	mov	x0, x20
	bl	_of_property_read_u32
Lloh30:
	adrp	x1, l_.str.6@PAGE
Lloh31:
	add	x1, x1, l_.str.6@PAGEOFF
	add	x2, sp, #8
	mov	x0, x20
	bl	_of_property_read_u32
	ldp	x11, x8, [sp, #8]
	cmp	w21, #0
	cinc	w9, w21, lt
	sbfx	x9, x9, #1, #31
	add	x8, x8, x9
	sxtw	x10, w21
	udiv	x8, x8, x10
	add	x9, x11, x9
	udiv	x9, x9, x10
	stp	x8, x9, [x19]
	ldr	w23, [sp, #24]
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reg"

l_.str.1:                               ; @.str.1
	.asciz	"Missing or invalid reg property on %pOF\n"

	.comm	_CAVIUM_MAX_MMC,8,3             ; @CAVIUM_MAX_MMC
l_.str.2:                               ; @.str.2
	.asciz	"Invalid reg property on %pOF\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MMC_VDD_32_33,4,2              ; @MMC_VDD_32_33
	.comm	_MMC_VDD_33_34,4,2              ; @MMC_VDD_33_34
	.comm	_MMC_CAP_8_BIT_DATA,4,2         ; @MMC_CAP_8_BIT_DATA
	.comm	_MMC_CAP_4_BIT_DATA,4,2         ; @MMC_CAP_4_BIT_DATA
l_.str.3:                               ; @.str.3
	.asciz	"cavium,bus-max-width"

l_.str.4:                               ; @.str.4
	.asciz	"spi-max-frequency"

l_.str.5:                               ; @.str.5
	.asciz	"cavium,cmd-clk-skew"

l_.str.6:                               ; @.str.6
	.asciz	"cavium,dat-clk-skew"

	.no_dead_strip	_cvm_mmc_of_parse
.subsections_via_symbols
