	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stb0899_diseqc_init
_stb0899_diseqc_init:                   ## @stb0899_diseqc_init
	.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
	movq	_STB0899_DISCNTRL2@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_stb0899_read_reg
	movl	%eax, %r14d
	movq	_ONECHIP_TRX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_STB0899_SETFIELD_VAL
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_stb0899_write_reg
	movq	_STB0899_DISCNTRL1@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %r14d
	movq	_DISEQCRESET@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_STB0899_SETFIELD_VAL
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_stb0899_write_reg
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_stb0899_read_reg
	movl	%eax, %r14d
	movl	(%r12), %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_STB0899_SETFIELD_VAL
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_stb0899_write_reg
	movq	%rbx, %rdi
	callq	_stb0899_get_mclk
	cltq
	imulq	$1599289641, %rax, %rdx         ## imm = 0x5F533929
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$50, %rdx
	addl	%eax, %edx
	movq	_STB0899_DISF22@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_stb0899_write_reg
	movl	$20000, (%rbx)                  ## imm = 0x4E20
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STB0899_DISCNTRL2,4,2          ## @STB0899_DISCNTRL2
	.comm	_ONECHIP_TRX,4,2                ## @ONECHIP_TRX
	.comm	_STB0899_DISCNTRL1,4,2          ## @STB0899_DISCNTRL1
	.comm	_DISEQCRESET,4,2                ## @DISEQCRESET
	.comm	_STB0899_DISF22,4,2             ## @STB0899_DISF22
	.no_dead_strip	_stb0899_diseqc_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stb0899_diseqc_init
_stb0899_diseqc_init:                   ; @stb0899_diseqc_init
	.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
Lloh0:
	adrp	x21, _STB0899_DISCNTRL2@GOTPAGE
Lloh1:
	ldr	x21, [x21, _STB0899_DISCNTRL2@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_stb0899_read_reg
	mov	x20, x0
Lloh2:
	adrp	x8, _ONECHIP_TRX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ONECHIP_TRX@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, x20
	mov	w2, #0
	bl	_STB0899_SETFIELD_VAL
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_stb0899_write_reg
Lloh5:
	adrp	x21, _STB0899_DISCNTRL1@GOTPAGE
Lloh6:
	ldr	x21, [x21, _STB0899_DISCNTRL1@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_stb0899_read_reg
	mov	x20, x0
Lloh7:
	adrp	x22, _DISEQCRESET@GOTPAGE
Lloh8:
	ldr	x22, [x22, _DISEQCRESET@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x20
	mov	w2, #1
	bl	_STB0899_SETFIELD_VAL
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_stb0899_write_reg
	ldr	w1, [x21]
	mov	x0, x19
	bl	_stb0899_read_reg
	mov	x20, x0
	ldr	w0, [x22]
	mov	x1, x20
	mov	w2, #0
	bl	_STB0899_SETFIELD_VAL
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_stb0899_write_reg
	mov	x0, x19
	bl	_stb0899_get_mclk
	mov	w8, #14633
	movk	w8, #24403, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x8, x8, #50
	add	w2, w8, w9
Lloh9:
	adrp	x8, _STB0899_DISF22@GOTPAGE
Lloh10:
	ldr	x8, [x8, _STB0899_DISF22@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_stb0899_write_reg
	mov	w8, #20000
	str	w8, [x19]
	mov	w0, #0
	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
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_STB0899_DISCNTRL2,4,2          ; @STB0899_DISCNTRL2
	.comm	_ONECHIP_TRX,4,2                ; @ONECHIP_TRX
	.comm	_STB0899_DISCNTRL1,4,2          ; @STB0899_DISCNTRL1
	.comm	_DISEQCRESET,4,2                ; @DISEQCRESET
	.comm	_STB0899_DISF22,4,2             ; @STB0899_DISF22
	.no_dead_strip	_stb0899_diseqc_init
.subsections_via_symbols
