	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu8_init_uvd_limit
_smu8_init_uvd_limit:                   ## @smu8_init_uvd_limit
	.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
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	cmpq	$0, (%r14)
	je	LBB0_2
## %bb.3:
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r15)
	movq	_PPSMC_MSG_GetMaxUvdLevel@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_smum_send_msg_to_smc
	movq	%rbx, %rdi
	callq	_smum_get_argument
	movq	(%r14), %rcx
	movq	8(%r14), %rdx
	leaq	-1(%rcx), %rsi
	cmpq	%rcx, %rax
	cmovbq	%rax, %rsi
	movq	(%rdx,%rsi,8), %rax
	movq	%rax, (%r15)
	movq	%rax, 8(%r15)
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PPSMC_MSG_GetMaxUvdLevel,4,2   ## @PPSMC_MSG_GetMaxUvdLevel
	.no_dead_strip	_smu8_init_uvd_limit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smu8_init_uvd_limit
_smu8_init_uvd_limit:                   ; @smu8_init_uvd_limit
	.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
	ldr	x20, [x0]
	cbz	x20, LBB0_3
; %bb.1:
	ldr	x8, [x20]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x19, x0
	ldr	x21, [x0, #8]
	stp	xzr, xzr, [x21, #16]
Lloh0:
	adrp	x8, _PPSMC_MSG_GetMaxUvdLevel@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PPSMC_MSG_GetMaxUvdLevel@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_smum_send_msg_to_smc
	mov	x0, x19
	bl	_smum_get_argument
	mov	x8, x0
	mov	w0, #0
	ldp	x9, x10, [x20]
	sub	x11, x9, #1
	cmp	x8, x9
	csel	x8, x8, x11, lo
	ldr	x8, [x10, x8, lsl #3]
	stp	x8, x8, [x21]
	b	LBB0_4
LBB0_3:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PPSMC_MSG_GetMaxUvdLevel,4,2   ; @PPSMC_MSG_GetMaxUvdLevel
	.no_dead_strip	_smu8_init_uvd_limit
.subsections_via_symbols
