	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxcmci_set_clk_rate
_mxcmci_set_clk_rate:                   ## @mxcmci_set_clk_rate
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	4(%rdi), %edi
	callq	_clk_get_rate
	movl	%eax, %r12d
	xorl	%r13d, %r13d
	movl	$1, %ecx
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	leal	(%r13,%r13), %esi
	xorl	%edi, %edi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=2
	movl	%ebx, %edi
	cmpl	%r14d, %eax
	jbe	LBB0_12
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	2(%rdi), %ebx
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%ebx
	testl	%r13d, %r13d
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	cltd
	idivl	%esi
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=2
	cmpl	%r14d, %eax
	jbe	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=2
	cmpl	$14, %edi
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=2
	addl	$3, %edi
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%edi
	testl	%r13d, %r13d
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=2
	cltd
	idivl	%esi
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	testl	%r13d, %r13d
	movl	%esi, %r13d
	cmovel	%ecx, %r13d
	cmpl	$2049, %r13d                    ## imm = 0x801
	jl	LBB0_1
## %bb.11:
	movl	%esi, %r13d
	jmp	LBB0_12
LBB0_9:
	incl	%edi
	movl	%edi, %ebx
LBB0_12:
	movl	%r13d, %esi
	shll	$4, %esi
	orl	%ebx, %esi
	movq	_MMC_REG_CLK_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_mxcmci_writew
	movl	(%r15), %edi
	callq	_mmc_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	movl	%r12d, %r8d
	movl	%r14d, %r9d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_REG_CLK_RATE,4,2           ## @MMC_REG_CLK_RATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"scaler: %d divider: %d in: %d out: %d\n"

	.no_dead_strip	_mxcmci_set_clk_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxcmci_set_clk_rate
_mxcmci_set_clk_rate:                   ; @mxcmci_set_clk_rate
	.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
	mov	x19, x1
	mov	x21, x0
	ldr	w0, [x0, #4]
	bl	_clk_get_rate
	mov	x20, x0
	mov	w8, #0
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	lsl	w22, w8, #1
	mov	w11, #2
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=2
	add	w11, w9, #1
	cmp	w10, w19
	b.ls	LBB0_7
LBB0_3:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x9, x11
	cmp	w11, #17
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	udiv	w10, w20, w9
	cbz	w8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=2
	sdiv	w10, w10, w22
	b	LBB0_2
LBB0_6:                                 ;   in Loop: Header=BB0_1 Depth=1
	cmp	w8, #0
	csinc	w8, w22, wzr, ne
	cmp	w8, #2049
	b.lt	LBB0_1
	b	LBB0_8
LBB0_7:
	mov	x22, x8
LBB0_8:
	sub	w23, w9, #1
	orr	w1, w23, w22, lsl #4
Lloh0:
	adrp	x8, _MMC_REG_CLK_RATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMC_REG_CLK_RATE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_mxcmci_writew
	ldr	w0, [x21]
	bl	_mmc_dev
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	mov	x3, x23
	mov	x4, x20
	mov	x5, x19
	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_dbg
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_REG_CLK_RATE,4,2           ; @MMC_REG_CLK_RATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"scaler: %d divider: %d in: %d out: %d\n"

	.no_dead_strip	_mxcmci_set_clk_rate
.subsections_via_symbols
