	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _lspcon_write_avi_infoframe_mca
__lspcon_write_avi_infoframe_mca:       ## @_lspcon_write_avi_infoframe_mca
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	testl	%edx, %edx
	jle	LBB0_10
## %bb.1:
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	_LSPCON_MCA_AVI_IF_WRITE_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	addq	$4, %r12
	decl	%r15d
	je	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	_drm_dp_dpcd_write
	cmpl	$1, %eax
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$50, %edi
	callq	_mdelay
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	_drm_dp_dpcd_write
	cmpl	$1, %eax
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$50, %edi
	callq	_mdelay
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	_drm_dp_dpcd_write
	cmpl	$1, %eax
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$50, %edi
	callq	_mdelay
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	_drm_dp_dpcd_write
	cmpl	$1, %eax
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$50, %edi
	callq	_mdelay
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movl	$1, %ecx
	callq	_drm_dp_dpcd_write
	cmpl	$1, %eax
	je	LBB0_9
## %bb.7:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_8
LBB0_10:
	movl	$0, -36(%rbp)
	movq	_LSPCON_MCA_AVI_IF_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	_drm_dp_dpcd_read
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:
	movq	_LSPCON_MCA_AVI_IF_HANDLED@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	notl	%eax
	andl	-36(%rbp), %eax
	movq	_LSPCON_MCA_AVI_IF_KICKOFF@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -36(%rbp)
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	_drm_dp_dpcd_write
	testl	%eax, %eax
	js	LBB0_11
## %bb.13:
	movl	$0, -36(%rbp)
	leaq	-36(%rbp), %rdx
	movl	$1, %r15d
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	_drm_dp_dpcd_read
	testl	%eax, %eax
	js	LBB0_11
## %bb.14:
	movl	-36(%rbp), %eax
	cmpl	(%r12), %eax
	jne	LBB0_16
## %bb.15:
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_16
LBB0_11:
	leaq	L_.str.1(%rip), %rdi
LBB0_8:
	movq	%rbx, %rsi
	callq	_DRM_ERROR
	xorl	%r15d, %r15d
LBB0_16:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LSPCON_MCA_AVI_IF_WRITE_OFFSET,8,3 ## @LSPCON_MCA_AVI_IF_WRITE_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DPCD write failed at:0x%x\n"

	.comm	_LSPCON_MCA_AVI_IF_CTRL,8,3     ## @LSPCON_MCA_AVI_IF_CTRL
L_.str.1:                               ## @.str.1
	.asciz	"DPCD read failed, address 0x%x\n"

	.comm	_LSPCON_MCA_AVI_IF_HANDLED,4,2  ## @LSPCON_MCA_AVI_IF_HANDLED
	.comm	_LSPCON_MCA_AVI_IF_KICKOFF,4,2  ## @LSPCON_MCA_AVI_IF_KICKOFF
L_.str.2:                               ## @.str.2
	.asciz	"AVI IF handled by FW\n"

	.no_dead_strip	__lspcon_write_avi_infoframe_mca
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _lspcon_write_avi_infoframe_mca
__lspcon_write_avi_infoframe_mca:       ; @_lspcon_write_avi_infoframe_mca
	.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
	cmp	w2, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x20, x2
	mov	x21, x1
Lloh0:
	adrp	x8, _LSPCON_MCA_AVI_IF_WRITE_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LSPCON_MCA_AVI_IF_WRITE_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	add	x21, x21, #4
	subs	w20, w20, #1
	b.eq	LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	w3, #1
	bl	_drm_dp_dpcd_write
	cmp	w0, #1
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #50
	bl	_mdelay
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	w3, #1
	bl	_drm_dp_dpcd_write
	cmp	w0, #1
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #50
	bl	_mdelay
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	w3, #1
	bl	_drm_dp_dpcd_write
	cmp	w0, #1
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #50
	bl	_mdelay
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	w3, #1
	bl	_drm_dp_dpcd_write
	cmp	w0, #1
	b.eq	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #50
	bl	_mdelay
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	w3, #1
	bl	_drm_dp_dpcd_write
	cmp	w0, #1
	b.eq	LBB0_2
; %bb.8:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	b	LBB0_16
LBB0_9:
	str	wzr, [sp, #12]
Lloh5:
	adrp	x8, _LSPCON_MCA_AVI_IF_CTRL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LSPCON_MCA_AVI_IF_CTRL@GOTPAGEOFF]
Lloh7:
	ldr	x20, [x8]
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	bl	_drm_dp_dpcd_read
	tbnz	w0, #31, LBB0_15
; %bb.10:
Lloh8:
	adrp	x21, _LSPCON_MCA_AVI_IF_HANDLED@GOTPAGE
Lloh9:
	ldr	x21, [x21, _LSPCON_MCA_AVI_IF_HANDLED@GOTPAGEOFF]
	ldr	w8, [x21]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
Lloh10:
	adrp	x9, _LSPCON_MCA_AVI_IF_KICKOFF@GOTPAGE
Lloh11:
	ldr	x9, [x9, _LSPCON_MCA_AVI_IF_KICKOFF@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #12]
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	bl	_drm_dp_dpcd_write
	tbnz	w0, #31, LBB0_15
; %bb.11:
	str	wzr, [sp, #12]
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	bl	_drm_dp_dpcd_read
	tbnz	w0, #31, LBB0_15
; %bb.12:
	ldr	w8, [sp, #12]
	ldr	w9, [x21]
	cmp	w8, w9
	b.ne	LBB0_14
; %bb.13:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_14:
	mov	w0, #1
	b	LBB0_17
LBB0_15:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
LBB0_16:
	bl	_DRM_ERROR
	mov	w0, #0
LBB0_17:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_LSPCON_MCA_AVI_IF_WRITE_OFFSET,8,3 ; @LSPCON_MCA_AVI_IF_WRITE_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DPCD write failed at:0x%x\n"

	.comm	_LSPCON_MCA_AVI_IF_CTRL,8,3     ; @LSPCON_MCA_AVI_IF_CTRL
l_.str.1:                               ; @.str.1
	.asciz	"DPCD read failed, address 0x%x\n"

	.comm	_LSPCON_MCA_AVI_IF_HANDLED,4,2  ; @LSPCON_MCA_AVI_IF_HANDLED
	.comm	_LSPCON_MCA_AVI_IF_KICKOFF,4,2  ; @LSPCON_MCA_AVI_IF_KICKOFF
l_.str.2:                               ; @.str.2
	.asciz	"AVI IF handled by FW\n"

	.no_dead_strip	__lspcon_write_avi_infoframe_mca
.subsections_via_symbols
