	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_hdmi_ddc_write_msg
_mtk_hdmi_ddc_write_msg:                ## @mtk_hdmi_ddc_write_msg
	.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
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	movq	_DDCM_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ddcm_trigger_mode
	movq	_DDC_DDCMD0@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_DDCM_DATA0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r12), %r8d
	addl	%r8d, %r8d
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_sif_write_mask
	movl	(%r13), %esi
	movq	_DDCM_DATA1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	8(%r12), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rdi
	movl	$8, %ecx
	callq	_sif_write_mask
	movq	_DDC_DDCMCTL1@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_DDCM_PGLEN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DDCM_PGLEN_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$1, %r8d
	callq	_sif_write_mask
	movq	_DDCM_WRITE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ddcm_trigger_mode
	movl	(%r12), %esi
	movq	_DDCM_ACK_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DDCM_ACK_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_sif_read_mask
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
	cmpl	$3, %ebx
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_2:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DDCM_START,4,2                 ## @DDCM_START
	.comm	_DDC_DDCMD0,4,2                 ## @DDC_DDCMD0
	.comm	_DDCM_DATA0,4,2                 ## @DDCM_DATA0
	.comm	_DDCM_DATA1,4,2                 ## @DDCM_DATA1
	.comm	_DDC_DDCMCTL1,4,2               ## @DDC_DDCMCTL1
	.comm	_DDCM_PGLEN_MASK,4,2            ## @DDCM_PGLEN_MASK
	.comm	_DDCM_PGLEN_OFFSET,4,2          ## @DDCM_PGLEN_OFFSET
	.comm	_DDCM_WRITE_DATA,4,2            ## @DDCM_WRITE_DATA
	.comm	_DDCM_ACK_MASK,4,2              ## @DDCM_ACK_MASK
	.comm	_DDCM_ACK_OFFSET,4,2            ## @DDCM_ACK_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ack = %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"i2c ack err!\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_mtk_hdmi_ddc_write_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_hdmi_ddc_write_msg
_mtk_hdmi_ddc_write_msg:                ; @mtk_hdmi_ddc_write_msg
	.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	x21, x1
	mov	x20, x0
	ldr	x19, [x0]
Lloh0:
	adrp	x8, _DDCM_START@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DDCM_START@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_ddcm_trigger_mode
Lloh3:
	adrp	x22, _DDC_DDCMD0@GOTPAGE
Lloh4:
	ldr	x22, [x22, _DDC_DDCMD0@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh5:
	adrp	x8, _DDCM_DATA0@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DDCM_DATA0@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	ldr	w8, [x21]
	lsl	w4, w8, #1
	mov	x0, x20
	mov	w3, #0
	bl	_sif_write_mask
	ldr	w1, [x22]
Lloh8:
	adrp	x8, _DDCM_DATA1@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DDCM_DATA1@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	ldr	x8, [x21, #8]
	ldr	w4, [x8]
	mov	x0, x20
	mov	w3, #8
	bl	_sif_write_mask
Lloh11:
	adrp	x21, _DDC_DDCMCTL1@GOTPAGE
Lloh12:
	ldr	x21, [x21, _DDC_DDCMCTL1@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh13:
	adrp	x8, _DDCM_PGLEN_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DDCM_PGLEN_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x8, _DDCM_PGLEN_OFFSET@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DDCM_PGLEN_OFFSET@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w4, #1
	bl	_sif_write_mask
Lloh19:
	adrp	x8, _DDCM_WRITE_DATA@GOTPAGE
Lloh20:
	ldr	x8, [x8, _DDCM_WRITE_DATA@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ddcm_trigger_mode
	ldr	w1, [x21]
Lloh22:
	adrp	x8, _DDCM_ACK_MASK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DDCM_ACK_MASK@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
Lloh25:
	adrp	x8, _DDCM_ACK_OFFSET@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DDCM_ACK_OFFSET@GOTPAGEOFF]
Lloh27:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_sif_read_mask
	mov	x20, x0
Lloh28:
	adrp	x1, l_.str@PAGE
Lloh29:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_dbg
	mov	w0, #0
	cmp	w20, #3
	b.eq	LBB0_2
; %bb.1:
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh32:
	adrp	x8, _EIO@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_2:
	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	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_DDCM_START,4,2                 ; @DDCM_START
	.comm	_DDC_DDCMD0,4,2                 ; @DDC_DDCMD0
	.comm	_DDCM_DATA0,4,2                 ; @DDCM_DATA0
	.comm	_DDCM_DATA1,4,2                 ; @DDCM_DATA1
	.comm	_DDC_DDCMCTL1,4,2               ; @DDC_DDCMCTL1
	.comm	_DDCM_PGLEN_MASK,4,2            ; @DDCM_PGLEN_MASK
	.comm	_DDCM_PGLEN_OFFSET,4,2          ; @DDCM_PGLEN_OFFSET
	.comm	_DDCM_WRITE_DATA,4,2            ; @DDCM_WRITE_DATA
	.comm	_DDCM_ACK_MASK,4,2              ; @DDCM_ACK_MASK
	.comm	_DDCM_ACK_OFFSET,4,2            ; @DDCM_ACK_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ack = %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"i2c ack err!\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_mtk_hdmi_ddc_write_msg
.subsections_via_symbols
