	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5h1420_getfreqoffset
_s5h1420_getfreqoffset:                 ## @s5h1420_getfreqoffset
	.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	%rdi, %r14
	movl	$6, %esi
	callq	_s5h1420_readreg
	orl	$8, %eax
	movq	%r14, %rdi
	movl	$6, %esi
	movl	%eax, %edx
	callq	_s5h1420_writereg
	movq	%r14, %rdi
	movl	$14, %esi
	callq	_s5h1420_readreg
	movl	%eax, %r15d
	shll	$16, %r15d
	movq	%r14, %rdi
	movl	$15, %esi
	callq	_s5h1420_readreg
	movl	%eax, %ebx
	shll	$8, %ebx
	orl	%r15d, %ebx
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_s5h1420_readreg
	movl	%eax, %r15d
	orl	%ebx, %r15d
	movq	%r14, %rdi
	movl	$6, %esi
	callq	_s5h1420_readreg
	andl	$247, %eax
	movq	%r14, %rdi
	movl	$6, %esi
	movl	%eax, %edx
	callq	_s5h1420_writereg
	movl	%r15d, %eax
	orl	$-16777216, %eax                ## imm = 0xFF000000
	testl	$8388608, %r15d                 ## imm = 0x800000
	cmovel	%r15d, %eax
	movslq	(%r14), %rcx
	imulq	$-1125899907, %rcx, %rcx        ## imm = 0xBCE4217D
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$50, %rcx
	addl	%edx, %ecx
	imull	%eax, %ecx
	leal	16777215(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$24, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_s5h1420_getfreqoffset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5h1420_getfreqoffset
_s5h1420_getfreqoffset:                 ; @s5h1420_getfreqoffset
	.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
	mov	x19, x0
	mov	w1, #6
	bl	_s5h1420_readreg
	orr	w2, w0, #0x8
	mov	x0, x19
	mov	w1, #6
	bl	_s5h1420_writereg
	mov	x0, x19
	mov	w1, #14
	bl	_s5h1420_readreg
	mov	x20, x0
	mov	x0, x19
	mov	w1, #15
	bl	_s5h1420_readreg
	lsl	w8, w0, #8
	orr	w20, w8, w20, lsl #16
	mov	x0, x19
	mov	w1, #16
	bl	_s5h1420_readreg
	orr	w20, w20, w0
	mov	x0, x19
	mov	w1, #6
	bl	_s5h1420_readreg
	mov	w8, #247
	and	w2, w0, w8
	mov	x0, x19
	mov	w1, #6
	bl	_s5h1420_writereg
	orr	w8, w20, #0xff000000
	tst	w20, #0x800000
	csel	w8, w20, w8, eq
	ldrsw	x9, [x19]
	mov	x10, #-56963
	movk	x10, #48356, lsl #16
	mul	x9, x9, x10
	lsr	x10, x9, #63
	asr	x9, x9, #50
	add	w9, w9, w10
	mul	w8, w8, w9
	mov	w9, #16777215
	add	w9, w8, w9
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w0, w8, #24
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_s5h1420_getfreqoffset
.subsections_via_symbols
