	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_meson_vclk_setup               ## -- Begin function meson_vclk_setup
	.p2align	4, 0x90
_meson_vclk_setup:                      ## @meson_vclk_setup
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_MESON_VCLK_TARGET_CVBS@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_1
## %bb.24:
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_meson_venci_cvbs_clock_config  ## TAILCALL
LBB0_1:
	movl	%edx, %ebx
	movq	_MESON_VCLK_TARGET_DMT@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_4
## %bb.2:
	addl	%ebx, %ebx
	leal	(%rbx,%rbx,4), %esi
	movq	_VID_PLL_DIV_5@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	subq	$8, %rsp
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	pushq	$0
	pushq	$0
	pushq	$1
	pushq	$1
	pushq	$2
LBB0_3:
	callq	_meson_vclk_set
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%r8d, %r13d
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r8d
	cmpl	%ebx, %r8d
	jbe	LBB0_7
## %bb.5:
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	jmp	LBB0_6
LBB0_7:
	movl	%eax, %esi
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	cmpl	%ebx, %ecx
	jbe	LBB0_8
## %bb.25:
	leaq	L_.str.1(%rip), %rdi
	movl	%ecx, %esi
	jmp	LBB0_6
LBB0_8:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	_params@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	movl	(%r10), %edi
	testl	%edi, %edi
	je	LBB0_22
## %bb.9:
	movl	%r9d, %r12d
	xorl	%r15d, %r15d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_10 Depth=1
	incl	%r15d
	leaq	(%r15,%r15,8), %rax
	leaq	(%rax,%rax,2), %rax
	addq	%r15, %rax
	movl	(%r10,%rax), %edi
	testl	%edi, %edi
	je	LBB0_22
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%ebx, %edi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	callq	_FREQ_1000_1001
	movq	_params@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r10
	cmpl	%ebx, %eax
	jne	LBB0_20
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	leaq	(%r15,%r15,8), %rax
	leaq	(%rax,%rax,2), %rax
	addq	%r15, %rax
	movl	(%r10,%rax), %ecx
	testl	%r12d, %r12d
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_MESON_VCLK_HDMI_ENCI_54000@GOTPCREL(%rip), %rdx
	cmpl	%r15d, (%rdx)
	je	LBB0_20
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	testl	%r12d, %r12d
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_MESON_VCLK_HDMI_DDR_54000@GOTPCREL(%rip), %rdx
	cmpl	%r15d, (%rdx)
	je	LBB0_20
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	cmpl	%ebx, %r13d
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_MESON_VCLK_HDMI_DDR_148500@GOTPCREL(%rip), %rdx
	cmpl	%r15d, (%rdx)
	je	LBB0_20
LBB0_18:                                ##   in Loop: Header=BB0_10 Depth=1
	cmpl	%ebx, %r13d
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_MESON_VCLK_HDMI_148500@GOTPCREL(%rip), %rdx
	cmpl	%r15d, (%rdx)
	je	LBB0_20
LBB0_21:
	testl	%ecx, %ecx
	je	LBB0_22
## %bb.23:
	xorl	%r11d, %r11d
	cmpl	%ebx, %ecx
	setne	%r11b
	movl	24(%r10,%rax), %edx
	movl	20(%r10,%rax), %ecx
	movl	16(%r10,%rax), %r8d
	movl	12(%r10,%rax), %r9d
	movl	4(%r10,%rax), %esi
	movl	8(%r10,%rax), %eax
	subq	$8, %rsp
	movq	%r14, %rdi
	pushq	%r11
	pushq	%r12
	pushq	-48(%rbp)                       ## 8-byte Folded Reload
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	pushq	%rax
	jmp	LBB0_3
LBB0_22:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MESON_VCLK_TARGET_CVBS,4,2     ## @MESON_VCLK_TARGET_CVBS
	.comm	_MESON_VCLK_TARGET_DMT,4,2      ## @MESON_VCLK_TARGET_DMT
	.comm	_VID_PLL_DIV_5,4,2              ## @VID_PLL_DIV_5
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fatal Error, invalid HDMI-TX freq %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Fatal Error, invalid HDMI venc freq %d\n"

	.comm	_params,8,3                     ## @params
	.comm	_MESON_VCLK_HDMI_ENCI_54000,4,2 ## @MESON_VCLK_HDMI_ENCI_54000
	.comm	_MESON_VCLK_HDMI_DDR_54000,4,2  ## @MESON_VCLK_HDMI_DDR_54000
	.comm	_MESON_VCLK_HDMI_DDR_148500,4,2 ## @MESON_VCLK_HDMI_DDR_148500
	.comm	_MESON_VCLK_HDMI_148500,4,2     ## @MESON_VCLK_HDMI_148500
L_.str.2:                               ## @.str.2
	.asciz	"Fatal Error, invalid HDMI vclk freq %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_meson_vclk_setup               ; -- Begin function meson_vclk_setup
	.p2align	2
_meson_vclk_setup:                      ; @meson_vclk_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, _MESON_VCLK_TARGET_CVBS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MESON_VCLK_TARGET_CVBS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_meson_venci_cvbs_clock_config
LBB0_2:
	mov	x21, x2
Lloh3:
	adrp	x8, _MESON_VCLK_TARGET_DMT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MESON_VCLK_TARGET_DMT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_5
; %bb.3:
	add	w8, w21, w21, lsl #2
	lsl	w1, w8, #1
Lloh6:
	adrp	x8, _VID_PLL_DIV_5@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VID_PLL_DIV_5@GOTPAGEOFF]
Lloh8:
	ldr	w5, [x8]
	str	wzr, [sp, #8]
	mov	w8, #1
	str	x8, [sp]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w6, #2
	mov	w7, #1
LBB0_4:
	bl	_meson_vclk_set
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_5:
	mov	x22, x4
	cmp	w4, w21
	b.ls	LBB0_7
; %bb.6:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	b	LBB0_25
LBB0_7:
	cmp	w3, w21
	b.ls	LBB0_9
; %bb.8:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x3
	b	LBB0_25
LBB0_9:
Lloh13:
	adrp	x26, _params@GOTPAGE
Lloh14:
	ldr	x26, [x26, _params@GOTPAGEOFF]
	ldr	x8, [x26]
	ldr	w0, [x8]
	cbz	w0, LBB0_24
; %bb.10:
	mov	x20, x5
	mov	x24, #0
	udiv	w9, w21, w22
	str	w9, [sp, #28]                   ; 4-byte Folded Spill
Lloh15:
	adrp	x27, _MESON_VCLK_HDMI_ENCI_54000@GOTPAGE
Lloh16:
	ldr	x27, [x27, _MESON_VCLK_HDMI_ENCI_54000@GOTPAGEOFF]
Lloh17:
	adrp	x28, _MESON_VCLK_HDMI_DDR_54000@GOTPAGE
Lloh18:
	ldr	x28, [x28, _MESON_VCLK_HDMI_DDR_54000@GOTPAGEOFF]
	mov	w23, #28
Lloh19:
	adrp	x25, _MESON_VCLK_HDMI_DDR_148500@GOTPAGE
Lloh20:
	ldr	x25, [x25, _MESON_VCLK_HDMI_DDR_148500@GOTPAGEOFF]
	udiv	w9, w21, w3
	str	w9, [sp, #24]                   ; 4-byte Folded Spill
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w24, w24, #1
	umull	x9, w24, w23
	ldr	w0, [x8, x9]
	cbz	w0, LBB0_24
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	cmp	w0, w21
	b.eq	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	bl	_FREQ_1000_1001
	ldr	x8, [x26]
	cmp	w0, w21
	b.ne	LBB0_11
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	mul	x9, x24, x23
	ldr	w9, [x8, x9]
	cbnz	w20, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w10, [x27]
	cmp	w10, w24
	b.eq	LBB0_11
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=1
	cbz	w20, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w10, [x28]
	cmp	w10, w24
	b.eq	LBB0_11
LBB0_18:                                ;   in Loop: Header=BB0_12 Depth=1
	cmp	w22, w21
	b.ne	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w10, [x25]
	cmp	w10, w24
	b.eq	LBB0_11
LBB0_20:                                ;   in Loop: Header=BB0_12 Depth=1
	cmp	w22, w21
	b.eq	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_12 Depth=1
Lloh21:
	adrp	x10, _MESON_VCLK_HDMI_148500@GOTPAGE
Lloh22:
	ldr	x10, [x10, _MESON_VCLK_HDMI_148500@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	cmp	w10, w24
	b.eq	LBB0_11
LBB0_22:
	cbz	w9, LBB0_24
; %bb.23:
	cmp	w9, w21
	cset	w9, ne
	mov	w10, #28
	madd	x8, x24, x10, x8
	ldp	w3, w2, [x8, #20]
	ldp	w5, w4, [x8, #12]
	ldp	w1, w6, [x8, #4]
	stp	w20, w9, [sp, #4]
	ldp	w8, w7, [sp, #24]               ; 8-byte Folded Reload
	str	w8, [sp]
	mov	x0, x19
	b	LBB0_4
LBB0_24:
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
LBB0_25:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_pr_err
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MESON_VCLK_TARGET_CVBS,4,2     ; @MESON_VCLK_TARGET_CVBS
	.comm	_MESON_VCLK_TARGET_DMT,4,2      ; @MESON_VCLK_TARGET_DMT
	.comm	_VID_PLL_DIV_5,4,2              ; @VID_PLL_DIV_5
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fatal Error, invalid HDMI-TX freq %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Fatal Error, invalid HDMI venc freq %d\n"

	.comm	_params,8,3                     ; @params
	.comm	_MESON_VCLK_HDMI_ENCI_54000,4,2 ; @MESON_VCLK_HDMI_ENCI_54000
	.comm	_MESON_VCLK_HDMI_DDR_54000,4,2  ; @MESON_VCLK_HDMI_DDR_54000
	.comm	_MESON_VCLK_HDMI_DDR_148500,4,2 ; @MESON_VCLK_HDMI_DDR_148500
	.comm	_MESON_VCLK_HDMI_148500,4,2     ; @MESON_VCLK_HDMI_148500
l_.str.2:                               ; @.str.2
	.asciz	"Fatal Error, invalid HDMI vclk freq %d\n"

.subsections_via_symbols
