	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_clk_nkmp_set_freq_scale
_aw_clk_nkmp_set_freq_scale:            ## @aw_clk_nkmp_set_freq_scale
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movq	%r8, -112(%rbp)                 ## 8-byte Spill
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r14
	callq	_DEVICE_LOCK
	movl	12(%r13), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_READ4
	movq	-48(%rbp), %rdi
	leaq	64(%r13), %r12
	movq	%r12, %rsi
	callq	_aw_clk_get_factor
	movq	-48(%rbp), %rdi
	leaq	48(%r13), %r15
	movq	%r15, %rsi
	callq	_aw_clk_get_factor
	movq	-48(%rbp), %rdi
	leaq	32(%r13), %rsi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	callq	_aw_clk_get_factor
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rdi
	leaq	16(%r13), %rsi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	callq	_aw_clk_get_factor
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	cmpq	%rbx, %rax
	jge	LBB0_2
## %bb.1:
	movq	16(%r13), %rax
	notq	%rax
	andq	%rax, -48(%rbp)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_aw_clk_factor_get_value
	movb	24(%r13), %cl
	shlq	%cl, %rax
	orq	-48(%rbp), %rax
	movq	%rax, -48(%rbp)
	movl	12(%r13), %esi
	movq	%r14, %rdi
	movq	%rax, %rdx
	callq	_WRITE4
	movl	$2000, %edi                     ## imm = 0x7D0
	callq	_DELAY
LBB0_2:
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	cmpq	%rbx, -80(%rbp)                 ## 8-byte Folded Reload
	jge	LBB0_4
## %bb.3:
	movq	32(%r13), %rax
	notq	%rax
	andq	%rax, -48(%rbp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_aw_clk_factor_get_value
	movb	40(%r13), %cl
	shlq	%cl, %rax
	orq	-48(%rbp), %rax
	movq	%rax, -48(%rbp)
	movl	12(%r13), %esi
	movq	%r14, %rdi
	movq	%rax, %rdx
	callq	_WRITE4
	movl	$2000, %edi                     ## imm = 0x7D0
	callq	_DELAY
LBB0_4:
	movq	64(%r13), %rax
	orq	48(%r13), %rax
	notq	%rax
	andq	%rax, -48(%rbp)
	movq	%r12, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_aw_clk_factor_get_value
	movb	72(%r13), %cl
	shlq	%cl, %rax
	orq	%rax, -48(%rbp)
	movq	%r15, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	callq	_aw_clk_factor_get_value
	movb	56(%r13), %cl
	shlq	%cl, %rax
	orq	-48(%rbp), %rax
	movq	%rax, -48(%rbp)
	movl	12(%r13), %esi
	movq	%r14, %rdi
	movq	%rax, %rdx
	callq	_WRITE4
	movl	$2000, %edi                     ## imm = 0x7D0
	callq	_DELAY
	cmpq	%rbx, -80(%rbp)                 ## 8-byte Folded Reload
	jle	LBB0_6
## %bb.5:
	movq	32(%r13), %rax
	notq	%rax
	andq	%rax, -48(%rbp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_aw_clk_factor_get_value
	movb	40(%r13), %cl
	shlq	%cl, %rax
	orq	-48(%rbp), %rax
	movq	%rax, -48(%rbp)
	movl	12(%r13), %esi
	movq	%r14, %rdi
	movq	%rax, %rdx
	callq	_WRITE4
	movl	$2000, %edi                     ## imm = 0x7D0
	callq	_DELAY
LBB0_6:
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	cmpq	%rsi, -104(%rbp)                ## 8-byte Folded Reload
	jle	LBB0_8
## %bb.7:
	movq	16(%r13), %rax
	notq	%rax
	andq	%rax, -48(%rbp)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_aw_clk_factor_get_value
	movb	24(%r13), %cl
	shlq	%cl, %rax
	orq	-48(%rbp), %rax
	movq	%rax, -48(%rbp)
	movl	12(%r13), %esi
	movq	%r14, %rdi
	movq	%rax, %rdx
	callq	_WRITE4
	movl	$2000, %edi                     ## imm = 0x7D0
	callq	_DELAY
LBB0_8:
	movq	_AW_CLK_HAS_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_13
## %bb.9:
	cmpl	$0, 4(%r13)
	jle	LBB0_13
## %bb.10:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r15
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	12(%r13), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_READ4
	movzbl	8(%r13), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	cltq
	testq	%rax, -48(%rbp)
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_DELAY
	incl	%ebx
	cmpl	4(%r13), %ebx
	jl	LBB0_11
LBB0_13:
	movq	%r14, %rdi
	callq	_DEVICE_UNLOCK
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AW_CLK_HAS_LOCK,4,2            ## @AW_CLK_HAS_LOCK
	.no_dead_strip	_aw_clk_nkmp_set_freq_scale
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aw_clk_nkmp_set_freq_scale
_aw_clk_nkmp_set_freq_scale:            ; @aw_clk_nkmp_set_freq_scale
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x5
	mov	x22, x4
	stp	x2, x3, [sp, #8]                ; 16-byte Folded Spill
	mov	x20, x1
	mov	x19, x0
	bl	_DEVICE_LOCK
	ldr	w1, [x20, #12]
	add	x2, sp, #24
	mov	x0, x19
	bl	_READ4
	ldr	x0, [sp, #24]
	add	x27, x20, #64
	mov	x1, x27
	bl	_aw_clk_get_factor
	ldr	x0, [sp, #24]
	add	x25, x20, #48
	mov	x1, x25
	bl	_aw_clk_get_factor
	ldr	x0, [sp, #24]
	add	x26, x20, #32
	mov	x1, x26
	bl	_aw_clk_get_factor
	mov	x28, x0
	ldr	x0, [sp, #24]
	add	x23, x20, #16
	mov	x1, x23
	bl	_aw_clk_get_factor
	mov	x24, x0
	cmp	x0, x21
	b.ge	LBB0_2
; %bb.1:
	ldr	x8, [x20, #16]
	ldr	x9, [sp, #24]
	bic	x8, x9, x8
	str	x8, [sp, #24]
	mov	x0, x23
	mov	x1, x21
	bl	_aw_clk_factor_get_value
	ldr	x8, [x20, #24]
	lsl	x8, x0, x8
	ldr	x9, [sp, #24]
	orr	x2, x9, x8
	str	x2, [sp, #24]
	ldr	w1, [x20, #12]
	mov	x0, x19
	bl	_WRITE4
	mov	w0, #2000
	bl	_DELAY
LBB0_2:
	cmp	x28, x22
	b.ge	LBB0_4
; %bb.3:
	ldr	x8, [x20, #32]
	ldr	x9, [sp, #24]
	bic	x8, x9, x8
	str	x8, [sp, #24]
	mov	x0, x26
	mov	x1, x22
	bl	_aw_clk_factor_get_value
	ldr	x8, [x20, #40]
	lsl	x8, x0, x8
	ldr	x9, [sp, #24]
	orr	x2, x9, x8
	str	x2, [sp, #24]
	ldr	w1, [x20, #12]
	mov	x0, x19
	bl	_WRITE4
	mov	w0, #2000
	bl	_DELAY
LBB0_4:
	ldr	x8, [x20, #64]
	ldr	x9, [sp, #24]
	ldr	x10, [x20, #48]
	orr	x8, x8, x10
	bic	x8, x9, x8
	str	x8, [sp, #24]
	mov	x0, x27
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	bl	_aw_clk_factor_get_value
	ldr	x8, [x20, #72]
	lsl	x8, x0, x8
	ldp	x1, x9, [sp, #16]               ; 8-byte Folded Reload
	orr	x8, x9, x8
	str	x8, [sp, #24]
	mov	x0, x25
	bl	_aw_clk_factor_get_value
	ldr	x8, [x20, #56]
	lsl	x8, x0, x8
	ldr	x9, [sp, #24]
	orr	x2, x9, x8
	str	x2, [sp, #24]
	ldr	w1, [x20, #12]
	mov	x0, x19
	bl	_WRITE4
	mov	w0, #2000
	bl	_DELAY
	cmp	x28, x22
	b.le	LBB0_6
; %bb.5:
	ldr	x8, [x20, #32]
	ldr	x9, [sp, #24]
	bic	x8, x9, x8
	str	x8, [sp, #24]
	mov	x0, x26
	mov	x1, x22
	bl	_aw_clk_factor_get_value
	ldr	x8, [x20, #40]
	lsl	x8, x0, x8
	ldr	x9, [sp, #24]
	orr	x2, x9, x8
	str	x2, [sp, #24]
	ldr	w1, [x20, #12]
	mov	x0, x19
	bl	_WRITE4
	mov	w0, #2000
	bl	_DELAY
LBB0_6:
	cmp	x24, x21
	b.le	LBB0_8
; %bb.7:
	ldr	x8, [x20, #16]
	ldr	x9, [sp, #24]
	bic	x8, x9, x8
	str	x8, [sp, #24]
	mov	x0, x23
	mov	x1, x21
	bl	_aw_clk_factor_get_value
	ldr	x8, [x20, #24]
	lsl	x8, x0, x8
	ldr	x9, [sp, #24]
	orr	x2, x9, x8
	str	x2, [sp, #24]
	ldr	w1, [x20, #12]
	mov	x0, x19
	bl	_WRITE4
	mov	w0, #2000
	bl	_DELAY
LBB0_8:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _AW_CLK_HAS_LOCK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AW_CLK_HAS_LOCK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.9:
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.10:
	mov	w21, #0
	mov	w22, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20, #12]
	add	x2, sp, #24
	mov	x0, x19
	bl	_READ4
	ldr	x8, [sp, #24]
	ldr	w9, [x20, #8]
	lsl	w9, w22, w9
	sxtw	x9, w9
	tst	x8, x9
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	w0, #1000
	bl	_DELAY
	add	w21, w21, #1
	ldr	w8, [x20, #4]
	cmp	w21, w8
	b.lt	LBB0_11
LBB0_13:
	mov	x0, x19
	bl	_DEVICE_UNLOCK
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AW_CLK_HAS_LOCK,4,2            ; @AW_CLK_HAS_LOCK
	.no_dead_strip	_aw_clk_nkmp_set_freq_scale
.subsections_via_symbols
