	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nlm_set_device_frequency       ## -- Begin function nlm_set_device_frequency
	.p2align	4, 0x90
_nlm_set_device_frequency:              ## @nlm_set_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	callq	_nlm_get_sys_regbase
	movl	%eax, %ebx
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_nlm_get_device_frequency
	movl	%eax, %r12d
	movq	%r14, %rax
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	addl	$-5, %r14d
	cmpl	%r14d, %r12d
	jl	LBB0_2
## %bb.1:
	cmpl	-48(%rbp), %r12d                ## 4-byte Folded Reload
	jle	LBB0_7
LBB0_2:
	movl	$1, %r13d
	movl	%r15d, %ecx
	shll	%cl, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_SYS_DFS_DIV_INC_CTRL@GOTPCREL(%rip), %rax
	cmpl	%r14d, %r12d
	jge	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_SYS_DFS_DIV_DEC_CTRL@GOTPCREL(%rip), %rax
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	%r13d, %edx
	callq	_nlm_write_sys_reg
	movl	%ebx, %edi
	movl	%r15d, %esi
	callq	_nlm_get_device_frequency
	cmpl	%r14d, %eax
	jl	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	jg	LBB0_3
LBB0_7:
	movl	%ebx, %edi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nlm_get_device_frequency       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_DFS_DIV_DEC_CTRL,4,2       ## @SYS_DFS_DIV_DEC_CTRL
	.comm	_SYS_DFS_DIV_INC_CTRL,4,2       ## @SYS_DFS_DIV_INC_CTRL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nlm_set_device_frequency       ; -- Begin function nlm_set_device_frequency
	.p2align	2
_nlm_set_device_frequency:              ; @nlm_set_device_frequency
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x19, x1
	bl	_nlm_get_sys_regbase
	mov	x21, x0
	mov	x1, x19
	bl	_nlm_get_device_frequency
	sub	w24, w20, #5
	cmp	w0, w24
	ccmp	w0, w20, #0, ge
	b.le	LBB0_4
; %bb.1:
	mov	x22, x0
	mov	w8, #1
	lsl	w23, w8, w19
Lloh0:
	adrp	x25, _SYS_DFS_DIV_DEC_CTRL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _SYS_DFS_DIV_DEC_CTRL@GOTPAGEOFF]
Lloh2:
	adrp	x26, _SYS_DFS_DIV_INC_CTRL@GOTPAGE
Lloh3:
	ldr	x26, [x26, _SYS_DFS_DIV_INC_CTRL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w22, w24
	csel	x8, x25, x26, lt
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x23
	bl	_nlm_write_sys_reg
	mov	x0, x21
	mov	x1, x19
	bl	_nlm_get_device_frequency
	cmp	w0, w24
	b.lt	LBB0_2
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w0, w20
	b.gt	LBB0_2
LBB0_4:
	mov	x0, x21
	mov	x1, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_nlm_get_device_frequency
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_DFS_DIV_DEC_CTRL,4,2       ; @SYS_DFS_DIV_DEC_CTRL
	.comm	_SYS_DFS_DIV_INC_CTRL,4,2       ; @SYS_DFS_DIV_INC_CTRL
.subsections_via_symbols
