	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vega10_find_dpm_states_clocks_in_dpm_table
_vega10_find_dpm_states_clocks_in_dpm_table: ## @vega10_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
	movq	8(%rdi), %rbx
	movl	(%rsi), %edi
	callq	_cast_const_phw_vega10_power_state
	movq	8(%rax), %rdx
	movslq	(%rax), %rax
	shlq	$4, %rax
	movq	-16(%rax,%rdx), %rcx
	movq	-8(%rax,%rdx), %rax
	movq	32(%rbx), %rsi
	movq	40(%rbx), %rdx
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%rdx,%rdi,8), %rcx
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdi
	cmpq	%rdi, %rsi
	jne	LBB0_3
## %bb.5:
	decq	%rsi
	cmpq	(%rdx,%rsi,8), %rcx
	ja	LBB0_7
	jmp	LBB0_8
LBB0_1:
	movq	$-1, %rsi
	cmpq	(%rdx,%rsi,8), %rcx
	jbe	LBB0_8
LBB0_7:
	movq	_DPMTABLE_OD_UPDATE_SCLK@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	orl	%edi, (%rbx)
	movq	%rcx, (%rdx,%rsi,8)
LBB0_8:
	movq	16(%rbx), %rdx
	movq	24(%rbx), %rcx
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.10:
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpq	(%rcx,%rsi,8), %rax
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	incq	%rsi
	cmpq	%rsi, %rdx
	jne	LBB0_11
## %bb.13:
	decq	%rdx
	cmpq	(%rcx,%rdx,8), %rax
	ja	LBB0_15
	jmp	LBB0_16
LBB0_9:
	movq	$-1, %rdx
	cmpq	(%rcx,%rdx,8), %rax
	jbe	LBB0_16
LBB0_15:
	movq	_DPMTABLE_OD_UPDATE_MCLK@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	%esi, (%rbx)
	movq	%rax, (%rcx,%rdx,8)
LBB0_16:
	movq	8(%rbx), %rax
	movq	(%r14), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_18
## %bb.17:
	movq	_DPMTABLE_UPDATE_MCLK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_18:
	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	_DPMTABLE_OD_UPDATE_MCLK,4,2    ## @DPMTABLE_OD_UPDATE_MCLK
	.comm	_DPMTABLE_UPDATE_MCLK,4,2       ## @DPMTABLE_UPDATE_MCLK
	.no_dead_strip	_vega10_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 vega10_find_dpm_states_clocks_in_dpm_table
_vega10_find_dpm_states_clocks_in_dpm_table: ; @vega10_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	x20, [x0, #8]
	ldr	w0, [x1]
	bl	_cast_const_phw_vega10_power_state
	ldr	x8, [x0, #8]
	ldrsw	x9, [x0]
	add	x8, x8, x9, lsl #4
	ldp	x9, x8, [x8, #-16]
	ldp	x11, x10, [x20, #32]
	cbz	x11, LBB0_5
; %bb.1:
	mov	x12, x10
	mov	x13, x11
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x12]
	cmp	x9, x14
	b.eq	LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x12, x12, #8
	subs	x13, x13, #1
	b.ne	LBB0_2
; %bb.4:
	sub	x11, x11, #1
	b	LBB0_6
LBB0_5:
	mov	x11, #-1
LBB0_6:
	ldr	x12, [x10, x11, lsl #3]
	cmp	x9, x12
	b.ls	LBB0_8
; %bb.7:
Lloh0:
	adrp	x12, _DPMTABLE_OD_UPDATE_SCLK@GOTPAGE
Lloh1:
	ldr	x12, [x12, _DPMTABLE_OD_UPDATE_SCLK@GOTPAGEOFF]
Lloh2:
	ldr	w12, [x12]
	ldr	w13, [x20]
	orr	w12, w13, w12
	str	w12, [x20]
	str	x9, [x10, x11, lsl #3]
LBB0_8:
	ldp	x10, x9, [x20, #16]
	cbz	x10, LBB0_13
; %bb.9:
	mov	x11, x9
	mov	x12, x10
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x11]
	cmp	x8, x13
	b.eq	LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x11, x11, #8
	subs	x12, x12, #1
	b.ne	LBB0_10
; %bb.12:
	sub	x10, x10, #1
	b	LBB0_14
LBB0_13:
	mov	x10, #-1
LBB0_14:
	ldr	x11, [x9, x10, lsl #3]
	cmp	x8, x11
	b.ls	LBB0_16
; %bb.15:
Lloh3:
	adrp	x11, _DPMTABLE_OD_UPDATE_MCLK@GOTPAGE
Lloh4:
	ldr	x11, [x11, _DPMTABLE_OD_UPDATE_MCLK@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	ldr	w12, [x20]
	orr	w11, w12, w11
	str	w11, [x20]
	str	x8, [x9, x10, lsl #3]
LBB0_16:
	ldr	x8, [x20, #8]
	ldr	x9, [x19]
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_18
; %bb.17:
Lloh6:
	adrp	x8, _DPMTABLE_UPDATE_MCLK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DPMTABLE_UPDATE_MCLK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_18:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_DPMTABLE_OD_UPDATE_SCLK,4,2    ; @DPMTABLE_OD_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	_vega10_find_dpm_states_clocks_in_dpm_table
.subsections_via_symbols
