	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arcturus_force_clk_levels
_arcturus_force_clk_levels:             ## @arcturus_force_clk_levels
	.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
	movq	%rdx, %rbx
	movl	%esi, %r13d
	movq	%rdi, %r14
	callq	_mutex_lock
	xorl	%r15d, %r15d
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_ffs
	movq	%rax, %r12
	decq	%r12
	movq	%rbx, %rdi
	callq	_fls
	decq	%rax
	jmp	LBB0_3
LBB0_1:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
LBB0_3:
	addl	$-128, %r13d
	cmpl	$3, %r13d
	ja	LBB0_19
## %bb.4:
	movq	8(%r14), %rcx
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%r13,4), %rsi
	addq	%rdx, %rsi
	jmpq	*%rsi
LBB0_12:
	movq	24(%rcx), %rdx
	cmpq	%rdx, %rax
	jae	LBB0_6
## %bb.13:
	movq	32(%rcx), %rdx
	movl	(%rdx,%r12,4), %esi
	movl	%esi, 44(%rcx)
	movl	(%rdx,%rax,4), %eax
	movl	%eax, 40(%rcx)
	movq	_FEATURE_DPM_SOCCLK_MASK@GOTPCREL(%rip), %r12
	jmp	LBB0_8
LBB0_5:
	movq	72(%rcx), %rdx
	cmpq	%rdx, %rax
	jae	LBB0_6
## %bb.7:
	movq	80(%rcx), %rdx
	movl	(%rdx,%r12,4), %esi
	movl	%esi, 92(%rcx)
	movl	(%rdx,%rax,4), %eax
	movl	%eax, 88(%rcx)
	movq	_FEATURE_DPM_GFXCLK_MASK@GOTPCREL(%rip), %r12
	jmp	LBB0_8
LBB0_10:
	movq	48(%rcx), %rdx
	cmpq	%rdx, %rax
	jae	LBB0_6
## %bb.11:
	movq	56(%rcx), %rdx
	movl	(%rdx,%r12,4), %esi
	movl	%esi, 68(%rcx)
	movl	(%rdx,%rax,4), %eax
	movl	%eax, 64(%rcx)
	movq	_FEATURE_DPM_UCLK_MASK@GOTPCREL(%rip), %r12
	jmp	LBB0_8
LBB0_14:
	movq	(%rcx), %rdx
	cmpq	%rdx, %rax
	jae	LBB0_6
## %bb.15:
	movq	8(%rcx), %rdx
	movl	(%rdx,%r12,4), %esi
	movl	%esi, 20(%rcx)
	movl	(%rdx,%rax,4), %eax
	movl	%eax, 16(%rcx)
	movq	_FEATURE_DPM_FCLK_MASK@GOTPCREL(%rip), %r12
LBB0_8:
	movl	(%r12), %edx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_arcturus_upload_dpm_level
	testl	%eax, %eax
	je	LBB0_16
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_18
LBB0_6:
	decq	%rdx
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_19
LBB0_16:
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_arcturus_upload_dpm_level
	testl	%eax, %eax
	je	LBB0_19
## %bb.17:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
LBB0_18:
	xorl	%eax, %eax
	callq	_pr_err
	movl	%ebx, %r15d
LBB0_19:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_5
	.long	L0_0_set_10
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Clock level specified %d is over max allowed %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FEATURE_DPM_GFXCLK_MASK,4,2    ## @FEATURE_DPM_GFXCLK_MASK
L_.str.1:                               ## @.str.1
	.asciz	"Failed to upload boot level to lowest!\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to upload dpm max level to highest!\n"

	.comm	_FEATURE_DPM_UCLK_MASK,4,2      ## @FEATURE_DPM_UCLK_MASK
	.comm	_FEATURE_DPM_SOCCLK_MASK,4,2    ## @FEATURE_DPM_SOCCLK_MASK
	.comm	_FEATURE_DPM_FCLK_MASK,4,2      ## @FEATURE_DPM_FCLK_MASK
	.no_dead_strip	_arcturus_force_clk_levels
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arcturus_force_clk_levels
_arcturus_force_clk_levels:             ; @arcturus_force_clk_levels
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_mutex_lock
	cbz	x21, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_ffs
	sub	x22, x0, #1
	mov	x0, x21
	bl	_fls
	sub	x8, x0, #1
	b	LBB0_3
LBB0_2:
	mov	x22, #0
	mov	x8, #0
LBB0_3:
	sub	w10, w20, #128
	cmp	w10, #3
	b.hi	LBB0_7
; %bb.4:
	ldr	x9, [x19, #8]
Lloh0:
	adrp	x11, lJTI0_0@PAGE
Lloh1:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_5
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_5:
	ldr	x10, [x9, #24]
	cmp	x8, x10
	b.hs	LBB0_16
; %bb.6:
	ldr	x10, [x9, #32]
	ldr	w11, [x10, x22, lsl #2]
	ldr	w8, [x10, x8, lsl #2]
	stp	w8, w11, [x9, #40]
Lloh2:
	adrp	x21, _FEATURE_DPM_SOCCLK_MASK@GOTPAGE
Lloh3:
	ldr	x21, [x21, _FEATURE_DPM_SOCCLK_MASK@GOTPAGEOFF]
	b	LBB0_14
LBB0_7:
	mov	w20, #0
	b	LBB0_20
LBB0_8:
	ldr	x10, [x9, #72]
	cmp	x8, x10
	b.hs	LBB0_16
; %bb.9:
	ldr	x10, [x9, #80]
	ldr	w11, [x10, x22, lsl #2]
	ldr	w8, [x10, x8, lsl #2]
	stp	w8, w11, [x9, #88]
Lloh4:
	adrp	x21, _FEATURE_DPM_GFXCLK_MASK@GOTPAGE
Lloh5:
	ldr	x21, [x21, _FEATURE_DPM_GFXCLK_MASK@GOTPAGEOFF]
	b	LBB0_14
LBB0_10:
	ldr	x10, [x9, #48]
	cmp	x8, x10
	b.hs	LBB0_16
; %bb.11:
	ldr	x10, [x9, #56]
	ldr	w11, [x10, x22, lsl #2]
	ldr	w8, [x10, x8, lsl #2]
	stp	w8, w11, [x9, #64]
Lloh6:
	adrp	x21, _FEATURE_DPM_UCLK_MASK@GOTPAGE
Lloh7:
	ldr	x21, [x21, _FEATURE_DPM_UCLK_MASK@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
	ldr	x10, [x9]
	cmp	x8, x10
	b.hs	LBB0_16
; %bb.13:
	ldr	x10, [x9, #8]
	ldr	w11, [x10, x22, lsl #2]
	ldr	w8, [x10, x8, lsl #2]
	stp	w8, w11, [x9, #16]
Lloh8:
	adrp	x21, _FEATURE_DPM_FCLK_MASK@GOTPAGE
Lloh9:
	ldr	x21, [x21, _FEATURE_DPM_FCLK_MASK@GOTPAGEOFF]
LBB0_14:
	ldr	w2, [x21]
	mov	x0, x19
	mov	w1, #0
	bl	_arcturus_upload_dpm_level
	cbz	w0, LBB0_17
; %bb.15:
	mov	x20, x0
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_19
LBB0_16:
	sub	x9, x10, #1
	stp	x8, x9, [sp]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_20
LBB0_17:
	ldr	w2, [x21]
	mov	x0, x19
	mov	w1, #1
	bl	_arcturus_upload_dpm_level
	mov	x20, x0
	cbz	w0, LBB0_20
; %bb.18:
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_19:
	bl	_pr_err
LBB0_20:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_8-LBB0_5)>>2
	.byte	(LBB0_10-LBB0_5)>>2
	.byte	(LBB0_12-LBB0_5)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Clock level specified %d is over max allowed %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FEATURE_DPM_GFXCLK_MASK,4,2    ; @FEATURE_DPM_GFXCLK_MASK
l_.str.1:                               ; @.str.1
	.asciz	"Failed to upload boot level to lowest!\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to upload dpm max level to highest!\n"

	.comm	_FEATURE_DPM_UCLK_MASK,4,2      ; @FEATURE_DPM_UCLK_MASK
	.comm	_FEATURE_DPM_SOCCLK_MASK,4,2    ; @FEATURE_DPM_SOCCLK_MASK
	.comm	_FEATURE_DPM_FCLK_MASK,4,2      ; @FEATURE_DPM_FCLK_MASK
	.no_dead_strip	_arcturus_force_clk_levels
.subsections_via_symbols
