	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dm_pp_get_clock_levels_by_type ## -- Begin function dm_pp_get_clock_levels_by_type
	.p2align	4, 0x90
_dm_pp_get_clock_levels_by_type:        ## @dm_pp_get_clock_levels_by_type
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	(%rdi), %rbx
	movq	16(%rbx), %r12
	movl	$0, -48(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	8(%rax), %r13
	testq	%r13, %r13
	je	LBB0_6
## %bb.2:
	movl	%r15d, %edi
	callq	_dc_to_pp_clock_type
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	*%r13
	testq	%rax, %rax
	jne	LBB0_28
	jmp	LBB0_3
LBB0_6:
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.7:
	cmpq	$0, 8(%rax)
	je	LBB0_3
## %bb.8:
	movl	%r15d, %edi
	callq	_dc_to_pp_clock_type
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_smu_get_clock_by_type
	testq	%rax, %rax
	je	LBB0_3
## %bb.9:
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_get_default_clock_levels
	jmp	LBB0_28
LBB0_3:
	leaq	-48(%rbp), %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_pp_to_dc_clock_levels
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	leaq	-64(%rbp), %rsi
	movq	%r12, %rdi
	callq	*%rax
	testq	%rax, %rax
	jne	LBB0_14
	jmp	LBB0_15
LBB0_10:
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.12:
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_smu_get_max_high_clocks
	testq	%rax, %rax
	je	LBB0_15
LBB0_14:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_INFO
	movl	$72000, -64(%rbp)               ## imm = 0x11940
	movq	$80000, -60(%rbp)               ## imm = 0x13880
LBB0_15:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_INFO
	movl	-64(%rbp), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_INFO
	movl	-60(%rbp), %esi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_INFO
	movl	-56(%rbp), %esi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_INFO
	movl	-64(%rbp), %eax
	movl	-60(%rbp), %ecx
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	movl	%eax, -64(%rbp)
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,4), %ecx
	movl	%ecx, -60(%rbp)
	movq	_DM_PP_CLOCK_TYPE_ENGINE_CLK@GOTPCREL(%rip), %rdx
	cmpl	%r15d, (%rdx)
	jne	LBB0_22
## %bb.16:
	movq	(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_28
## %bb.17:
	movq	8(%r14), %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%eax, (%rcx,%rbx,4)
	jg	LBB0_19
## %bb.21:                              ##   in Loop: Header=BB0_18 Depth=1
	incq	%rbx
	cmpq	%rbx, %rsi
	jne	LBB0_18
	jmp	LBB0_28
LBB0_22:
	movq	_DM_PP_CLOCK_TYPE_MEMORY_CLK@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_28
## %bb.23:
	movq	(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_28
## %bb.24:
	movq	8(%r14), %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%ecx, (%rax,%rbx,4)
	jg	LBB0_26
## %bb.27:                              ##   in Loop: Header=BB0_25 Depth=1
	incq	%rbx
	cmpq	%rbx, %rsi
	jne	LBB0_25
	jmp	LBB0_28
LBB0_19:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_20
LBB0_26:
	leaq	L_.str.6(%rip), %rdi
LBB0_20:
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_DRM_INFO
	testq	%rbx, %rbx
	movl	$1, %eax
	cmovneq	%rbx, %rax
	movq	%rax, (%r14)
LBB0_28:
	movl	$1, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DM_PPLIB: Warning: using default validation clocks!\n"

L_.str.1:                               ## @.str.1
	.asciz	"DM_PPLIB: Validation clocks:\n"

L_.str.2:                               ## @.str.2
	.asciz	"DM_PPLIB:    engine_max_clock: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"DM_PPLIB:    memory_max_clock: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"DM_PPLIB:    level           : %d\n"

	.comm	_DM_PP_CLOCK_TYPE_ENGINE_CLK,4,2 ## @DM_PP_CLOCK_TYPE_ENGINE_CLK
L_.str.5:                               ## @.str.5
	.asciz	"DM_PPLIB: reducing engine clock level from %d to %d\n"

	.comm	_DM_PP_CLOCK_TYPE_MEMORY_CLK,4,2 ## @DM_PP_CLOCK_TYPE_MEMORY_CLK
L_.str.6:                               ## @.str.6
	.asciz	"DM_PPLIB: reducing memory clock level from %d to %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function dm_pp_get_clock_levels_by_type
lCPI0_0:
	.long	80000                           ; 0x13880
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_dm_pp_get_clock_levels_by_type
	.p2align	2
_dm_pp_get_clock_levels_by_type:        ; @dm_pp_get_clock_levels_by_type
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x2
	mov	x20, x1
	ldr	x21, [x0]
	str	wzr, [sp, #40]
	stp	xzr, xzr, [sp, #24]
	ldp	x8, x22, [x21, #8]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x23, [x8, #8]
	cbz	x23, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_dc_to_pp_clock_type
	mov	x1, x0
	add	x2, sp, #40
	mov	x0, x22
	blr	x23
	cbnz	x0, LBB0_27
	b	LBB0_7
LBB0_3:
	ldr	x8, [x21]
	cbz	x8, LBB0_7
; %bb.4:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_dc_to_pp_clock_type
	mov	x1, x0
	add	x2, sp, #40
	mov	x0, x21
	bl	_smu_get_clock_by_type
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x20
	mov	x1, x19
	bl	_get_default_clock_levels
	b	LBB0_27
LBB0_7:
	add	x0, sp, #40
	mov	x1, x19
	mov	x2, x20
	bl	_pp_to_dc_clock_levels
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_10
; %bb.8:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.9:
	add	x1, sp, #24
	mov	x0, x22
	blr	x8
	cbnz	x0, LBB0_13
	b	LBB0_14
LBB0_10:
	ldr	x8, [x21]
	cbz	x8, LBB0_14
; %bb.11:
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.12:
	add	x1, sp, #24
	mov	x0, x21
	bl	_smu_get_max_high_clocks
	cbz	x0, LBB0_14
LBB0_13:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_INFO
	mov	w8, #6464
	movk	w8, #1, lsl #16
	str	w8, [sp, #24]
Lloh2:
	adrp	x8, lCPI0_0@PAGE
Lloh3:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [sp, #28]
LBB0_14:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_INFO
	ldr	w8, [sp, #24]
	str	x8, [sp]
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_INFO
	ldr	w8, [sp, #28]
	str	x8, [sp]
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_INFO
	ldr	w8, [sp, #32]
	str	x8, [sp]
Lloh10:
	adrp	x0, l_.str.4@PAGE
Lloh11:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_INFO
	ldp	w8, w10, [sp, #24]
	add	w8, w8, w8, lsl #2
	lsl	w9, w8, #1
	add	w8, w10, w10, lsl #2
	lsl	w8, w8, #1
	stp	w9, w8, [sp, #24]
Lloh12:
	adrp	x10, _DM_PP_CLOCK_TYPE_ENGINE_CLK@GOTPAGE
Lloh13:
	ldr	x10, [x10, _DM_PP_CLOCK_TYPE_ENGINE_CLK@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	cmp	w10, w20
	b.ne	LBB0_19
; %bb.15:
	ldr	x8, [x19]
	cbz	x8, LBB0_27
; %bb.16:
	mov	x20, #0
	ldr	x10, [x19, #8]
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, x20, lsl #2]
	cmp	w11, w9
	b.gt	LBB0_24
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	add	x20, x20, #1
	cmp	x8, x20
	b.ne	LBB0_17
	b	LBB0_27
LBB0_19:
Lloh15:
	adrp	x9, _DM_PP_CLOCK_TYPE_MEMORY_CLK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DM_PP_CLOCK_TYPE_MEMORY_CLK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w9, w20
	b.ne	LBB0_27
; %bb.20:
	ldr	x9, [x19]
	cbz	x9, LBB0_27
; %bb.21:
	mov	x20, #0
	ldr	x10, [x19, #8]
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, x20, lsl #2]
	cmp	w11, w8
	b.gt	LBB0_25
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	add	x20, x20, #1
	cmp	x9, x20
	b.ne	LBB0_22
	b	LBB0_27
LBB0_24:
	stp	x8, x20, [sp]
Lloh18:
	adrp	x0, l_.str.5@PAGE
Lloh19:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_26
LBB0_25:
	stp	x9, x20, [sp]
Lloh20:
	adrp	x0, l_.str.6@PAGE
Lloh21:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_26:
	bl	_DRM_INFO
	cmp	x20, #0
	csinc	x8, x20, xzr, ne
	str	x8, [x19]
LBB0_27:
	mov	w0, #1
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DM_PPLIB: Warning: using default validation clocks!\n"

l_.str.1:                               ; @.str.1
	.asciz	"DM_PPLIB: Validation clocks:\n"

l_.str.2:                               ; @.str.2
	.asciz	"DM_PPLIB:    engine_max_clock: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"DM_PPLIB:    memory_max_clock: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"DM_PPLIB:    level           : %d\n"

	.comm	_DM_PP_CLOCK_TYPE_ENGINE_CLK,4,2 ; @DM_PP_CLOCK_TYPE_ENGINE_CLK
l_.str.5:                               ; @.str.5
	.asciz	"DM_PPLIB: reducing engine clock level from %d to %d\n"

	.comm	_DM_PP_CLOCK_TYPE_MEMORY_CLK,4,2 ; @DM_PP_CLOCK_TYPE_MEMORY_CLK
l_.str.6:                               ; @.str.6
	.asciz	"DM_PPLIB: reducing memory clock level from %d to %d\n"

.subsections_via_symbols
