	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv0900_set_max_symbol_rate
_stv0900_set_max_symbol_rate:           ## @stv0900_set_max_symbol_rate
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movslq	%edx, %rax
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	imull	$105, %eax, %eax
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	cmpl	$6000001, %eax                  ## imm = 0x5B8D81
	setl	%cl
	setge	%dl
	cmpl	$60000001, %eax                 ## imm = 0x3938701
	leal	6(%rcx,%rcx,2), %ebx
	movl	$4, %ecx
	cmovll	%ebx, %ecx
	leal	7(%rdx,%rdx,2), %ebx
	movl	$12, %edx
	cmovll	%ebx, %edx
	movq	%rdi, %r14
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movl	%edx, %ecx
	sarl	%cl, %esi
	cltd
	idivl	%esi
	movq	_SFRUP1@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	cmpl	$32766, %eax                    ## imm = 0x7FFE
	jg	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	%eax, %edx
	shrl	$8, %edx
	andl	$127, %edx
	movq	%r14, %rdi
	callq	_stv0900_write_reg
	movq	(%r15), %rsi
	incq	%rsi
	movzbl	%bl, %edx
	movq	%r14, %rdi
	jmp	LBB0_3
LBB0_2:
	movq	%r14, %rdi
	movl	$127, %edx
	callq	_stv0900_write_reg
	movq	(%r15), %rsi
	incq	%rsi
	movq	%r14, %rdi
	movl	$255, %edx
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_stv0900_write_reg              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SFRUP1,8,3                     ## @SFRUP1
	.no_dead_strip	_stv0900_set_max_symbol_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv0900_set_max_symbol_rate
_stv0900_set_max_symbol_rate:           ; @stv0900_set_max_symbol_rate
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	mov	w8, #34079
	movk	w8, #20971, lsl #16
	smull	x8, w2, w8
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
	mov	w9, #105
	mul	w8, w8, w9
	mov	w9, #36224
	movk	w9, #91, lsl #16
	mov	w10, #9
	mov	w11, #6
	cmp	w8, w9
	csel	w9, w11, w10, gt
	mov	w10, #7
	mov	w11, #10
	csel	w10, w11, w10, gt
	mov	w11, #34560
	movk	w11, #915, lsl #16
	mov	w12, #4
	cmp	w8, w11
	csel	w9, w12, w9, gt
	mov	w11, #12
	csel	w10, w11, w10, gt
	lsl	w8, w8, w9
	asr	w9, w1, w10
	sdiv	w21, w8, w9
Lloh0:
	adrp	x20, _SFRUP1@GOTPAGE
Lloh1:
	ldr	x20, [x20, _SFRUP1@GOTPAGEOFF]
	ldr	x1, [x20]
	mov	w8, #32766
	cmp	w21, w8
	b.gt	LBB0_2
; %bb.1:
	ubfx	w2, w21, #8, #7
	mov	x0, x19
	bl	_stv0900_write_reg
	ldr	x8, [x20]
	add	x1, x8, #1
	and	w2, w21, #0xff
	mov	x0, x19
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	mov	w2, #127
	bl	_stv0900_write_reg
	ldr	x8, [x20]
	add	x1, x8, #1
	mov	x0, x19
	mov	w2, #255
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_stv0900_write_reg
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SFRUP1,8,3                     ; @SFRUP1
	.no_dead_strip	_stv0900_set_max_symbol_rate
.subsections_via_symbols
