	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aml8726_mmc_div
_aml8726_mmc_div:                       ## @aml8726_mmc_div
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	(%rdi), %eax
	leal	(%r14,%r14), %ecx
	cltd
	idivl	%ecx
	movl	%eax, %ebx
	testl	%eax, %eax
	movl	$1, %eax
	cmovel	%eax, %ebx
	leal	-1(%rbx), %r15d
	movl	%r15d, %esi
	callq	_aml8726_mmc_freq
	cmpl	%r14d, %eax
	cmovlel	%r15d, %ebx
	movq	_AML_MMC_CONFIG_CMD_CLK_DIV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_AML_MMC_CONFIG_CMD_CLK_DIV_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	cmpl	%eax, %ebx
	cmovll	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AML_MMC_CONFIG_CMD_CLK_DIV_MASK,4,2 ## @AML_MMC_CONFIG_CMD_CLK_DIV_MASK
	.comm	_AML_MMC_CONFIG_CMD_CLK_DIV_SHIFT,4,2 ## @AML_MMC_CONFIG_CMD_CLK_DIV_SHIFT
	.no_dead_strip	_aml8726_mmc_div
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aml8726_mmc_div
_aml8726_mmc_div:                       ; @aml8726_mmc_div
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w8, [x0]
	lsl	w9, w1, #1
	sdiv	w8, w8, w9
	cmp	w8, #0
	csinc	w21, w8, wzr, ne
	sub	w20, w21, #1
	mov	x1, x20
	bl	_aml8726_mmc_freq
	cmp	w0, w19
	csel	w8, w21, w20, gt
Lloh0:
	adrp	x9, _AML_MMC_CONFIG_CMD_CLK_DIV_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AML_MMC_CONFIG_CMD_CLK_DIV_MASK@GOTPAGEOFF]
Lloh2:
	adrp	x10, _AML_MMC_CONFIG_CMD_CLK_DIV_SHIFT@GOTPAGE
Lloh3:
	ldr	x10, [x10, _AML_MMC_CONFIG_CMD_CLK_DIV_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	ldr	w10, [x10]
	asr	w9, w9, w10
	cmp	w8, w9
	csel	w0, w8, w9, lt
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AML_MMC_CONFIG_CMD_CLK_DIV_MASK,4,2 ; @AML_MMC_CONFIG_CMD_CLK_DIV_MASK
	.comm	_AML_MMC_CONFIG_CMD_CLK_DIV_SHIFT,4,2 ; @AML_MMC_CONFIG_CMD_CLK_DIV_SHIFT
	.no_dead_strip	_aml8726_mmc_div
.subsections_via_symbols
