	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function armada510_crtc_compute_clock
_armada510_crtc_compute_clock:          ## @armada510_crtc_compute_clock
	.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	%rdx, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %r13
	movq	(%rsi), %r12
	movl	4(%r13), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	_armada510_clocking@GOTPCREL(%rip), %rdx
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	movl	%ebx, %ecx
	movl	%eax, %r8d
	movq	%r12, %r9
	callq	_armada_crtc_select_clock
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	-52(%rbp), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:
	movl	-52(%rbp), %edi
	movl	-48(%rbp), %esi
	callq	_clk_set_rate
	movq	_armada510_clk_sels@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	movl	(%rax,%rcx,4), %eax
	orl	-56(%rbp), %eax
	movl	%eax, (%r14)
	movl	-52(%rbp), %esi
	movl	%esi, (%r13)
	movl	(%r15), %edi
	callq	_swap
LBB0_5:
	movl	-52(%rbp), %edi
	callq	_clk_disable_unprepare
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movl	%ebx, %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_armada510_clocking,4,2         ## @armada510_clocking
	.comm	_armada510_clk_sels,8,3         ## @armada510_clk_sels
	.no_dead_strip	_armada510_crtc_compute_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function armada510_crtc_compute_clock
_armada510_crtc_compute_clock:          ; @armada510_crtc_compute_clock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x20, x0
	ldr	x23, [x0, #8]
	ldr	x21, [x1]
	ldr	w22, [x23, #4]
	mov	x0, x22
	bl	_ARRAY_SIZE
	mov	x4, x0
Lloh0:
	adrp	x2, _armada510_clocking@GOTPAGE
Lloh1:
	ldr	x2, [x2, _armada510_clocking@GOTPAGEOFF]
	mov	x1, sp
	mov	x0, x20
	mov	x3, x22
	mov	x5, x21
	bl	_armada_crtc_select_clock
	mov	x21, x0
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w0, [sp, #4]
	bl	_clk_prepare_enable
	cbnz	w0, LBB0_6
; %bb.2:
	cbz	x19, LBB0_4
; %bb.3:
	ldp	w0, w1, [sp, #4]
	bl	_clk_set_rate
Lloh2:
	adrp	x8, _armada510_clk_sels@GOTPAGE
Lloh3:
	ldr	x8, [x8, _armada510_clk_sels@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	w8, [x8, w21, uxtw #2]
	ldp	w9, w1, [sp]
	orr	w8, w8, w9
	str	w8, [x19]
	str	w1, [x23]
	ldr	w0, [x20]
	bl	_swap
LBB0_4:
	ldr	w0, [sp, #4]
	bl	_clk_disable_unprepare
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	mov	x0, x21
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_armada510_clocking,4,2         ; @armada510_clocking
	.comm	_armada510_clk_sels,8,3         ; @armada510_clk_sels
	.no_dead_strip	_armada510_crtc_compute_clock
.subsections_via_symbols
