	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CorrectSysClockDeviation
_CorrectSysClockDeviation:              ## @CorrectSysClockDeviation
	.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, %rbx
	movl	$0, -28(%rbp)
	movl	$0, -32(%rbp)
	movq	_LC_RA_RAM_IFINCR_NOM_L__A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	xorl	%ecx, %ecx
	callq	_Read32
	testl	%eax, %eax
	js	LBB0_24
## %bb.1:
	movq	_FE_IF_REG_INCR0__A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_Read32
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_5
## %bb.2:
	cmpq	$0, 48(%rbx)
	movl	-32(%rbp), %eax
	movl	-28(%rbp), %edi
	je	LBB0_6
## %bb.3:
	subl	%edi, %eax
	addl	$-501, %eax                     ## imm = 0xFE0B
	cmpl	$-1001, %eax                    ## imm = 0xFC17
	jae	LBB0_8
LBB0_5:
	movl	%r14d, %eax
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	subl	%edi, %eax
	addl	$-2001, %eax                    ## imm = 0xF82F
	cmpl	$-4001, %eax                    ## imm = 0xF05F
	jb	LBB0_5
LBB0_8:
	movl	40(%rbx), %ecx
	cmpl	$6000000, %ecx                  ## imm = 0x5B8D80
	je	LBB0_12
## %bb.9:
	cmpl	$8000000, %ecx                  ## imm = 0x7A1200
	je	LBB0_13
## %bb.10:
	movl	$-1, %eax
	cmpl	$7000000, %ecx                  ## imm = 0x6ACFC0
	jne	LBB0_24
## %bb.11:
	movq	_DRXD_BANDWIDTH_7MHZ_IN_HZ@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_12:
	movq	_DRXD_BANDWIDTH_6MHZ_IN_HZ@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_13:
	movq	_DRXD_BANDWIDTH_8MHZ_IN_HZ@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %esi
	addl	$8388608, %edi                  ## imm = 0x800000
	movl	%edi, -28(%rbp)
	movl	$2097152, %edx                  ## imm = 0x200000
	callq	_MulDiv32
	cltq
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rcx
	shrq	$63, %rcx
	sarq	$38, %rdx
	addl	%ecx, %edx
	imull	$1000, %edx, %ecx               ## imm = 0x3E8
	subl	%ecx, %eax
	xorl	%ecx, %ecx
	cmpl	$501, %eax                      ## imm = 0x1F5
	setge	%cl
	addl	%edx, %ecx
	movq	32(%rbx), %rsi
	movl	%ecx, %eax
	subl	%esi, %eax
	cltq
	imulq	$1000000, %rax, %rax            ## imm = 0xF4240
	movslq	%esi, %rdi
	movq	%rax, %rdx
	orq	%rdi, %rdx
	shrq	$32, %rdx
	je	LBB0_16
## %bb.15:
	cqto
	idivq	%rdi
	movq	%rax, %r15
	jmp	LBB0_17
LBB0_16:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %r15d
LBB0_17:
	movl	(%rbx), %edx
	movl	%r15d, %esi
	subl	%edx, %esi
	addl	$200, %esi
	movl	%r14d, %eax
	cmpl	$400, %esi                      ## imm = 0x190
	ja	LBB0_24
## %bb.18:
	movslq	%ecx, %rax
	movq	%rax, 24(%rbx)
	cmpl	%r15d, %edx
	je	LBB0_21
## %bb.19:
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movl	12(%rbx), %edi
	movl	%r15d, %esi
	movl	$1, %edx
	callq	*%rax
	movl	%r15d, (%rbx)
LBB0_21:
	movq	_SC_RA_RAM_SAMPLE_RATE_COUNT__A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DRXD_OSCDEV_DONT_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_Write16
	testl	%eax, %eax
	js	LBB0_24
## %bb.22:
	movq	_SC_RA_RAM_IF_SAVE__AX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%rbx), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_Write16
	testl	%eax, %eax
	js	LBB0_24
## %bb.23:
	movq	_CSCD_SAVED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rbx)
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_LC_RA_RAM_IFINCR_NOM_L__A,4,2  ## @LC_RA_RAM_IFINCR_NOM_L__A
	.comm	_FE_IF_REG_INCR0__A,4,2         ## @FE_IF_REG_INCR0__A
	.comm	_DRXD_BANDWIDTH_8MHZ_IN_HZ,4,2  ## @DRXD_BANDWIDTH_8MHZ_IN_HZ
	.comm	_DRXD_BANDWIDTH_7MHZ_IN_HZ,4,2  ## @DRXD_BANDWIDTH_7MHZ_IN_HZ
	.comm	_DRXD_BANDWIDTH_6MHZ_IN_HZ,4,2  ## @DRXD_BANDWIDTH_6MHZ_IN_HZ
	.comm	_SC_RA_RAM_SAMPLE_RATE_COUNT__A,4,2 ## @SC_RA_RAM_SAMPLE_RATE_COUNT__A
	.comm	_DRXD_OSCDEV_DONT_SCAN,4,2      ## @DRXD_OSCDEV_DONT_SCAN
	.comm	_SC_RA_RAM_IF_SAVE__AX,4,2      ## @SC_RA_RAM_IF_SAVE__AX
	.comm	_CSCD_SAVED,4,2                 ## @CSCD_SAVED
	.no_dead_strip	_CorrectSysClockDeviation
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CorrectSysClockDeviation
_CorrectSysClockDeviation:              ; @CorrectSysClockDeviation
	.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	x19, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _LC_RA_RAM_IFINCR_NOM_L__A@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LC_RA_RAM_IFINCR_NOM_L__A@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	w3, #0
	bl	_Read32
	tbnz	w0, #31, LBB0_18
; %bb.1:
Lloh3:
	adrp	x8, _FE_IF_REG_INCR0__A@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FE_IF_REG_INCR0__A@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #0
	bl	_Read32
	mov	x20, x0
	tbnz	w0, #31, LBB0_19
; %bb.2:
	ldr	x10, [x19, #48]
	ldp	w9, w8, [sp, #8]
	sub	w9, w9, w8
	cbz	x10, LBB0_4
; %bb.3:
	sub	w9, w9, #501
	cmn	w9, #1001
	b.lo	LBB0_19
	b	LBB0_5
LBB0_4:
	sub	w9, w9, #2001
	cmn	w9, #4001
	b.lo	LBB0_19
LBB0_5:
	ldr	w9, [x19, #40]
	sub	w10, w9, #1464, lsl #12         ; =5996544
	cmp	w10, #3456
	b.eq	LBB0_9
; %bb.6:
	mov	w10, #4608
	movk	w10, #122, lsl #16
	cmp	w9, w10
	b.eq	LBB0_10
; %bb.7:
	mov	w10, #53184
	movk	w10, #106, lsl #16
	cmp	w9, w10
	b.ne	LBB0_20
; %bb.8:
Lloh6:
	adrp	x9, _DRXD_BANDWIDTH_7MHZ_IN_HZ@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DRXD_BANDWIDTH_7MHZ_IN_HZ@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh8:
	adrp	x9, _DRXD_BANDWIDTH_6MHZ_IN_HZ@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DRXD_BANDWIDTH_6MHZ_IN_HZ@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh10:
	adrp	x9, _DRXD_BANDWIDTH_8MHZ_IN_HZ@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DRXD_BANDWIDTH_8MHZ_IN_HZ@GOTPAGEOFF]
LBB0_11:
	ldr	w1, [x9]
	add	w0, w8, #2048, lsl #12          ; =8388608
	str	w0, [sp, #12]
	mov	w2, #2097152
	bl	_MulDiv32
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w8, w8, w9, asr #6
	mov	w9, #1000
	msub	w9, w8, w9, w0
	cmp	w9, #500
	cinc	w8, w8, gt
	ldr	x9, [x19, #32]
	sub	w10, w8, w9
	mov	w11, #16960
	movk	w11, #15, lsl #16
	smull	x10, w10, w11
	sxtw	x9, w9
	sdiv	x21, x10, x9
	ldr	w9, [x19]
	sub	w10, w21, w9
	add	w10, w10, #200
	cmp	w10, #400
	b.hi	LBB0_19
; %bb.12:
	sxtw	x8, w8
	str	x8, [x19, #24]
	cmp	w9, w21
	b.eq	LBB0_15
; %bb.13:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_15
; %bb.14:
	ldr	w0, [x19, #12]
	mov	x1, x21
	mov	w2, #1
	blr	x8
	str	w21, [x19]
LBB0_15:
Lloh12:
	adrp	x8, _SC_RA_RAM_SAMPLE_RATE_COUNT__A@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SC_RA_RAM_SAMPLE_RATE_COUNT__A@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _DRXD_OSCDEV_DONT_SCAN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DRXD_OSCDEV_DONT_SCAN@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_Write16
	tbnz	w0, #31, LBB0_18
; %bb.16:
Lloh18:
	adrp	x8, _SC_RA_RAM_IF_SAVE__AX@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SC_RA_RAM_IF_SAVE__AX@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
	mov	x0, x19
	mov	w3, #0
	bl	_Write16
	mov	x20, x0
	tbnz	w0, #31, LBB0_19
; %bb.17:
Lloh21:
	adrp	x8, _CSCD_SAVED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CSCD_SAVED@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	b	LBB0_19
LBB0_18:
	mov	x20, x0
LBB0_19:
	mov	x0, x20
	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
LBB0_20:
	mov	w20, #-1
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_LC_RA_RAM_IFINCR_NOM_L__A,4,2  ; @LC_RA_RAM_IFINCR_NOM_L__A
	.comm	_FE_IF_REG_INCR0__A,4,2         ; @FE_IF_REG_INCR0__A
	.comm	_DRXD_BANDWIDTH_8MHZ_IN_HZ,4,2  ; @DRXD_BANDWIDTH_8MHZ_IN_HZ
	.comm	_DRXD_BANDWIDTH_7MHZ_IN_HZ,4,2  ; @DRXD_BANDWIDTH_7MHZ_IN_HZ
	.comm	_DRXD_BANDWIDTH_6MHZ_IN_HZ,4,2  ; @DRXD_BANDWIDTH_6MHZ_IN_HZ
	.comm	_SC_RA_RAM_SAMPLE_RATE_COUNT__A,4,2 ; @SC_RA_RAM_SAMPLE_RATE_COUNT__A
	.comm	_DRXD_OSCDEV_DONT_SCAN,4,2      ; @DRXD_OSCDEV_DONT_SCAN
	.comm	_SC_RA_RAM_IF_SAVE__AX,4,2      ; @SC_RA_RAM_IF_SAVE__AX
	.comm	_CSCD_SAVED,4,2                 ; @CSCD_SAVED
	.no_dead_strip	_CorrectSysClockDeviation
.subsections_via_symbols
