	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ves1820_set_symbolrate
_ves1820_set_symbolrate:                ## @ves1820_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
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movl	(%rax), %eax
	leal	63(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	leal	31(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	leal	15(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	cmpl	%esi, %ebx
	cmovgel	%esi, %ebx
	cmpl	$500001, %ebx                   ## imm = 0x7A121
	movl	$500000, %r13d                  ## imm = 0x7A120
	cmovgel	%ebx, %r13d
	sarl	$4, %edi
	xorl	%esi, %esi
	cmpl	%edi, %r13d
	setl	%sil
	sarl	$5, %edx
	cmpl	%edx, %r13d
	movl	$2, %r12d
	cmovgel	%esi, %r12d
	sarl	$6, %ecx
	cmpl	%ecx, %r13d
	movl	$3, %ecx
	cmovll	%ecx, %r12d
	addl	%eax, %eax
	leal	(%rax,%rax,4), %ebx
	movl	%ebx, %edi
	movl	$123, %esi
	callq	_do_div
	xorl	%r15d, %r15d
	cmpl	%ebx, %r13d
	setl	%r15b
	movl	%ebx, %edi
	movl	$160, %esi
	callq	_do_div
	movl	%ebx, %edi
	movl	$246, %esi
	callq	_do_div
	movl	%ebx, %edi
	movl	$320, %esi                      ## imm = 0x140
	callq	_do_div
	movl	%ebx, %edi
	movl	$492, %esi                      ## imm = 0x1EC
	callq	_do_div
	movl	%ebx, %edi
	movl	$640, %esi                      ## imm = 0x280
	callq	_do_div
	movl	%ebx, %edi
	movl	$984, %esi                      ## imm = 0x3D8
	callq	_do_div
	movq	(%r14), %rax
	movl	(%rax), %esi
	movl	%r12d, %ecx
	shll	%cl, %r13d
	sarl	$4, %esi
	movl	%r13d, %eax
	shll	$4, %eax
	cltd
	idivl	%esi
	movl	%eax, %ebx
	movl	%edx, %eax
	shll	$8, %eax
	cltd
	idivl	%esi
	movl	%edx, %edi
	shll	$4, %r15d
	shll	$8, %ebx
	addl	%eax, %ebx
	shll	$8, %edi
	shll	$8, %ebx
	callq	_DIV_ROUND_CLOSEST
	addl	%eax, %ebx
	movq	(%r14), %rax
	movl	(%rax), %eax
	shll	$5, %eax
	cltd
	idivl	%r13d
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, %ecx
	incl	%ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	incl	%eax
	sarl	%eax
	cmpl	$255, %eax
	movl	$255, %r13d
	cmovll	%eax, %r13d
	movq	_ves1820_inittab@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	orl	56(%rax), %r15d
	shll	$6, %r12d
	orl	12(%rax), %r12d
	movq	%r14, %rdi
	movl	$3, %esi
	movl	%r12d, %edx
	callq	_ves1820_writereg
	movzbl	%bl, %edx
	movq	%r14, %rdi
	movl	$10, %esi
	callq	_ves1820_writereg
	movzbl	%bh, %edx
	movq	%r14, %rdi
	movl	$11, %esi
	callq	_ves1820_writereg
	shrl	$16, %ebx
	andl	$63, %ebx
	movq	%r14, %rdi
	movl	$12, %esi
	movl	%ebx, %edx
	callq	_ves1820_writereg
	movq	%r14, %rdi
	movl	$13, %esi
	movl	%r13d, %edx
	callq	_ves1820_writereg
	movq	%r14, %rdi
	movl	$14, %esi
	movl	%r15d, %edx
	callq	_ves1820_writereg
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ves1820_inittab,8,3            ## @ves1820_inittab
	.no_dead_strip	_ves1820_set_symbolrate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ves1820_set_symbolrate
_ves1820_set_symbolrate:                ; @ves1820_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
	mov	x19, x0
	ldr	x8, [x0]
	ldr	w8, [x8]
	add	w9, w8, #15
	cmp	w8, #0
	csel	w9, w9, w8, lt
	cinc	w10, w8, lt
	asr	w10, w10, #1
	add	w11, w8, #31
	csel	w11, w11, w8, lt
	add	w12, w8, #63
	csel	w12, w12, w8, lt
	cmp	w10, w1
	csel	w10, w10, w1, lt
	mov	w13, #41248
	movk	w13, #7, lsl #16
	cmp	w10, w13
	csel	w23, w10, w13, gt
	add	w8, w8, w8, lsl #2
	lsl	w20, w8, #1
	cmp	w23, w20
	cset	w21, lt
	cmp	w23, w9, asr #4
	cset	w8, lt
	cmp	w23, w11, asr #5
	mov	w9, #2
	csel	w8, w9, w8, lt
	cmp	w23, w12, asr #6
	mov	w9, #3
	csel	w22, w9, w8, lt
	mov	x0, x20
	mov	w1, #123
	bl	_do_div
	mov	x0, x20
	mov	w1, #160
	bl	_do_div
	mov	x0, x20
	mov	w1, #246
	bl	_do_div
	mov	x0, x20
	mov	w1, #320
	bl	_do_div
	mov	x0, x20
	mov	w1, #492
	bl	_do_div
	mov	x0, x20
	mov	w1, #640
	bl	_do_div
	mov	x0, x20
	mov	w1, #984
	bl	_do_div
	ldr	x8, [x19]
	ldr	w8, [x8]
	asr	w1, w8, #4
	lsl	w20, w23, w22
	lsl	w8, w20, #4
	sdiv	w9, w8, w1
	msub	w8, w9, w1, w8
	lsl	w8, w8, #8
	sdiv	w10, w8, w1
	add	w23, w10, w9, lsl #8
	msub	w8, w10, w1, w8
	lsl	w0, w8, #8
	bl	_DIV_ROUND_CLOSEST
	add	w23, w0, w23, lsl #8
	ldr	x8, [x19]
	ldr	w8, [x8]
	lsl	w8, w8, #5
	sdiv	w8, w8, w20
	add	w9, w8, #1
	add	w10, w8, #2
	cmp	w9, #0
	csinc	w8, w10, w8, lt
	asr	w8, w8, #1
	mov	w9, #255
Lloh0:
	adrp	x10, _ves1820_inittab@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ves1820_inittab@GOTPAGEOFF]
	cmp	w8, #255
	csel	w20, w8, w9, lt
Lloh2:
	ldr	x8, [x10]
	ldr	w9, [x8, #56]
	orr	w21, w9, w21, lsl #4
	ldr	w8, [x8, #12]
	orr	w2, w8, w22, lsl #6
	mov	x0, x19
	mov	w1, #3
	bl	_ves1820_writereg
	and	w2, w23, #0xff
	mov	x0, x19
	mov	w1, #10
	bl	_ves1820_writereg
	ubfx	w2, w23, #8, #8
	mov	x0, x19
	mov	w1, #11
	bl	_ves1820_writereg
	ubfx	w2, w23, #16, #6
	mov	x0, x19
	mov	w1, #12
	bl	_ves1820_writereg
	mov	x0, x19
	mov	w1, #13
	mov	x2, x20
	bl	_ves1820_writereg
	mov	x0, x19
	mov	w1, #14
	mov	x2, x21
	bl	_ves1820_writereg
	mov	w0, #0
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_ves1820_inittab,8,3            ; @ves1820_inittab
	.no_dead_strip	_ves1820_set_symbolrate
.subsections_via_symbols
