	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function pollux_get_real_snd_rate
LCPI0_0:
	.long	63                              ## 0x3f
	.long	63                              ## 0x3f
	.space	4
	.space	4
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_pollux_get_real_snd_rate
	.p2align	4, 0x90
_pollux_get_real_snd_rate:              ## @pollux_get_real_snd_rate
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	_memregl@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movl	56260(%rax), %edx
	movl	56264(%rax), %ecx
	shrl	%edx
	andl	$7, %edx
	shrl	%ecx
	andl	$7, %ecx
	cmpl	$1, %edx
	ja	LBB0_2
## %bb.1:
	cmpl	$7, %ecx
	jne	LBB0_2
## %bb.3:
	xorl	%ecx, %ecx
	testl	%edx, %edx
	setne	%cl
	movl	61444(%rax,%rcx,4), %edi
	callq	_decode_pll
	movq	(%rbx), %rcx
	movq	56260(%rcx), %xmm0              ## xmm0 = mem[0],zero
	psrld	$4, %xmm0
	pand	LCPI0_0(%rip), %xmm0
	pcmpeqd	%xmm1, %xmm1
	psubd	%xmm1, %xmm0
	movd	%xmm0, %ecx
	cltd
	idivl	%ecx
	pextrd	$1, %xmm0, %ecx
	cltd
	idivl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	leal	63(%rax), %r12d
	testl	%eax, %eax
	cmovnsl	%eax, %r12d
	sarl	$6, %r12d
	movq	_timer_drift@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	%r12d, %eax
	cltq
	imulq	$-1125899907, %rax, %rbx        ## imm = 0xBCE4217D
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$50, %rbx
	addl	%eax, %ebx
	leal	(%rbx,%r12), %r15d
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	callq	_printf
	leal	(%r12,%rbx), %eax
	addl	$-45101, %eax                   ## imm = 0xFFFF4FD3
	cmpl	$-38102, %eax                   ## imm = 0xFFFF6B2A
	ja	LBB0_4
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_6
LBB0_2:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_6
LBB0_4:
	movl	%r15d, %r14d
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_memregl,8,3                    ## @memregl
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"get_real_snd_rate: bad clk sources: %d %d\n"

	.comm	_timer_drift,4,2                ## @timer_drift
L_.str.1:                               ## @.str.1
	.asciz	"adjusted rate: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"get_real_snd_rate: got bad rate: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pollux_get_real_snd_rate       ; -- Begin function pollux_get_real_snd_rate
	.p2align	2
_pollux_get_real_snd_rate:              ; @pollux_get_real_snd_rate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _memregl@GOTPAGE
Lloh1:
	ldr	x20, [x20, _memregl@GOTPAGEOFF]
	ldr	x8, [x20]
	mov	w9, #56260
	add	x9, x8, x9
	ldp	w10, w9, [x9]
	ubfx	w2, w10, #1, #3
	ubfx	w9, w9, #1, #3
	cmp	w2, #1
	ccmp	w9, #7, #0, ls
	b.eq	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _stderr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	str	x9, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	cmp	w2, #0
	mov	w9, #61448
	mov	w10, #61444
	csel	x9, x10, x9, eq
	ldr	w0, [x8, x9]
	bl	_decode_pll
	ldr	x8, [x20]
	mov	w9, #56260
	ldr	d0, [x8, x9]
	ushr.2s	v0, v0, #4
	movi.2s	v1, #63
	and.8b	v0, v0, v1
	movi.2s	v1, #1
	add.2s	v0, v0, v1
	mov.s	w8, v0[1]
	fmov	w9, s0
	sdiv	w9, w0, w9
	sdiv	w8, w9, w8
	add	w9, w8, #63
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #6
Lloh7:
	adrp	x9, _timer_drift@GOTPAGE
Lloh8:
	ldr	x9, [x9, _timer_drift@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	mul	w9, w8, w9
	mov	w10, #8573
	movk	w10, #48356, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	asr	x9, x9, #50
	add	w9, w9, w10
	add	w20, w9, w8
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_printf
	mov	w8, #-45101
	mov	w9, #-38102
	add	w8, w20, w8
	cmp	w8, w9
	b.hi	LBB0_5
; %bb.3:
Lloh12:
	adrp	x8, _stderr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
LBB0_4:
	bl	_fprintf
	b	LBB0_6
LBB0_5:
	mov	x19, x20
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_memregl,8,3                    ; @memregl
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"get_real_snd_rate: bad clk sources: %d %d\n"

	.comm	_timer_drift,4,2                ; @timer_drift
l_.str.1:                               ; @.str.1
	.asciz	"adjusted rate: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"get_real_snd_rate: got bad rate: %d\n"

.subsections_via_symbols
