	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stb6100_get_frequency
_stb6100_get_frequency:                 ## @stb6100_get_frequency
	.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	%rsi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	(%rdi), %r15
	movq	_STB6100_NUMREGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_stb6100_read_regs
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	_STB6100_VCO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_STB6100_VCO_ODIV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	andl	(%rbx,%rax,4), %r9d
	movq	_STB6100_VCO_ODIV_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r9d
	movq	_STB6100_K@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %eax
	movq	_STB6100_K_PSD2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	andl	%eax, %r10d
	movq	_STB6100_K_PSD2_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %r10d
	movq	_STB6100_NI@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rbx,%rcx,4), %r11d
	movq	_STB6100_K_NF_MSB@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	shll	$8, %eax
	movq	_STB6100_NF_LSB@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orl	(%rbx,%rcx,4), %eax
	movl	(%r15), %ebx
	movl	%eax, %edx
	imull	%ebx, %edx
	movb	$9, %cl
	subb	%r10b, %cl
	sarl	%cl, %edx
	imull	%r11d, %ebx
	movl	%r10d, %ecx
	shll	%cl, %ebx
	addl	%edx, %ebx
	leal	1(%r9), %ecx
	movl	%ebx, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %edx
	movl	%edx, 4(%r15)
	movl	%edx, (%r14)
	movq	_verbose@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_FE_DEBUG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%r15), %r14d
	movl	4(%r15), %r8d
	subq	$8, %rsp
	leaq	L_.str(%rip), %rcx
	movl	$1, %edx
                                        ## kill: def $r9d killed $r9d killed $r9
	pushq	%rax
	pushq	%r11
	pushq	%rbx
	pushq	%r14
	pushq	%r10
	callq	_dprintk
	addq	$48, %rsp
	xorl	%eax, %eax
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_4
## %bb.3:
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_STB6100_NUMREGS,4,2            ## @STB6100_NUMREGS
	.comm	_STB6100_VCO,8,3                ## @STB6100_VCO
	.comm	_STB6100_VCO_ODIV,4,2           ## @STB6100_VCO_ODIV
	.comm	_STB6100_VCO_ODIV_SHIFT,4,2     ## @STB6100_VCO_ODIV_SHIFT
	.comm	_STB6100_K,8,3                  ## @STB6100_K
	.comm	_STB6100_K_PSD2,4,2             ## @STB6100_K_PSD2
	.comm	_STB6100_K_PSD2_SHIFT,4,2       ## @STB6100_K_PSD2_SHIFT
	.comm	_STB6100_NI,8,3                 ## @STB6100_NI
	.comm	_STB6100_K_NF_MSB,4,2           ## @STB6100_K_NF_MSB
	.comm	_STB6100_NF_LSB,8,3             ## @STB6100_NF_LSB
	.comm	_verbose,4,2                    ## @verbose
	.comm	_FE_DEBUG,4,2                   ## @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"frequency = %u kHz, odiv = %u, psd2 = %u, fxtal = %u kHz, fvco = %u kHz, N(I) = %u, N(F) = %u"

	.no_dead_strip	_stb6100_get_frequency
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stb6100_get_frequency
_stb6100_get_frequency:                 ; @stb6100_get_frequency
	.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
	sub	sp, sp, #16
	mov	x20, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	x19, [x0]
Lloh3:
	adrp	x8, _STB6100_NUMREGS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STB6100_NUMREGS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	mov	x0, x19
	mov	x1, x21
	bl	_stb6100_read_regs
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _STB6100_VCO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _STB6100_VCO@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	w8, [x21, x8, lsl #2]
Lloh11:
	adrp	x9, _STB6100_VCO_ODIV@GOTPAGE
Lloh12:
	ldr	x9, [x9, _STB6100_VCO_ODIV@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh14:
	adrp	x9, _STB6100_VCO_ODIV_SHIFT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _STB6100_VCO_ODIV_SHIFT@GOTPAGEOFF]
Lloh16:
	adrp	x10, _STB6100_K@GOTPAGE
Lloh17:
	ldr	x10, [x10, _STB6100_K@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	ldr	x10, [x10]
	ldr	w10, [x21, x10, lsl #2]
Lloh20:
	adrp	x11, _STB6100_K_PSD2@GOTPAGE
Lloh21:
	ldr	x11, [x11, _STB6100_K_PSD2@GOTPAGEOFF]
	asr	w5, w8, w9
Lloh22:
	ldr	w8, [x11]
	and	w8, w8, w10
Lloh23:
	adrp	x9, _STB6100_K_PSD2_SHIFT@GOTPAGE
Lloh24:
	ldr	x9, [x9, _STB6100_K_PSD2_SHIFT@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	asr	w6, w8, w9
Lloh26:
	adrp	x8, _STB6100_NI@GOTPAGE
Lloh27:
	ldr	x8, [x8, _STB6100_NI@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	ldr	w8, [x21, x8, lsl #2]
Lloh29:
	adrp	x9, _STB6100_K_NF_MSB@GOTPAGE
Lloh30:
	ldr	x9, [x9, _STB6100_K_NF_MSB@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	and	w9, w9, w10
Lloh32:
	adrp	x10, _STB6100_NF_LSB@GOTPAGE
Lloh33:
	ldr	x10, [x10, _STB6100_NF_LSB@GOTPAGEOFF]
Lloh34:
	ldr	x10, [x10]
	ldr	w10, [x21, x10, lsl #2]
	orr	w9, w10, w9, lsl #8
	ldr	w10, [x19]
	mul	w11, w9, w10
	mov	w12, #9
	sub	w12, w12, w6
	asr	w11, w11, w12
	mul	w10, w10, w8
	lsl	w10, w10, w6
	add	w10, w11, w10
	add	w11, w5, #1
	asr	w11, w10, w11
	str	w11, [x19, #4]
	str	w11, [x20]
Lloh35:
	adrp	x11, _verbose@GOTPAGE
Lloh36:
	ldr	x11, [x11, _verbose@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x11]
Lloh38:
	adrp	x11, _FE_DEBUG@GOTPAGE
Lloh39:
	ldr	x11, [x11, _FE_DEBUG@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x11]
	ldp	w7, w4, [x19]
	sub	sp, sp, #16
	stp	w8, w9, [sp, #4]
	str	w10, [sp]
Lloh41:
	adrp	x3, l_.str@PAGE
Lloh42:
	add	x3, x3, l_.str@PAGEOFF
	mov	w2, #1
	bl	_dprintk
	add	sp, sp, #16
	mov	w0, #0
LBB0_2:
	ldur	x8, [x29, #-40]
Lloh43:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh44:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	sub	sp, x29, #32
	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
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_STB6100_NUMREGS,4,2            ; @STB6100_NUMREGS
	.comm	_STB6100_VCO,8,3                ; @STB6100_VCO
	.comm	_STB6100_VCO_ODIV,4,2           ; @STB6100_VCO_ODIV
	.comm	_STB6100_VCO_ODIV_SHIFT,4,2     ; @STB6100_VCO_ODIV_SHIFT
	.comm	_STB6100_K,8,3                  ; @STB6100_K
	.comm	_STB6100_K_PSD2,4,2             ; @STB6100_K_PSD2
	.comm	_STB6100_K_PSD2_SHIFT,4,2       ; @STB6100_K_PSD2_SHIFT
	.comm	_STB6100_NI,8,3                 ; @STB6100_NI
	.comm	_STB6100_K_NF_MSB,4,2           ; @STB6100_K_NF_MSB
	.comm	_STB6100_NF_LSB,8,3             ; @STB6100_NF_LSB
	.comm	_verbose,4,2                    ; @verbose
	.comm	_FE_DEBUG,4,2                   ; @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"frequency = %u kHz, odiv = %u, psd2 = %u, fxtal = %u kHz, fvco = %u kHz, N(I) = %u, N(F) = %u"

	.no_dead_strip	_stb6100_get_frequency
.subsections_via_symbols
