	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sp887x_correct_offsets
_sp887x_correct_offsets:                ## @sp887x_correct_offsets
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	subl	(%rsi), %edx
	movl	4(%rsi), %r15d
	movq	8(%rsi), %rax
	movq	_INVERSION_ON@GOTPCREL(%rip), %r12
	movl	%edx, %ecx
	negl	%ecx
	cmpq	(%r12), %rax
	cmovnel	%edx, %ecx
	movl	%ecx, %eax
	addl	$36000000, %eax                 ## imm = 0x2255100
	cltq
	imulq	$-993130575, %rax, %rax         ## imm = 0xC4CE07B1
	shrq	$32, %rax
	leal	(%rax,%rcx), %edi
	addl	$36000000, %edi                 ## imm = 0x2255100
	movl	%edi, %eax
	shrl	$31, %eax
	sarl	$8, %edi
	addl	%eax, %edi
	leaq	-36(%rbp), %rcx
	movl	$61003, %esi                    ## imm = 0xEE4B
	xorl	%edx, %edx
	callq	_divide
	movq	8(%rbx), %rax
	cmpq	(%r12), %rax
	jne	LBB0_2
## %bb.1:
	negl	-36(%rbp)
LBB0_2:
	xorl	%eax, %eax
	cmpl	$7000000, %r15d                 ## imm = 0x6ACFC0
	sete	%al
	cmpl	$6000000, %r15d                 ## imm = 0x5B8D80
	movl	$2, %ecx
	cmovneq	%rax, %rcx
	leaq	_sp887x_correct_offsets.srate_correction(%rip), %rax
	movl	(%rax,%rcx,4), %ebx
	movl	%ebx, %edx
	sarl	$12, %edx
	movq	%r14, %rdi
	movl	$793, %esi                      ## imm = 0x319
	callq	_sp887x_writereg
	andl	$4095, %ebx                     ## imm = 0xFFF
	movq	%r14, %rdi
	movl	$794, %esi                      ## imm = 0x31A
	movl	%ebx, %edx
	callq	_sp887x_writereg
	movl	-36(%rbp), %edx
	sarl	$12, %edx
	movq	%r14, %rdi
	movl	$777, %esi                      ## imm = 0x309
	callq	_sp887x_writereg
	movl	$4095, %edx                     ## imm = 0xFFF
	andl	-36(%rbp), %edx
	movq	%r14, %rdi
	movl	$778, %esi                      ## imm = 0x30A
	callq	_sp887x_writereg
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @sp887x_correct_offsets.srate_correction
_sp887x_correct_offsets.srate_correction:
	.long	1879617                         ## 0x1cae41
	.long	4544878                         ## 0x45596e
	.long	8098561                         ## 0x7b9301

	.comm	_INVERSION_ON,8,3               ## @INVERSION_ON
	.no_dead_strip	_sp887x_correct_offsets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sp887x_correct_offsets
_sp887x_correct_offsets:                ; @sp887x_correct_offsets
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	ldp	w8, w21, [x1]
	sub	w8, w2, w8
Lloh0:
	adrp	x22, _INVERSION_ON@GOTPAGE
Lloh1:
	ldr	x22, [x22, _INVERSION_ON@GOTPAGEOFF]
	ldr	x9, [x1, #8]
	ldr	x10, [x22]
	cmp	x9, x10
	cneg	w8, w8, eq
	mov	w9, #20736
	movk	w9, #549, lsl #16
	mov	w10, #1969
	movk	w10, #50382, lsl #16
	add	w8, w8, w9
	smull	x9, w8, w10
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #8
	add	w0, w9, w8, lsr #31
	add	x3, sp, #12
	mov	w1, #61003
	mov	x2, #0
	bl	_divide
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [sp, #12]
	neg	w8, w8
	str	w8, [sp, #12]
LBB0_2:
	mov	w8, #53184
	movk	w8, #106, lsl #16
	cmp	w21, w8
	cset	w8, eq
	mov	w9, #36224
	movk	w9, #91, lsl #16
	cmp	w21, w9
	mov	w9, #2
	csel	x8, x9, x8, eq
Lloh2:
	adrp	x9, _sp887x_correct_offsets.srate_correction@PAGE
Lloh3:
	add	x9, x9, _sp887x_correct_offsets.srate_correction@PAGEOFF
	ldr	w20, [x9, x8, lsl #2]
	asr	w2, w20, #12
	mov	x0, x19
	mov	w1, #793
	bl	_sp887x_writereg
	and	w2, w20, #0xfff
	mov	x0, x19
	mov	w1, #794
	bl	_sp887x_writereg
	ldr	w8, [sp, #12]
	asr	w2, w8, #12
	mov	x0, x19
	mov	w1, #777
	bl	_sp887x_writereg
	ldr	w8, [sp, #12]
	and	w2, w8, #0xfff
	mov	x0, x19
	mov	w1, #778
	bl	_sp887x_writereg
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @sp887x_correct_offsets.srate_correction
_sp887x_correct_offsets.srate_correction:
	.long	1879617                         ; 0x1cae41
	.long	4544878                         ; 0x45596e
	.long	8098561                         ; 0x7b9301

	.comm	_INVERSION_ON,8,3               ; @INVERSION_ON
	.no_dead_strip	_sp887x_correct_offsets
.subsections_via_symbols
