	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mclk_get_divisor
_mclk_get_divisor:                      ## @mclk_get_divisor
	.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, %r15
	movq	%rdi, %r14
	movq	(%rsi), %r12
	movl	20(%rsi), %edi
	callq	_clk_get_rate
	movq	%rax, %r13
	movq	%rax, 8(%r15)
	movq	%rax, %rbx
	shrq	$2, %rbx
	cmpq	%rbx, %r12
	jbe	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_dev_warn
	movq	%rbx, %r12
LBB0_2:
	leaq	(%r12,%r12), %rcx
	leaq	-1(,%r12,2), %rax
	addq	%r13, %rax
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_3
## %bb.4:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %rbx
	jmp	LBB0_5
LBB0_3:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %ebx
LBB0_5:
	movq	_PXA_CAMERA_MCLK_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%r15)
	je	LBB0_10
## %bb.6:
	leal	(%rbx,%rbx), %ecx
	movslq	%ecx, %rsi
	movq	%r13, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_7
## %bb.8:
	movq	%r13, %rax
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_9
LBB0_7:
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_9:
	movq	%rax, (%r15)
LBB0_10:
	decl	%ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movq	%r13, %rdx
	movq	%r12, %rcx
	movl	%ebx, %r8d
	callq	_dev_dbg
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Limiting master clock to %lu\n"

	.comm	_PXA_CAMERA_MCLK_EN,4,2         ## @PXA_CAMERA_MCLK_EN
L_.str.1:                               ## @.str.1
	.asciz	"LCD clock %luHz, target freq %luHz, divisor %u\n"

	.no_dead_strip	_mclk_get_divisor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mclk_get_divisor
_mclk_get_divisor:                      ; @mclk_get_divisor
	.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	x20, x1
	mov	x19, x0
	ldr	x22, [x1]
	ldr	w0, [x1, #20]
	bl	_clk_get_rate
	mov	x21, x0
	str	x0, [x20, #8]
	lsr	x23, x0, #2
	cmp	x22, x23
	b.ls	LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_dev_warn
	mov	x22, x23
LBB0_2:
	lsl	x8, x22, #1
	add	x9, x21, x8
	sub	x9, x9, #1
	ldr	w10, [x20, #16]
Lloh2:
	adrp	x11, _PXA_CAMERA_MCLK_EN@GOTPAGE
Lloh3:
	ldr	x11, [x11, _PXA_CAMERA_MCLK_EN@GOTPAGEOFF]
Lloh4:
	ldr	w11, [x11]
	udiv	x8, x9, x8
	tst	w11, w10
	b.eq	LBB0_4
; %bb.3:
	lsl	w9, w8, #1
	sxtw	x9, w9
	udiv	x9, x21, x9
	str	x9, [x20]
LBB0_4:
	sub	w20, w8, #1
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	mov	x3, x22
	mov	x4, x20
	bl	_dev_dbg
	mov	x0, x20
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Limiting master clock to %lu\n"

	.comm	_PXA_CAMERA_MCLK_EN,4,2         ; @PXA_CAMERA_MCLK_EN
l_.str.1:                               ; @.str.1
	.asciz	"LCD clock %luHz, target freq %luHz, divisor %u\n"

	.no_dead_strip	_mclk_get_divisor
.subsections_via_symbols
