	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stb0899_dvbs2_set_srate
_stb0899_dvbs2_set_srate:               ## @stb0899_dvbs2_set_srate
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movl	4(%rdi), %ecx
	addl	%eax, %eax
	leal	(%rcx,%rcx,4), %ecx
	cltd
	idivl	%ecx
	testl	%eax, %eax
	movl	$1, %edi
	cmovnel	%eax, %edi
	callq	_Log2Int
	movl	%eax, %r8d
	leal	(,%r8,8), %esi
	andl	$24, %esi
	xorl	%r15d, %r15d
	cmpl	$5, %eax
	cmovll	%r15d, %esi
	movl	(%rbx), %eax
	movl	4(%rbx), %edx
	movl	%r8d, %ecx
	shll	%cl, %edx
	movslq	%edx, %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	cltd
	idivl	%ecx
	movl	%eax, %r14d
	xorl	%eax, %eax
	cmpl	$2251, %r14d                    ## imm = 0x8CB
	setl	%al
	shll	$5, %eax
	andl	$7, %r8d
	orl	%esi, %r8d
	orl	%eax, %r8d
	movq	_STB0899_S2DEMOD@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_STB0899_BASE_DECIM_CNTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_STB0899_OFF0_DECIM_CNTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_stb0899_write_s2reg
	xorl	%eax, %eax
	cmpl	$4251, %r14d                    ## imm = 0x109B
	setl	%al
	movl	$2, %r8d
	subl	%eax, %r8d
	cmpl	$3451, %r14d                    ## imm = 0xD7B
	cmovll	%r15d, %r8d
	movl	(%r12), %esi
	movq	_STB0899_BASE_ANTI_ALIAS_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_STB0899_OFF0_ANTI_ALIAS_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_stb0899_write_s2reg
	movq	%rbx, %rdi
	callq	_stb0899_dvbs2_calc_srate
	movl	(%r12), %esi
	movq	_STB0899_BASE_BTR_NOM_FREQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_STB0899_OFF0_BTR_NOM_FREQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rbx, %rdi
	movl	%eax, %r8d
	callq	_stb0899_write_s2reg
	movq	%rbx, %rdi
	callq	_stb0899_dvbs2_calc_dev
	movl	%eax, %r14d
	movl	(%r12), %edi
	movq	_BTR_CNTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_STB0899_READ_S2REG
	movl	%eax, %r15d
	movq	_BTR_FREQ_CORR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_STB0899_SETFIELD_VAL
	movl	(%r12), %esi
	movq	_STB0899_BASE_BTR_CNTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_STB0899_OFF0_BTR_CNTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%r15d, %r8d
	callq	_stb0899_write_s2reg
	movl	(%rbx), %ecx
	movl	4(%rbx), %eax
	leal	4095(%rcx), %esi
	testl	%ecx, %ecx
	cmovnsl	%ecx, %esi
	sarl	$12, %esi
	cltd
	idivl	%esi
	movl	(%r12), %esi
	movq	_STB0899_BASE_FREQ_ADJ_SCALE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_STB0899_OFF0_FREQ_ADJ_SCALE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rbx, %rdi
	movl	%eax, %r8d
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_stb0899_write_s2reg            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_STB0899_S2DEMOD,4,2            ## @STB0899_S2DEMOD
	.comm	_STB0899_BASE_DECIM_CNTRL,4,2   ## @STB0899_BASE_DECIM_CNTRL
	.comm	_STB0899_OFF0_DECIM_CNTRL,4,2   ## @STB0899_OFF0_DECIM_CNTRL
	.comm	_STB0899_BASE_ANTI_ALIAS_SEL,4,2 ## @STB0899_BASE_ANTI_ALIAS_SEL
	.comm	_STB0899_OFF0_ANTI_ALIAS_SEL,4,2 ## @STB0899_OFF0_ANTI_ALIAS_SEL
	.comm	_STB0899_BASE_BTR_NOM_FREQ,4,2  ## @STB0899_BASE_BTR_NOM_FREQ
	.comm	_STB0899_OFF0_BTR_NOM_FREQ,4,2  ## @STB0899_OFF0_BTR_NOM_FREQ
	.comm	_BTR_CNTRL,4,2                  ## @BTR_CNTRL
	.comm	_BTR_FREQ_CORR,4,2              ## @BTR_FREQ_CORR
	.comm	_STB0899_BASE_BTR_CNTRL,4,2     ## @STB0899_BASE_BTR_CNTRL
	.comm	_STB0899_OFF0_BTR_CNTRL,4,2     ## @STB0899_OFF0_BTR_CNTRL
	.comm	_STB0899_BASE_FREQ_ADJ_SCALE,4,2 ## @STB0899_BASE_FREQ_ADJ_SCALE
	.comm	_STB0899_OFF0_FREQ_ADJ_SCALE,4,2 ## @STB0899_OFF0_FREQ_ADJ_SCALE
	.no_dead_strip	_stb0899_dvbs2_set_srate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stb0899_dvbs2_set_srate
_stb0899_dvbs2_set_srate:               ; @stb0899_dvbs2_set_srate
	.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
	ldp	w8, w9, [x0]
	lsl	w8, w8, #1
	add	w9, w9, w9, lsl #2
	sdiv	w8, w8, w9
	cmp	w8, #0
	csinc	w0, w8, wzr, ne
	bl	_Log2Int
	ubfiz	w8, w0, #3, #2
	cmp	w0, #4
	csel	w4, w8, wzr, gt
	ldp	w8, w9, [x19]
	lsl	w9, w9, w0
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	sdiv	w20, w8, w9
	cmp	w20, #2251
	cset	w8, lt
	bfxil	w4, w0, #0, #3
	bfi	w4, w8, #5, #1
Lloh0:
	adrp	x22, _STB0899_S2DEMOD@GOTPAGE
Lloh1:
	ldr	x22, [x22, _STB0899_S2DEMOD@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x8, _STB0899_BASE_DECIM_CNTRL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _STB0899_BASE_DECIM_CNTRL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
Lloh5:
	adrp	x8, _STB0899_OFF0_DECIM_CNTRL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _STB0899_OFF0_DECIM_CNTRL@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_stb0899_write_s2reg
	mov	w8, #4251
	cmp	w20, w8
	mov	w8, #1
	cinc	w8, w8, ge
	cmp	w20, #3451
	csel	w4, wzr, w8, lt
	ldr	w1, [x22]
Lloh8:
	adrp	x8, _STB0899_BASE_ANTI_ALIAS_SEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _STB0899_BASE_ANTI_ALIAS_SEL@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x8, _STB0899_OFF0_ANTI_ALIAS_SEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STB0899_OFF0_ANTI_ALIAS_SEL@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_stb0899_write_s2reg
	mov	x0, x19
	bl	_stb0899_dvbs2_calc_srate
	mov	x4, x0
	ldr	w1, [x22]
Lloh14:
	adrp	x8, _STB0899_BASE_BTR_NOM_FREQ@GOTPAGE
Lloh15:
	ldr	x8, [x8, _STB0899_BASE_BTR_NOM_FREQ@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
Lloh17:
	adrp	x8, _STB0899_OFF0_BTR_NOM_FREQ@GOTPAGE
Lloh18:
	ldr	x8, [x8, _STB0899_OFF0_BTR_NOM_FREQ@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_stb0899_write_s2reg
	mov	x0, x19
	bl	_stb0899_dvbs2_calc_dev
	mov	x20, x0
	ldr	w0, [x22]
Lloh20:
	adrp	x8, _BTR_CNTRL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BTR_CNTRL@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bl	_STB0899_READ_S2REG
	mov	x21, x0
Lloh23:
	adrp	x8, _BTR_FREQ_CORR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BTR_FREQ_CORR@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	mov	x1, x21
	mov	x2, x20
	bl	_STB0899_SETFIELD_VAL
	ldr	w1, [x22]
Lloh26:
	adrp	x8, _STB0899_BASE_BTR_CNTRL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _STB0899_BASE_BTR_CNTRL@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
Lloh29:
	adrp	x8, _STB0899_OFF0_BTR_CNTRL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _STB0899_OFF0_BTR_CNTRL@GOTPAGEOFF]
Lloh31:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x4, x21
	bl	_stb0899_write_s2reg
	ldp	w9, w8, [x19]
	add	w10, w9, #4095
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w9, w9, #12
	sdiv	w4, w8, w9
	ldr	w1, [x22]
Lloh32:
	adrp	x8, _STB0899_BASE_FREQ_ADJ_SCALE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _STB0899_BASE_FREQ_ADJ_SCALE@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
Lloh35:
	adrp	x8, _STB0899_OFF0_FREQ_ADJ_SCALE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _STB0899_OFF0_FREQ_ADJ_SCALE@GOTPAGEOFF]
Lloh37:
	ldr	w3, [x8]
	mov	x0, x19
	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	_stb0899_write_s2reg
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_STB0899_S2DEMOD,4,2            ; @STB0899_S2DEMOD
	.comm	_STB0899_BASE_DECIM_CNTRL,4,2   ; @STB0899_BASE_DECIM_CNTRL
	.comm	_STB0899_OFF0_DECIM_CNTRL,4,2   ; @STB0899_OFF0_DECIM_CNTRL
	.comm	_STB0899_BASE_ANTI_ALIAS_SEL,4,2 ; @STB0899_BASE_ANTI_ALIAS_SEL
	.comm	_STB0899_OFF0_ANTI_ALIAS_SEL,4,2 ; @STB0899_OFF0_ANTI_ALIAS_SEL
	.comm	_STB0899_BASE_BTR_NOM_FREQ,4,2  ; @STB0899_BASE_BTR_NOM_FREQ
	.comm	_STB0899_OFF0_BTR_NOM_FREQ,4,2  ; @STB0899_OFF0_BTR_NOM_FREQ
	.comm	_BTR_CNTRL,4,2                  ; @BTR_CNTRL
	.comm	_BTR_FREQ_CORR,4,2              ; @BTR_FREQ_CORR
	.comm	_STB0899_BASE_BTR_CNTRL,4,2     ; @STB0899_BASE_BTR_CNTRL
	.comm	_STB0899_OFF0_BTR_CNTRL,4,2     ; @STB0899_OFF0_BTR_CNTRL
	.comm	_STB0899_BASE_FREQ_ADJ_SCALE,4,2 ; @STB0899_BASE_FREQ_ADJ_SCALE
	.comm	_STB0899_OFF0_FREQ_ADJ_SCALE,4,2 ; @STB0899_OFF0_FREQ_ADJ_SCALE
	.no_dead_strip	_stb0899_dvbs2_set_srate
.subsections_via_symbols
