	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vega20_display_config_changed
_vega20_display_config_changed:         ## @vega20_display_config_changed
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %eax
	movq	_WATERMARKS_EXIST@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	testl	%eax, (%r12)
	je	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	movq	_WATERMARKS_LOADED@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	je	LBB0_2
LBB0_5:
	movq	_SMU_FEATURE_DPM_DCEFCLK_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_smu_feature_is_supported
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	_SMU_FEATURE_DPM_SOCCLK_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_smu_feature_is_supported
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_SMU_MSG_NumOfDisplays@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_smu_send_smc_msg_with_param
	jmp	LBB0_8
LBB0_2:
	movq	%rbx, %rdi
	callq	_smu_write_watermarks_table
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movl	%r15d, %r14d
	jmp	LBB0_8
LBB0_4:
	movl	(%rbx), %eax
	orl	(%r13), %eax
	movl	%eax, (%rbx)
	testl	%eax, (%r12)
	jne	LBB0_5
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WATERMARKS_EXIST,4,2           ## @WATERMARKS_EXIST
	.comm	_WATERMARKS_LOADED,4,2          ## @WATERMARKS_LOADED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to update WMTABLE!"

	.comm	_SMU_FEATURE_DPM_DCEFCLK_BIT,4,2 ## @SMU_FEATURE_DPM_DCEFCLK_BIT
	.comm	_SMU_FEATURE_DPM_SOCCLK_BIT,4,2 ## @SMU_FEATURE_DPM_SOCCLK_BIT
	.comm	_SMU_MSG_NumOfDisplays,4,2      ## @SMU_MSG_NumOfDisplays
	.no_dead_strip	_vega20_display_config_changed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vega20_display_config_changed
_vega20_display_config_changed:         ; @vega20_display_config_changed
	.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	w8, [x0]
Lloh0:
	adrp	x21, _WATERMARKS_EXIST@GOTPAGE
Lloh1:
	ldr	x21, [x21, _WATERMARKS_EXIST@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x22, _WATERMARKS_LOADED@GOTPAGE
Lloh3:
	ldr	x22, [x22, _WATERMARKS_LOADED@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_7
LBB0_2:
Lloh4:
	adrp	x8, _SMU_FEATURE_DPM_DCEFCLK_BIT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SMU_FEATURE_DPM_DCEFCLK_BIT@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_smu_feature_is_supported
	cbz	x0, LBB0_5
; %bb.3:
Lloh7:
	adrp	x8, _SMU_FEATURE_DPM_SOCCLK_BIT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SMU_FEATURE_DPM_SOCCLK_BIT@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_smu_feature_is_supported
	cbz	x0, LBB0_5
; %bb.4:
Lloh10:
	adrp	x8, _SMU_MSG_NumOfDisplays@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SMU_MSG_NumOfDisplays@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	x8, [x19, #8]
	ldr	w2, [x8]
	mov	x0, x19
	bl	_smu_send_smc_msg_with_param
LBB0_5:
	mov	w20, #0
LBB0_6:
	mov	x0, x20
	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
LBB0_7:
	mov	x0, x19
	bl	_smu_write_watermarks_table
	cbz	w0, LBB0_9
; %bb.8:
	mov	x20, x0
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_6
LBB0_9:
	ldr	w8, [x22]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	w9, [x21]
	tst	w9, w8
	b.ne	LBB0_2
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_WATERMARKS_EXIST,4,2           ; @WATERMARKS_EXIST
	.comm	_WATERMARKS_LOADED,4,2          ; @WATERMARKS_LOADED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to update WMTABLE!"

	.comm	_SMU_FEATURE_DPM_DCEFCLK_BIT,4,2 ; @SMU_FEATURE_DPM_DCEFCLK_BIT
	.comm	_SMU_FEATURE_DPM_SOCCLK_BIT,4,2 ; @SMU_FEATURE_DPM_SOCCLK_BIT
	.comm	_SMU_MSG_NumOfDisplays,4,2      ; @SMU_MSG_NumOfDisplays
	.no_dead_strip	_vega20_display_config_changed
.subsections_via_symbols
