	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv0299_get_frontend
_stv0299_get_frontend:                  ## @stv0299_get_frontend
	.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
	movq	%rsi, %r14
	movq	(%rdi), %r15
	movq	%r15, %rdi
	movl	$34, %esi
	callq	_stv0299_readreg
	movl	%eax, %ebx
	shll	$8, %ebx
	movq	%r15, %rdi
	movl	$35, %esi
	callq	_stv0299_readreg
	orl	%ebx, %eax
	movq	(%r15), %rcx
	movswl	2(%rcx), %ecx
	imull	%eax, %ecx
	addl	$500, %ecx                      ## imm = 0x1F4
	movslq	%ecx, %rax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	addl	%eax, (%r14)
	movq	%r15, %rdi
	movl	$12, %esi
	callq	_stv0299_readreg
	movq	(%r15), %rcx
	cmpq	$0, 8(%rcx)
	sete	%cl
	xorb	%cl, %al
	testb	$1, %al
	je	LBB0_1
## %bb.2:
	movq	_INVERSION_OFF@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_INVERSION_ON@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movq	%r15, %rdi
	callq	_stv0299_get_fec
	movl	%eax, 8(%r14)
	movq	%r15, %rdi
	callq	_stv0299_get_symbolrate
	movl	%eax, 4(%r14)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INVERSION_ON,4,2               ## @INVERSION_ON
	.comm	_INVERSION_OFF,4,2              ## @INVERSION_OFF
	.no_dead_strip	_stv0299_get_frontend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv0299_get_frontend
_stv0299_get_frontend:                  ; @stv0299_get_frontend
	.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, x1
	ldr	x20, [x0]
	mov	x0, x20
	mov	w1, #34
	bl	_stv0299_readreg
	mov	x21, x0
	mov	x0, x20
	mov	w1, #35
	bl	_stv0299_readreg
	orr	w8, w0, w21, lsl #8
	ldr	x9, [x20]
	ldrsh	w9, [x9, #2]
	mul	w8, w9, w8
	add	w8, w8, #500
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	ldr	w10, [x19]
	add	w8, w8, w9
	add	w8, w8, w10
	str	w8, [x19]
	mov	x0, x20
	mov	w1, #12
	bl	_stv0299_readreg
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	cmp	x8, #0
	cset	w8, eq
	eor	w8, w0, w8
Lloh0:
	adrp	x9, _INVERSION_ON@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INVERSION_ON@GOTPAGEOFF]
Lloh2:
	adrp	x10, _INVERSION_OFF@GOTPAGE
Lloh3:
	ldr	x10, [x10, _INVERSION_OFF@GOTPAGEOFF]
	tst	w8, #0x1
	csel	x8, x10, x9, ne
	ldr	w8, [x8]
	str	w8, [x19, #12]
	mov	x0, x20
	bl	_stv0299_get_fec
	str	w0, [x19, #8]
	mov	x0, x20
	bl	_stv0299_get_symbolrate
	str	w0, [x19, #4]
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_INVERSION_ON,4,2               ; @INVERSION_ON
	.comm	_INVERSION_OFF,4,2              ; @INVERSION_OFF
	.no_dead_strip	_stv0299_get_frontend
.subsections_via_symbols
