	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_hdmi_output_set_display_mode
_mtk_hdmi_output_set_display_mode:      ## @mtk_hdmi_output_set_display_mode
	.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	%rsi, %r15
	movq	%rdi, %rbx
	movl	$1, %esi
	callq	_mtk_hdmi_hw_vid_black
	movq	%rbx, %rdi
	callq	_mtk_hdmi_hw_aud_mute
	movq	%rbx, %rdi
	callq	_mtk_hdmi_hw_send_av_mute
	movl	(%rbx), %edi
	callq	_phy_power_off
	imull	$1000, (%r15), %esi             ## imm = 0x3E8
	movq	%rbx, %rdi
	callq	_mtk_hdmi_video_change_vpll
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_mtk_hdmi_video_set_display_mode
	movl	(%rbx), %edi
	callq	_phy_power_on
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_mtk_hdmi_aud_output_config
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_mtk_hdmi_hw_vid_black
	movq	%rbx, %rdi
	callq	_mtk_hdmi_hw_aud_unmute
	movq	%rbx, %rdi
	callq	_mtk_hdmi_hw_send_av_unmute
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to set vpll: %d\n"

	.no_dead_strip	_mtk_hdmi_output_set_display_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_hdmi_output_set_display_mode
_mtk_hdmi_output_set_display_mode:      ; @mtk_hdmi_output_set_display_mode
	.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	x20, x1
	mov	x19, x0
	mov	w1, #1
	bl	_mtk_hdmi_hw_vid_black
	mov	x0, x19
	bl	_mtk_hdmi_hw_aud_mute
	mov	x0, x19
	bl	_mtk_hdmi_hw_send_av_mute
	ldr	w0, [x19]
	bl	_phy_power_off
	ldr	w8, [x20]
	mov	w9, #1000
	mul	w1, w8, w9
	mov	x0, x19
	bl	_mtk_hdmi_video_change_vpll
	mov	x21, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	mov	x1, x20
	bl	_mtk_hdmi_video_set_display_mode
	ldr	w0, [x19]
	bl	_phy_power_on
	mov	x0, x19
	mov	x1, x20
	bl	_mtk_hdmi_aud_output_config
	mov	x0, x19
	mov	w1, #0
	bl	_mtk_hdmi_hw_vid_black
	mov	x0, x19
	bl	_mtk_hdmi_hw_aud_unmute
	mov	x0, x19
	bl	_mtk_hdmi_hw_send_av_unmute
LBB0_3:
	mov	x0, x21
	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
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to set vpll: %d\n"

	.no_dead_strip	_mtk_hdmi_output_set_display_mode
.subsections_via_symbols
