	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_cec_probe
_mtk_cec_probe:                         ## @mtk_cec_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	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	%r15, %rdi
	addq	$12, %rdi
	callq	_spin_lock_init
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 8(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	8(%r15), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_6
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_4:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_devm_clk_get
	movl	%eax, 4(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movl	4(%r15), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_6:
	movq	%r14, %rdi
	movl	%eax, %edx
LBB0_7:
	callq	_dev_err
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movl	%eax, (%r15)
	testl	%eax, %eax
	js	LBB0_12
## %bb.10:
	movq	_mtk_cec_htplg_isr_thread@GOTPCREL(%rip), %rcx
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rdx
	movq	_IRQF_TRIGGER_LOW@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	orl	(%rdx), %r8d
	movl	(%rcx), %ecx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rdx
	orl	(%rdx), %r8d
	movq	%r14, (%rsp)
	leaq	L_.str.3(%rip), %r9
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_15
LBB0_12:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movl	(%r15), %ebx
	jmp	LBB0_8
LBB0_13:
	movl	4(%r15), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_16
## %bb.14:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
LBB0_15:
	movq	%r14, %rdi
	movl	%ebx, %edx
	jmp	LBB0_7
LBB0_16:
	movq	%r15, %rdi
	callq	_mtk_cec_htplg_irq_init
	movq	%r15, %rdi
	callq	_mtk_cec_htplg_irq_enable
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to ioremap cec: %d\n"

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

L_.str.2:                               ## @.str.2
	.asciz	"Failed to get cec irq: %d\n"

	.comm	_mtk_cec_htplg_isr_thread,4,2   ## @mtk_cec_htplg_isr_thread
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
	.comm	_IRQF_TRIGGER_LOW,4,2           ## @IRQF_TRIGGER_LOW
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.3:                               ## @.str.3
	.asciz	"hdmi hpd"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to register cec irq: %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to enable cec clock: %d\n"

	.no_dead_strip	_mtk_cec_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_cec_probe
_mtk_cec_probe:                         ; @mtk_cec_probe
	.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
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	add	x0, x20, #12
	bl	_spin_lock_init
Lloh3:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	w0, [x20, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w0, [x20, #8]
	bl	_PTR_ERR
	mov	x21, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_4:
	mov	x0, x19
	mov	x1, #0
	bl	_devm_clk_get
	str	w0, [x20, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.5:
	ldr	w0, [x20, #4]
	bl	_PTR_ERR
	mov	x21, x0
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
LBB0_7:
	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
LBB0_8:
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	mov	x2, x0
	str	w0, [x20]
	tbnz	w0, #31, LBB0_11
; %bb.9:
Lloh13:
	adrp	x8, _mtk_cec_htplg_isr_thread@GOTPAGE
Lloh14:
	ldr	x8, [x8, _mtk_cec_htplg_isr_thread@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
Lloh16:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _IRQF_TRIGGER_LOW@GOTPAGE
Lloh20:
	ldr	x9, [x9, _IRQF_TRIGGER_LOW@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh22:
	adrp	x9, _IRQF_ONESHOT@GOTPAGE
Lloh23:
	ldr	x9, [x9, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w4, w8, w9
Lloh25:
	adrp	x5, l_.str.3@PAGE
Lloh26:
	add	x5, x5, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x1, x2
	mov	x2, #0
	mov	x6, x19
	bl	_devm_request_threaded_irq
	cbz	w0, LBB0_12
; %bb.10:
	mov	x21, x0
Lloh27:
	adrp	x1, l_.str.4@PAGE
Lloh28:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_6
LBB0_11:
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w21, [x20]
	b	LBB0_7
LBB0_12:
	ldr	w0, [x20, #4]
	bl	_clk_prepare_enable
	mov	x21, x0
	cbz	w0, LBB0_14
; %bb.13:
Lloh31:
	adrp	x1, l_.str.5@PAGE
Lloh32:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_6
LBB0_14:
	mov	x0, x20
	bl	_mtk_cec_htplg_irq_init
	mov	x0, x20
	bl	_mtk_cec_htplg_irq_enable
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to ioremap cec: %d\n"

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

l_.str.2:                               ; @.str.2
	.asciz	"Failed to get cec irq: %d\n"

	.comm	_mtk_cec_htplg_isr_thread,4,2   ; @mtk_cec_htplg_isr_thread
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
	.comm	_IRQF_TRIGGER_LOW,4,2           ; @IRQF_TRIGGER_LOW
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.3:                               ; @.str.3
	.asciz	"hdmi hpd"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to register cec irq: %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to enable cec clock: %d\n"

	.no_dead_strip	_mtk_cec_probe
.subsections_via_symbols
