	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv0297_set_sweeprate
_stv0297_set_sweeprate:                 ## @stv0297_set_sweeprate
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rcx
	movq	%rdi, %r14
	movslq	%esi, %rax
	shlq	$18, %rax
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_1
## %bb.2:
	cqto
	idivq	%rcx
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_3:
	movq	%rax, %rcx
	shlq	$10, %rcx
	leaq	500000(%rcx), %rdx
	addq	$-500000, %rcx                  ## imm = 0xFFF85EE0
	testq	%rax, %rax
	cmovnsq	%rdx, %rcx
	movabsq	$4835703278458516699, %rdx      ## imm = 0x431BDE82D7B634DB
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rbx
	shrq	$63, %rbx
	sarq	$18, %rdx
	addq	%rdx, %rbx
	movzbl	%bl, %edx
	movq	%r14, %rdi
	movl	$96, %esi
	callq	_stv0297_writereg
	shrq	$4, %rbx
	andl	$240, %ebx
	movq	%r14, %rdi
	movl	$105, %esi
	movl	$240, %edx
	movq	%rbx, %rcx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_stv0297_writereg_mask          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_stv0297_set_sweeprate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv0297_set_sweeprate
_stv0297_set_sweeprate:                 ; @stv0297_set_sweeprate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x19, x0
	sbfiz	x8, x1, #18, #32
	sdiv	x8, x8, x2
	cmp	x8, #0
	mov	x9, #-41248
	movk	x9, #65528, lsl #16
	cneg	x9, x9, ge
	add	x8, x9, x8, lsl #10
	mov	x9, #13531
	movk	x9, #55222, lsl #16
	movk	x9, #56962, lsl #32
	movk	x9, #17179, lsl #48
	smulh	x8, x8, x9
	asr	x9, x8, #18
	add	x20, x9, x8, lsr #63
	and	x2, x20, #0xff
	mov	w1, #96
	bl	_stv0297_writereg
	lsr	x8, x20, #4
	and	x3, x8, #0xf0
	mov	x0, x19
	mov	w1, #105
	mov	w2, #240
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_stv0297_writereg_mask
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_stv0297_set_sweeprate
.subsections_via_symbols
