	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv090x_get_tmgoffst
_stv090x_get_tmgoffst:                  ## @stv090x_get_tmgoffst
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_TMGREG2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_STV090x_READ_DEMOD
	movl	%eax, %ebx
	shll	$16, %ebx
	movq	_TMGREG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_STV090x_READ_DEMOD
	shll	$8, %eax
	orl	%eax, %ebx
	movq	_TMGREG0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_STV090x_READ_DEMOD
	orl	%eax, %ebx
	movl	%ebx, %edi
	movl	$24, %esi
	callq	_comp2
	testl	%eax, %eax
	movl	$1, %esi
	cmovnel	%eax, %esi
	addl	%r14d, %r14d
	leal	(%r14,%r14,4), %ecx
	movl	$16777216, %eax                 ## imm = 0x1000000
	xorl	%edx, %edx
	idivl	%esi
	movl	%eax, %esi
	movl	%ecx, %eax
	cltd
	idivl	%esi
	cltq
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$39, %rax
	addl	%ecx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TMGREG2,4,2                    ## @TMGREG2
	.comm	_TMGREG1,4,2                    ## @TMGREG1
	.comm	_TMGREG0,4,2                    ## @TMGREG0
	.no_dead_strip	_stv090x_get_tmgoffst
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv090x_get_tmgoffst
_stv090x_get_tmgoffst:                  ; @stv090x_get_tmgoffst
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _TMGREG2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TMGREG2@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_STV090x_READ_DEMOD
	mov	x21, x0
Lloh3:
	adrp	x8, _TMGREG1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TMGREG1@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_STV090x_READ_DEMOD
	lsl	w8, w0, #8
	orr	w21, w8, w21, lsl #16
Lloh6:
	adrp	x8, _TMGREG0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TMGREG0@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_STV090x_READ_DEMOD
	orr	w0, w21, w0
	mov	w1, #24
	bl	_comp2
	cmp	w0, #0
	csinc	w8, w0, wzr, ne
	add	w9, w19, w19, lsl #2
	lsl	w9, w9, #1
	mov	w10, #16777216
	sdiv	w8, w10, w8
	sdiv	w8, w9, w8
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #39
	add	w0, w8, w9
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TMGREG2,4,2                    ; @TMGREG2
	.comm	_TMGREG1,4,2                    ; @TMGREG1
	.comm	_TMGREG0,4,2                    ; @TMGREG0
	.no_dead_strip	_stv090x_get_tmgoffst
.subsections_via_symbols
