	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vega10_set_mclk_od
_vega10_set_mclk_od:                    ## @vega10_set_mclk_od
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movl	%esi, %ebx
	movq	16(%r14), %r15
	callq	_cast_phw_vega10_power_state
	movq	8(%r15), %rcx
	movslq	(%r15), %rdx
	movl	-4(%rcx,%rdx,4), %ecx
	imull	%ecx, %ebx
	movslq	%ebx, %rdx
	imulq	$1374389535, %rdx, %rdx         ## imm = 0x51EB851F
	movq	%rdx, %rsi
	shrq	$63, %rsi
	sarq	$37, %rdx
	addl	%esi, %edx
	addl	%ecx, %edx
	movq	8(%rax), %rcx
	movslq	(%rax), %rax
	movl	%edx, -4(%rcx,%rax,4)
	movl	(%r14), %esi
	xorl	%ebx, %ebx
	cmpl	%esi, %edx
	jle	LBB0_4
## %bb.3:
	movl	%esi, -4(%rcx,%rax,4)
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
	jmp	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"max mclk supported by vbios is %d\n"

	.no_dead_strip	_vega10_set_mclk_od
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vega10_set_mclk_od
_vega10_set_mclk_od:                    ; @vega10_set_mclk_od
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	ldr	x0, [x0, #8]
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x1
	ldr	x21, [x19, #16]
	bl	_cast_phw_vega10_power_state
	ldr	x8, [x21, #8]
	ldrsw	x9, [x21]
	add	x8, x8, x9, lsl #2
	ldur	w8, [x8, #-4]
	mul	w9, w8, w20
	mov	w10, #34079
	movk	w10, #20971, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	asr	x9, x9, #37
	add	w9, w9, w10
	add	w10, w9, w8
	ldr	x8, [x0, #8]
	ldrsw	x9, [x0]
	sub	x9, x9, #1
	str	w10, [x8, x9, lsl #2]
	ldr	w1, [x19]
	cmp	w10, w1
	b.le	LBB0_3
; %bb.2:
	str	w1, [x8, x9, lsl #2]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"max mclk supported by vbios is %d\n"

	.no_dead_strip	_vega10_set_mclk_od
.subsections_via_symbols
