	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sm501_find_clock               ## -- Begin function sm501_find_clock
	.p2align	4, 0x90
_sm501_find_clock:                      ## @sm501_find_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	callq	_dev_get_drvdata
	leal	-130(%rbx), %ecx
	cmpl	$2, %ecx
	jb	LBB0_10
## %bb.1:
	cmpl	$128, %ebx
	je	LBB0_9
## %bb.2:
	cmpl	$129, %ebx
	jne	LBB0_3
## %bb.4:
	cmpl	$192, (%rax)
	jl	LBB0_6
## %bb.5:
	addl	%r14d, %r14d
	leaq	-24(%rbp), %rsi
	movl	%r14d, %edi
	movl	$5, %edx
	callq	_sm501_calc_pll
	jmp	LBB0_8
LBB0_10:
	leaq	-24(%rbp), %rsi
	movq	%r14, %rdi
	movl	$3, %edx
	callq	_sm501_select_clock
	cltq
	jmp	LBB0_11
LBB0_9:
	addq	%r14, %r14
	leaq	-24(%rbp), %rsi
	movq	%r14, %rdi
	movl	$3, %edx
	jmp	LBB0_7
LBB0_3:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_6:
	addq	%r14, %r14
	leaq	-24(%rbp), %rsi
	movq	%r14, %rdi
	movl	$5, %edx
LBB0_7:
	callq	_sm501_select_clock
LBB0_8:
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movslq	%ecx, %rax
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sm501_find_clock               ; -- Begin function sm501_find_clock
	.p2align	2
_sm501_find_clock:                      ; @sm501_find_clock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x2
	mov	x20, x1
	bl	_dev_get_drvdata
	sub	w8, w20, #130
	cmp	w8, #2
	b.lo	LBB0_5
; %bb.1:
	cmp	w20, #128
	b.eq	LBB0_6
; %bb.2:
	cmp	w20, #129
	b.ne	LBB0_7
; %bb.3:
	ldr	w8, [x0]
	cmp	w8, #192
	b.lt	LBB0_8
; %bb.4:
	lsl	w0, w19, #1
	add	x1, sp, #8
	mov	w2, #5
	bl	_sm501_calc_pll
	b	LBB0_10
LBB0_5:
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #3
	bl	_sm501_select_clock
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x0, w0
	b	LBB0_11
LBB0_6:
	lsl	x0, x19, #1
	add	x1, sp, #8
	mov	w2, #3
	b	LBB0_9
LBB0_7:
	mov	x0, #0
	b	LBB0_11
LBB0_8:
	lsl	x0, x19, #1
	add	x1, sp, #8
	mov	w2, #5
LBB0_9:
	bl	_sm501_select_clock
LBB0_10:
	cmp	w0, #0
	cinc	w8, w0, lt
	sbfx	x0, x8, #1, #31
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
