	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nlm_get_device_frequency
_nlm_get_device_frequency:              ## @nlm_get_device_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movl	%edi, %r12d
	movq	_SYS_PLL_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_nlm_read_sys_reg
	movl	%eax, %r14d
	leal	-8(%rbx), %r15d
	cmpl	$8, %ebx
	cmovll	%ebx, %r15d
	movq	_SYS_DFS_DIV_VALUE1@GOTPCREL(%rip), %rax
	cmovlq	_SYS_DFS_DIV_VALUE0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_nlm_read_sys_reg
	movl	%eax, %ebx
	movq	_DFS_DEVICE_NAE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_3
## %bb.1:
	xorl	%eax, %eax
	callq	_nlm_is_xlp8xx_ax
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movl	$3, %eax
	jmp	LBB0_4
LBB0_2:
	movl	$6, %eax
LBB0_4:
	movl	%r14d, %edx
	shrl	%edx
	andl	$3, %edx
	shll	$2, %r15d
	movl	%r15d, %ecx
	sarl	%cl, %ebx
	incl	%edx
	imull	%eax, %edx
	andl	$15, %ebx
	incl	%ebx
	imull	%edx, %ebx
	shrl	$3, %r14d
	andl	$127, %r14d
	imull	$400, %r14d, %eax               ## imm = 0x190
	addl	$400, %eax                      ## imm = 0x190
                                        ## kill: def $ax killed $ax killed $eax
	xorl	%edx, %edx
	divw	%bx
	movzwl	%ax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_PLL_CTRL,4,2               ## @SYS_PLL_CTRL
	.comm	_SYS_DFS_DIV_VALUE0,4,2         ## @SYS_DFS_DIV_VALUE0
	.comm	_SYS_DFS_DIV_VALUE1,4,2         ## @SYS_DFS_DIV_VALUE1
	.comm	_DFS_DEVICE_NAE,4,2             ## @DFS_DEVICE_NAE
	.no_dead_strip	_nlm_get_device_frequency
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nlm_get_device_frequency
_nlm_get_device_frequency:              ; @nlm_get_device_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
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _SYS_PLL_CTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYS_PLL_CTRL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_nlm_read_sys_reg
	mov	x19, x0
	subs	w8, w20, #8
	csel	w22, w20, w8, lt
Lloh3:
	adrp	x8, _SYS_DFS_DIV_VALUE0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SYS_DFS_DIV_VALUE0@GOTPAGEOFF]
Lloh5:
	adrp	x9, _SYS_DFS_DIV_VALUE1@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SYS_DFS_DIV_VALUE1@GOTPAGEOFF]
	csel	x8, x8, x9, lt
	ldr	w1, [x8]
	mov	x0, x21
	bl	_nlm_read_sys_reg
	mov	x20, x0
Lloh7:
	adrp	x8, _DFS_DEVICE_NAE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DFS_DEVICE_NAE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_2
; %bb.1:
	bl	_nlm_is_xlp8xx_ax
	cbz	w0, LBB0_3
LBB0_2:
	mov	w8, #3
	b	LBB0_4
LBB0_3:
	mov	w8, #6
LBB0_4:
	ubfx	w9, w19, #1, #2
	add	w9, w9, #1
	lsl	w10, w22, #2
	asr	w10, w20, w10
	and	w10, w10, #0xf
	madd	w9, w9, w10, w9
	mul	w8, w9, w8
	ubfx	w9, w19, #3, #7
	mov	w10, #400
	mul	w9, w9, w10
	add	w9, w9, #400
	and	w9, w9, #0xfff0
	udiv	w0, w9, w8
	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
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_PLL_CTRL,4,2               ; @SYS_PLL_CTRL
	.comm	_SYS_DFS_DIV_VALUE0,4,2         ; @SYS_DFS_DIV_VALUE0
	.comm	_SYS_DFS_DIV_VALUE1,4,2         ; @SYS_DFS_DIV_VALUE1
	.comm	_DFS_DEVICE_NAE,4,2             ; @DFS_DEVICE_NAE
	.no_dead_strip	_nlm_get_device_frequency
.subsections_via_symbols
