	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_drm_hdmi_probe
_mtk_drm_hdmi_probe:                    ## @mtk_drm_hdmi_probe
	.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	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$32, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r14, 24(%rax)
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_mtk_hdmi_dt_parse_pdata
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_phy_get
	movl	%eax, 16(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	16(%r15), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	movq	%r15, %rdi
	callq	_mtk_hdmi_output_init
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_7:
	movq	%r14, %rdi
	callq	_mtk_hdmi_register_audio_driver
	movq	_mtk_hdmi_bridge_funcs@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r15)
	movl	(%r14), %eax
	movl	%eax, (%r15)
	movq	%r15, %rdi
	callq	_drm_bridge_add
	movq	%r15, %rdi
	callq	_mtk_hdmi_clk_enable_audio
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r15, %rdi
	callq	_drm_bridge_remove
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hdmi"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to get HDMI PHY: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to initialize hdmi output\n"

	.comm	_mtk_hdmi_bridge_funcs,4,2      ## @mtk_hdmi_bridge_funcs
L_.str.3:                               ## @.str.3
	.asciz	"Failed to enable audio clocks: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"mediatek hdmi probe success\n"

	.no_dead_strip	_mtk_drm_hdmi_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_drm_hdmi_probe
_mtk_drm_hdmi_probe:                    ; @mtk_drm_hdmi_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #32
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	str	x19, [x0, #24]
	mov	x1, x19
	bl	_mtk_hdmi_dt_parse_pdata
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_phy_get
	str	w0, [x20, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w0, [x20, #16]
	bl	_PTR_ERR
	mov	x21, x0
	str	x21, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_4:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x20
	bl	_mtk_hdmi_output_init
	cbz	w0, LBB0_9
; %bb.6:
	mov	x21, x0
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_dev_err
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_9:
	mov	x0, x19
	bl	_mtk_hdmi_register_audio_driver
Lloh12:
	adrp	x8, _mtk_hdmi_bridge_funcs@GOTPAGE
Lloh13:
	ldr	x8, [x8, _mtk_hdmi_bridge_funcs@GOTPAGEOFF]
	str	x8, [x20, #8]
	ldr	w8, [x19]
	str	w8, [x20]
	mov	x0, x20
	bl	_drm_bridge_add
	mov	x0, x20
	bl	_mtk_hdmi_clk_enable_audio
	mov	x21, x0
	cbz	w0, LBB0_11
; %bb.10:
	str	x21, [sp]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x20
	bl	_drm_bridge_remove
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_8
LBB0_11:
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hdmi"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to get HDMI PHY: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to initialize hdmi output\n"

	.comm	_mtk_hdmi_bridge_funcs,4,2      ; @mtk_hdmi_bridge_funcs
l_.str.3:                               ; @.str.3
	.asciz	"Failed to enable audio clocks: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"mediatek hdmi probe success\n"

	.no_dead_strip	_mtk_drm_hdmi_probe
.subsections_via_symbols
