	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fiji_update_uvd_smc_table
_fiji_update_uvd_smc_table:             ## @fiji_update_uvd_smc_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	16(%rdi), %r15
	movl	$0, (%r15)
	movq	(%rax), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_2
## %bb.1:
	decl	%eax
	movl	%eax, (%r15)
LBB0_2:
	movl	4(%r15), %r12d
	movq	_SMU73_Discrete_DpmTable@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_UvdBootLevel@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_offsetof
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%r12), %ebx
	addl	$3, %ebx
                                        ## kill: def $eax killed $eax killed $rax
	addl	%r12d, %eax
	cmovnsl	%eax, %ebx
	andl	$-4, %ebx
	movl	4(%r14), %edi
	movq	_CGS_IND_REG__SMC@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	%ebx, %edx
	callq	_cgs_read_ind_register
	andl	$16777215, %eax                 ## imm = 0xFFFFFF
	movl	(%r15), %ecx
	shll	$24, %ecx
	orl	%eax, %ecx
	movl	4(%r14), %edi
	movl	(%r12), %esi
	movl	%ebx, %edx
	callq	_cgs_write_ind_register
	movl	(%r14), %edi
	movq	_PHM_PlatformCaps_UVDDPM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_phm_cap_enabled
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r14), %edi
	movq	_PHM_PlatformCaps_StablePState@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_phm_cap_enabled
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movq	_PPSMC_MSG_UVDDPM_SetEnabledMask@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movb	(%r15), %cl
	movl	$1, %edx
	shll	%cl, %edx
	movq	%r14, %rdi
	callq	_smum_send_msg_to_smc_with_parameter
LBB0_5:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMU73_Discrete_DpmTable,4,2    ## @SMU73_Discrete_DpmTable
	.comm	_UvdBootLevel,4,2               ## @UvdBootLevel
	.comm	_CGS_IND_REG__SMC,4,2           ## @CGS_IND_REG__SMC
	.comm	_PHM_PlatformCaps_UVDDPM,4,2    ## @PHM_PlatformCaps_UVDDPM
	.comm	_PHM_PlatformCaps_StablePState,4,2 ## @PHM_PlatformCaps_StablePState
	.comm	_PPSMC_MSG_UVDDPM_SetEnabledMask,4,2 ## @PPSMC_MSG_UVDDPM_SetEnabledMask
	.no_dead_strip	_fiji_update_uvd_smc_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fiji_update_uvd_smc_table
_fiji_update_uvd_smc_table:             ; @fiji_update_uvd_smc_table
	.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
	ldp	x8, x21, [x0, #8]
	str	wzr, [x21]
	ldr	x8, [x8]
	ldr	w8, [x8]
	subs	w8, w8, #1
	b.lt	LBB0_2
; %bb.1:
	str	w8, [x21]
LBB0_2:
	ldr	w20, [x21, #4]
Lloh0:
	adrp	x8, _SMU73_Discrete_DpmTable@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMU73_Discrete_DpmTable@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _UvdBootLevel@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UvdBootLevel@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_offsetof
	add	w8, w0, w20
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	and	w20, w8, #0xfffffffc
	ldr	w0, [x19, #4]
Lloh6:
	adrp	x22, _CGS_IND_REG__SMC@GOTPAGE
Lloh7:
	ldr	x22, [x22, _CGS_IND_REG__SMC@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x2, x20
	bl	_cgs_read_ind_register
	mov	x3, x0
	ldr	w8, [x21]
	bfi	w3, w8, #24, #8
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	mov	x2, x20
	bl	_cgs_write_ind_register
	ldr	w0, [x19]
Lloh8:
	adrp	x8, _PHM_PlatformCaps_UVDDPM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PHM_PlatformCaps_UVDDPM@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_phm_cap_enabled
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh11:
	adrp	x8, _PHM_PlatformCaps_StablePState@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PHM_PlatformCaps_StablePState@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_phm_cap_enabled
	cbz	x0, LBB0_5
LBB0_4:
Lloh14:
	adrp	x8, _PPSMC_MSG_UVDDPM_SetEnabledMask@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PPSMC_MSG_UVDDPM_SetEnabledMask@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	w8, [x21]
	mov	w9, #1
	lsl	w2, w9, w8
	mov	x0, x19
	bl	_smum_send_msg_to_smc_with_parameter
LBB0_5:
	mov	w0, #0
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SMU73_Discrete_DpmTable,4,2    ; @SMU73_Discrete_DpmTable
	.comm	_UvdBootLevel,4,2               ; @UvdBootLevel
	.comm	_CGS_IND_REG__SMC,4,2           ; @CGS_IND_REG__SMC
	.comm	_PHM_PlatformCaps_UVDDPM,4,2    ; @PHM_PlatformCaps_UVDDPM
	.comm	_PHM_PlatformCaps_StablePState,4,2 ; @PHM_PlatformCaps_StablePState
	.comm	_PPSMC_MSG_UVDDPM_SetEnabledMask,4,2 ; @PPSMC_MSG_UVDDPM_SetEnabledMask
	.no_dead_strip	_fiji_update_uvd_smc_table
.subsections_via_symbols
