	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msm_hdmi_config_avi_infoframe
_msm_hdmi_config_avi_infoframe:         ## @msm_hdmi_config_avi_infoframe
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	movq	_AVI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HDMI_INFOFRAME_SIZE
	movl	%eax, %ebx
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movl	8(%r14), %esi
	leaq	-64(%rbp), %r13
	movq	%r13, %rdi
	movq	%r15, %rdx
	callq	_drm_hdmi_avi_infoframe_from_display_mode
	shll	$2, %ebx
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_hdmi_infoframe_pack
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	callq	_REG_HDMI_AVI_INFO
	movl	16(%r12), %ecx
	movl	20(%r12), %esi
	shll	$8, %ecx
	orl	12(%r12), %ecx
	shll	$16, %esi
	movl	24(%r12), %edx
	shll	$24, %edx
	orl	%esi, %edx
	orl	%ecx, %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_hdmi_write
	movl	$1, %edi
	callq	_REG_HDMI_AVI_INFO
	movl	32(%r12), %ecx
	movl	36(%r12), %esi
	shll	$8, %ecx
	orl	28(%r12), %ecx
	shll	$16, %esi
	movl	40(%r12), %edx
	shll	$24, %edx
	orl	%esi, %edx
	orl	%ecx, %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_hdmi_write
	movl	$2, %edi
	callq	_REG_HDMI_AVI_INFO
	movl	48(%r12), %ecx
	movl	52(%r12), %esi
	shll	$8, %ecx
	orl	44(%r12), %ecx
	shll	$16, %esi
	movl	56(%r12), %edx
	shll	$24, %edx
	orl	%esi, %edx
	orl	%ecx, %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_hdmi_write
	movl	$3, %edi
	callq	_REG_HDMI_AVI_INFO
	movl	4(%r12), %edx
	movl	64(%r12), %ecx
	shll	$8, %ecx
	orl	60(%r12), %ecx
	shll	$24, %edx
	orl	%ecx, %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_hdmi_write
	movq	_REG_HDMI_INFOFRAME_CTRL0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HDMI_INFOFRAME_CTRL0_AVI_SEND@GOTPCREL(%rip), %rax
	movq	_HDMI_INFOFRAME_CTRL0_AVI_CONT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_hdmi_write
	movq	_REG_HDMI_INFOFRAME_CTRL1@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_hdmi_read
	movq	_HDMI_INFOFRAME_CTRL1_AVI_INFO_LINE__MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movq	_AVI_IFRAME_LINE_NUMBER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HDMI_INFOFRAME_CTRL1_AVI_INFO_LINE
	orl	%eax, %ebx
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_hdmi_write
	jmp	LBB0_3
LBB0_1:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_DRM_DEV_ERROR
LBB0_3:
	movq	-56(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AVI,4,2                        ## @AVI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to configure avi infoframe\n"

	.comm	_REG_HDMI_INFOFRAME_CTRL0,4,2   ## @REG_HDMI_INFOFRAME_CTRL0
	.comm	_HDMI_INFOFRAME_CTRL0_AVI_SEND,4,2 ## @HDMI_INFOFRAME_CTRL0_AVI_SEND
	.comm	_HDMI_INFOFRAME_CTRL0_AVI_CONT,4,2 ## @HDMI_INFOFRAME_CTRL0_AVI_CONT
	.comm	_REG_HDMI_INFOFRAME_CTRL1,4,2   ## @REG_HDMI_INFOFRAME_CTRL1
	.comm	_HDMI_INFOFRAME_CTRL1_AVI_INFO_LINE__MASK,4,2 ## @HDMI_INFOFRAME_CTRL1_AVI_INFO_LINE__MASK
	.comm	_AVI_IFRAME_LINE_NUMBER,4,2     ## @AVI_IFRAME_LINE_NUMBER
	.no_dead_strip	_msm_hdmi_config_avi_infoframe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msm_hdmi_config_avi_infoframe
_msm_hdmi_config_avi_infoframe:         ; @msm_hdmi_config_avi_infoframe
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
	ldr	x21, [x8]
Lloh3:
	adrp	x8, _AVI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVI@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_HDMI_INFOFRAME_SIZE
	mov	x22, x0
	mov	x23, sp
	mov	w8, w0
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	w1, [x19, #8]
	sub	x0, x29, #64
	mov	x2, x21
	bl	_drm_hdmi_avi_infoframe_from_display_mode
	lsl	w2, w22, #2
	sub	x0, x29, #64
	mov	x1, x20
	bl	_hdmi_infoframe_pack
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	w0, #0
	bl	_REG_HDMI_AVI_INFO
	mov	x1, x0
	ldp	w8, w9, [x20, #12]
	orr	w8, w8, w9, lsl #8
	ldp	w9, w10, [x20, #20]
	orr	w8, w8, w9, lsl #16
	orr	w2, w8, w10, lsl #24
	mov	x0, x19
	bl	_hdmi_write
	mov	w0, #1
	bl	_REG_HDMI_AVI_INFO
	mov	x1, x0
	ldp	w8, w9, [x20, #28]
	orr	w8, w8, w9, lsl #8
	ldp	w9, w10, [x20, #36]
	orr	w8, w8, w9, lsl #16
	orr	w2, w8, w10, lsl #24
	mov	x0, x19
	bl	_hdmi_write
	mov	w0, #2
	bl	_REG_HDMI_AVI_INFO
	mov	x1, x0
	ldp	w8, w9, [x20, #44]
	orr	w8, w8, w9, lsl #8
	ldp	w9, w10, [x20, #52]
	orr	w8, w8, w9, lsl #16
	orr	w2, w8, w10, lsl #24
	mov	x0, x19
	bl	_hdmi_write
	mov	w0, #3
	bl	_REG_HDMI_AVI_INFO
	mov	x1, x0
	ldp	w8, w9, [x20, #60]
	orr	w8, w8, w9, lsl #8
	ldr	w9, [x20, #4]
	orr	w2, w8, w9, lsl #24
	mov	x0, x19
	bl	_hdmi_write
Lloh8:
	adrp	x8, _REG_HDMI_INFOFRAME_CTRL0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_HDMI_INFOFRAME_CTRL0@GOTPAGEOFF]
Lloh10:
	adrp	x9, _HDMI_INFOFRAME_CTRL0_AVI_SEND@GOTPAGE
Lloh11:
	ldr	x9, [x9, _HDMI_INFOFRAME_CTRL0_AVI_SEND@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	ldr	w8, [x9]
Lloh14:
	adrp	x9, _HDMI_INFOFRAME_CTRL0_AVI_CONT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _HDMI_INFOFRAME_CTRL0_AVI_CONT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_hdmi_write
Lloh17:
	adrp	x20, _REG_HDMI_INFOFRAME_CTRL1@GOTPAGE
Lloh18:
	ldr	x20, [x20, _REG_HDMI_INFOFRAME_CTRL1@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_hdmi_read
Lloh19:
	adrp	x8, _HDMI_INFOFRAME_CTRL1_AVI_INFO_LINE__MASK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _HDMI_INFOFRAME_CTRL1_AVI_INFO_LINE__MASK@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	bic	w21, w0, w8
Lloh22:
	adrp	x8, _AVI_IFRAME_LINE_NUMBER@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AVI_IFRAME_LINE_NUMBER@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_HDMI_INFOFRAME_CTRL1_AVI_INFO_LINE
	orr	w2, w0, w21
	ldr	w1, [x20]
	mov	x0, x19
	bl	_hdmi_write
	b	LBB0_3
LBB0_2:
	ldr	x0, [x19]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DRM_DEV_ERROR
LBB0_3:
	mov	sp, x23
	ldur	x8, [x29, #-56]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	sub	sp, x29, #48
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_AVI,4,2                        ; @AVI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to configure avi infoframe\n"

	.comm	_REG_HDMI_INFOFRAME_CTRL0,4,2   ; @REG_HDMI_INFOFRAME_CTRL0
	.comm	_HDMI_INFOFRAME_CTRL0_AVI_SEND,4,2 ; @HDMI_INFOFRAME_CTRL0_AVI_SEND
	.comm	_HDMI_INFOFRAME_CTRL0_AVI_CONT,4,2 ; @HDMI_INFOFRAME_CTRL0_AVI_CONT
	.comm	_REG_HDMI_INFOFRAME_CTRL1,4,2   ; @REG_HDMI_INFOFRAME_CTRL1
	.comm	_HDMI_INFOFRAME_CTRL1_AVI_INFO_LINE__MASK,4,2 ; @HDMI_INFOFRAME_CTRL1_AVI_INFO_LINE__MASK
	.comm	_AVI_IFRAME_LINE_NUMBER,4,2     ; @AVI_IFRAME_LINE_NUMBER
	.no_dead_strip	_msm_hdmi_config_avi_infoframe
.subsections_via_symbols
