	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu7_find_dpm_states_clocks_in_dpm_table
_smu7_find_dpm_states_clocks_in_dpm_table: ## @smu7_find_dpm_states_clocks_in_dpm_table
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	(%rsi), %edi
	callq	_cast_const_phw_smu7_power_state
	movq	8(%r14), %rcx
	movq	8(%rax), %rsi
	movslq	(%rax), %rax
	shlq	$4, %rax
	movq	-16(%rax,%rsi), %rdx
	movq	-8(%rax,%rsi), %rax
	movq	40(%rcx), %rdi
	movq	48(%rcx), %rsi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%rsi,%rbx,8), %rdx
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	%rbx, %rdi
	jne	LBB0_3
## %bb.5:
	decq	%rdi
	cmpq	(%rsi,%rdi,8), %rdx
	ja	LBB0_7
	jmp	LBB0_12
LBB0_1:
	movq	$-1, %rdi
	cmpq	(%rsi,%rdi,8), %rdx
	jbe	LBB0_12
LBB0_7:
	movq	_DPMTABLE_OD_UPDATE_SCLK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ebx
	orl	%ebx, (%rcx)
	movq	%rdx, (%rsi,%rdi,8)
	jmp	LBB0_12
LBB0_8:
	movq	8(%rcx), %rdx
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.9:
	movq	_SMU7_MINIMUM_ENGINE_CLOCK@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	testq	%rsi, %rsi
	jle	LBB0_11
## %bb.10:
	cmpq	%rsi, %rdx
	jl	LBB0_12
LBB0_11:
	movq	_DPMTABLE_UPDATE_SCLK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%edx, (%rcx)
LBB0_12:
	movq	24(%rcx), %rsi
	movq	32(%rcx), %rdx
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.14:
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	cmpq	(%rdx,%rdi,8), %rax
	je	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	incq	%rdi
	cmpq	%rdi, %rsi
	jne	LBB0_15
## %bb.17:
	decq	%rsi
	cmpq	(%rdx,%rsi,8), %rax
	ja	LBB0_19
	jmp	LBB0_20
LBB0_13:
	movq	$-1, %rsi
	cmpq	(%rdx,%rsi,8), %rax
	jbe	LBB0_20
LBB0_19:
	movq	_DPMTABLE_OD_UPDATE_MCLK@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	orl	%edi, (%rcx)
	movq	%rax, (%rdx,%rsi,8)
LBB0_20:
	movq	16(%rcx), %rax
	movq	(%r14), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_22
## %bb.21:
	movq	_DPMTABLE_UPDATE_MCLK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rcx)
LBB0_22:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DPMTABLE_OD_UPDATE_SCLK,4,2    ## @DPMTABLE_OD_UPDATE_SCLK
	.comm	_SMU7_MINIMUM_ENGINE_CLOCK,8,3  ## @SMU7_MINIMUM_ENGINE_CLOCK
	.comm	_DPMTABLE_UPDATE_SCLK,4,2       ## @DPMTABLE_UPDATE_SCLK
	.comm	_DPMTABLE_OD_UPDATE_MCLK,4,2    ## @DPMTABLE_OD_UPDATE_MCLK
	.comm	_DPMTABLE_UPDATE_MCLK,4,2       ## @DPMTABLE_UPDATE_MCLK
	.no_dead_strip	_smu7_find_dpm_states_clocks_in_dpm_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smu7_find_dpm_states_clocks_in_dpm_table
_smu7_find_dpm_states_clocks_in_dpm_table: ; @smu7_find_dpm_states_clocks_in_dpm_table
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x1]
	bl	_cast_const_phw_smu7_power_state
	ldr	x8, [x19, #8]
	ldr	x9, [x0, #8]
	ldrsw	x10, [x0]
	add	x9, x9, x10, lsl #4
	ldp	x10, x9, [x9, #-16]
	ldp	x12, x11, [x8, #40]
	cbz	x12, LBB0_5
; %bb.1:
	mov	x13, x11
	mov	x14, x12
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x15, [x13]
	cmp	x10, x15
	b.eq	LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x13, x13, #8
	subs	x14, x14, #1
	b.ne	LBB0_2
; %bb.4:
	sub	x12, x12, #1
	b	LBB0_6
LBB0_5:
	mov	x12, #-1
LBB0_6:
	ldr	x13, [x11, x12, lsl #3]
	cmp	x10, x13
	b.ls	LBB0_11
; %bb.7:
Lloh0:
	adrp	x13, _DPMTABLE_OD_UPDATE_SCLK@GOTPAGE
Lloh1:
	ldr	x13, [x13, _DPMTABLE_OD_UPDATE_SCLK@GOTPAGEOFF]
Lloh2:
	ldr	w13, [x13]
	ldr	w14, [x8]
	orr	w13, w14, w13
	str	w13, [x8]
	str	x10, [x11, x12, lsl #3]
	b	LBB0_11
LBB0_8:
	ldr	x10, [x8, #8]
	cbz	x10, LBB0_11
; %bb.9:
Lloh3:
	adrp	x11, _SMU7_MINIMUM_ENGINE_CLOCK@GOTPAGE
Lloh4:
	ldr	x11, [x11, _SMU7_MINIMUM_ENGINE_CLOCK@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	cmp	x11, #1
	ccmp	x10, x11, #0, ge
	b.lt	LBB0_11
; %bb.10:
Lloh6:
	adrp	x10, _DPMTABLE_UPDATE_SCLK@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DPMTABLE_UPDATE_SCLK@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	ldr	w11, [x8]
	orr	w10, w11, w10
	str	w10, [x8]
LBB0_11:
	ldp	x11, x10, [x8, #24]
	cbz	x11, LBB0_16
; %bb.12:
	mov	x12, x10
	mov	x13, x11
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x12]
	cmp	x9, x14
	b.eq	LBB0_19
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x12, x12, #8
	subs	x13, x13, #1
	b.ne	LBB0_13
; %bb.15:
	sub	x11, x11, #1
	b	LBB0_17
LBB0_16:
	mov	x11, #-1
LBB0_17:
	ldr	x12, [x10, x11, lsl #3]
	cmp	x9, x12
	b.ls	LBB0_19
; %bb.18:
Lloh9:
	adrp	x12, _DPMTABLE_OD_UPDATE_MCLK@GOTPAGE
Lloh10:
	ldr	x12, [x12, _DPMTABLE_OD_UPDATE_MCLK@GOTPAGEOFF]
Lloh11:
	ldr	w12, [x12]
	ldr	w13, [x8]
	orr	w12, w13, w12
	str	w12, [x8]
	str	x9, [x10, x11, lsl #3]
LBB0_19:
	ldr	x9, [x8, #16]
	ldr	x10, [x19]
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_21
; %bb.20:
Lloh12:
	adrp	x9, _DPMTABLE_UPDATE_MCLK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DPMTABLE_UPDATE_MCLK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	ldr	w10, [x8]
	orr	w9, w10, w9
	str	w9, [x8]
LBB0_21:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_DPMTABLE_OD_UPDATE_SCLK,4,2    ; @DPMTABLE_OD_UPDATE_SCLK
	.comm	_SMU7_MINIMUM_ENGINE_CLOCK,8,3  ; @SMU7_MINIMUM_ENGINE_CLOCK
	.comm	_DPMTABLE_UPDATE_SCLK,4,2       ; @DPMTABLE_UPDATE_SCLK
	.comm	_DPMTABLE_OD_UPDATE_MCLK,4,2    ; @DPMTABLE_OD_UPDATE_MCLK
	.comm	_DPMTABLE_UPDATE_MCLK,4,2       ; @DPMTABLE_UPDATE_MCLK
	.no_dead_strip	_smu7_find_dpm_states_clocks_in_dpm_table
.subsections_via_symbols
