	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_mci_hi3660_set_ios
_dw_mci_hi3660_set_ios:                 ## @dw_mci_hi3660_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
	movslq	(%rsi), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rdi, %r14
	movq	24(%rdi), %r13
	cmpl	(%r13), %eax
	je	LBB0_7
## %bb.2:
	movq	%rsi, %r12
	movq	_GENCLK_DIV@GOTPCREL(%rip), %r15
	movslq	(%r15), %rbx
	incq	%rbx
	imulq	%rax, %rbx
	movl	16(%r14), %edi
	movq	%rbx, %rsi
	callq	_clk_set_rate
	testl	%eax, %eax
	je	LBB0_3
## %bb.8:
	movl	20(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_3:
	movl	16(%r14), %edi
	callq	_clk_get_rate
	movq	%r15, %rbx
	movq	%rax, %r15
	movl	4(%r12), %esi
	movq	%r14, %rdi
	movl	$-1, %edx
	callq	_dw_mci_hs_set_timing
	movslq	(%rbx), %rcx
	incq	%rcx
	movq	%r15, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_4
## %bb.5:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_6
LBB0_4:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_6:
	movq	%rax, (%r14)
	movq	$0, 8(%r14)
	movl	%eax, (%r13)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GENCLK_DIV,4,2                 ## @GENCLK_DIV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set rate %luHz\n"

	.no_dead_strip	_dw_mci_hi3660_set_ios
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_mci_hi3660_set_ios
_dw_mci_hi3660_set_ios:                 ; @dw_mci_hi3660_set_ios
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldrsw	x8, [x1]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x22, [x0, #24]
	ldr	w9, [x22]
	cmp	w8, w9
	b.eq	LBB0_5
; %bb.2:
	mov	x20, x1
Lloh0:
	adrp	x23, _GENCLK_DIV@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GENCLK_DIV@GOTPAGEOFF]
	ldrsw	x9, [x23]
	madd	x21, x8, x9, x8
	ldr	w0, [x19, #16]
	mov	x1, x21
	bl	_clk_set_rate
	cbz	w0, LBB0_4
; %bb.3:
	ldr	w0, [x19, #20]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_dev_err
LBB0_4:
	ldr	w0, [x19, #16]
	bl	_clk_get_rate
	mov	x21, x0
	ldr	w1, [x20, #4]
	mov	x0, x19
	mov	w2, #-1
	bl	_dw_mci_hs_set_timing
	ldrsw	x8, [x23]
	add	x8, x8, #1
	udiv	x8, x21, x8
	stp	x8, xzr, [x19]
	str	w8, [x22]
LBB0_5:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_GENCLK_DIV,4,2                 ; @GENCLK_DIV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set rate %luHz\n"

	.no_dead_strip	_dw_mci_hi3660_set_ios
.subsections_via_symbols
