	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx24123_set_symbolrate
_cx24123_set_symbolrate:                ## @cx24123_set_symbolrate
	.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
	cmpl	%esi, (%rdi)
	jl	LBB0_2
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %r13
	cmpl	%esi, 4(%rdi)
	jle	LBB0_3
LBB0_2:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_3:
	movq	_XTAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$2, %ebx
	cmpl	%r14d, %r15d
	jg	LBB0_10
## %bb.4:
	leal	(%r15,%r15,2), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	$3, %ebx
	cmpl	%r14d, %ecx
	jg	LBB0_10
## %bb.5:
	leal	(%r15,%r15), %ecx
	movl	$4, %ebx
	cmpl	%r14d, %ecx
	jg	LBB0_10
## %bb.6:
	leal	(%r15,%r15,4), %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	movl	$5, %ebx
	cmpl	%r14d, %edx
	jg	LBB0_10
## %bb.7:
	movl	$6, %ebx
	cmpl	%r14d, %eax
	jg	LBB0_10
## %bb.8:
	leal	(,%r15,8), %eax
	subl	%r15d, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	$7, %ebx
	cmpl	%r14d, %ecx
	jg	LBB0_10
## %bb.9:
	leal	(,%r15,4), %eax
	xorl	%ebx, %ebx
	cmpl	%r14d, %eax
	setg	%bl
	xorl	$9, %ebx
LBB0_10:
	imull	%ebx, %r15d
	movl	%r14d, %r12d
	shll	$23, %r12d
	movl	%r12d, %edi
	movl	%r15d, %esi
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	callq	_do_div
	addl	%ebx, %ebx
	leal	(%rbx,%rbx,2), %edx
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_cx24123_writereg
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movl	$8, %esi
	xorl	%edx, %edx
	callq	_cx24123_writereg
	movq	%r13, %rdi
	movl	$9, %esi
	xorl	%edx, %edx
	callq	_cx24123_writereg
	movq	%r13, %rdi
	movl	$10, %esi
	xorl	%edx, %edx
	callq	_cx24123_writereg
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_cx24123_int_log2
	movl	%eax, %r15d
	movq	%r13, %rdi
	movl	$12, %esi
	callq	_cx24123_readreg
	andl	$-225, %eax
	movl	%r15d, %edx
	shll	$5, %edx
	orl	%eax, %edx
	movq	%r13, %rdi
	movl	$12, %esi
	callq	_cx24123_writereg
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%r12d, %edx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%r15d, %r8d
	callq	_dprintk
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_XTAL,4,2                       ## @XTAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"srate=%d, ratio=0x%08x, sample_rate=%i sample_gain=%d\n"

	.no_dead_strip	_cx24123_set_symbolrate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx24123_set_symbolrate
_cx24123_set_symbolrate:                ; @cx24123_set_symbolrate
	.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
	ldr	w8, [x0]
	cmp	w8, w1
	b.lt	LBB0_2
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x0, #4]
	cmp	w8, w1
	b.le	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_3:
Lloh3:
	adrp	x8, _XTAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XTAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w19
	b.le	LBB0_5
; %bb.4:
	mov	w23, #2
	b	LBB0_10
LBB0_5:
	add	w9, w8, w8, lsl #1
	cmp	w9, #0
	cinc	w10, w9, lt
	cmp	w19, w10, asr #1
	b.ge	LBB0_7
; %bb.6:
	mov	w23, #3
	b	LBB0_10
LBB0_7:
	cmp	w19, w8, lsl #1
	b.ge	LBB0_9
; %bb.8:
	mov	w23, #4
	b	LBB0_10
LBB0_9:
	add	w10, w8, w8, lsl #2
	cmp	w10, #0
	cinc	w10, w10, lt
	mov	w11, #5
	mov	w12, #6
	lsl	w13, w8, #3
	sub	w13, w13, w8
	cmp	w13, #0
	cinc	w13, w13, lt
	mov	w14, #7
	cmp	w19, w8, lsl #2
	mov	w15, #8
	cinc	w15, w15, ge
	cmp	w19, w13, asr #1
	csel	w13, w14, w15, lt
	cmp	w9, w19
	csel	w9, w12, w13, gt
	cmp	w19, w10, asr #1
	csel	w23, w11, w9, lt
LBB0_10:
	mul	w21, w23, w8
	lsl	w22, w19, #23
	mov	x0, x22
	mov	x1, x21
	bl	_do_div
	add	w8, w23, w23, lsl #1
	lsl	w2, w8, #1
	mov	x0, x20
	mov	w1, #1
	bl	_cx24123_writereg
	mov	x0, x20
	mov	w1, #8
	mov	w2, #0
	bl	_cx24123_writereg
	mov	x0, x20
	mov	w1, #9
	mov	w2, #0
	bl	_cx24123_writereg
	mov	x0, x20
	mov	w1, #10
	mov	w2, #0
	bl	_cx24123_writereg
	mov	x0, x21
	mov	x1, x19
	bl	_cx24123_int_log2
	mov	x23, x0
	mov	x0, x20
	mov	w1, #12
	bl	_cx24123_readreg
	and	w8, w0, #0xffffff1f
	orr	w2, w8, w23, lsl #5
	mov	x0, x20
	mov	w1, #12
	bl	_cx24123_writereg
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x22
	mov	x3, x21
	mov	x4, x23
	bl	_dprintk
	mov	w0, #0
LBB0_11:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_XTAL,4,2                       ; @XTAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"srate=%d, ratio=0x%08x, sample_rate=%i sample_gain=%d\n"

	.no_dead_strip	_cx24123_set_symbolrate
.subsections_via_symbols
