	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lspcon_set_infoframes          ## -- Begin function lspcon_set_infoframes
	.p2align	4, 0x90
_lspcon_set_infoframes:                 ## @lspcon_set_infoframes
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movq	%rdx, %r15
	movq	%rdi, %r14
	movq	%rsp, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_VIDEO_DIP_DATA_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	leaq	(,%r12,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_enc_to_dig_port
	cmpl	$0, 8(%rax)
	je	LBB0_5
## %bb.1:
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	leaq	24(%r15), %r14
	movl	(%r13), %esi
	leaq	-56(%rbp), %rdi
	movq	%r14, %rdx
	callq	_drm_hdmi_avi_infoframe_from_display_mode
	testq	%rax, %rax
	js	LBB0_6
## %bb.2:
	movq	(%r15), %rax
	movq	_INTEL_OUTPUT_FORMAT_YCBCR444@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	jne	LBB0_7
## %bb.3:
	cmpq	$0, 16(%r15)
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_8
## %bb.4:
	movq	_HDMI_COLORSPACE_YUV420@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_18
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_16
LBB0_7:
	movq	_HDMI_COLORSPACE_RGB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_8:
	movq	_HDMI_COLORSPACE_YUV444@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
LBB0_10:
	movl	(%r13), %esi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 8(%rax)
	jne	LBB0_12
## %bb.11:
	movq	_HDMI_QUANTIZATION_RANGE_FULL@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_HDMI_QUANTIZATION_RANGE_LIMITED@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %ecx
	leaq	-56(%rbp), %r15
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_drm_hdmi_avi_infoframe_quant_range
	shll	$2, %r12d
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_hdmi_infoframe_pack
	testq	%rax, %rax
	js	LBB0_15
## %bb.14:
	movq	_HDMI_INFOFRAME_TYPE_AVI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rcx
	movq	%rax, %r8
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	callq	*(%rax)
	jmp	LBB0_17
LBB0_15:
	leaq	L_.str.2(%rip), %rdi
LBB0_16:
	callq	_DRM_ERROR
LBB0_17:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_18:
	movq	%rbx, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.19:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_VIDEO_DIP_DATA_SIZE,4,2        ## @VIDEO_DIP_DATA_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Writing infoframes while LSPCON disabled ?\n"

L_.str.1:                               ## @.str.1
	.asciz	"couldn't fill AVI infoframe\n"

	.comm	_INTEL_OUTPUT_FORMAT_YCBCR444,8,3 ## @INTEL_OUTPUT_FORMAT_YCBCR444
	.comm	_HDMI_COLORSPACE_YUV420,4,2     ## @HDMI_COLORSPACE_YUV420
	.comm	_HDMI_COLORSPACE_YUV444,4,2     ## @HDMI_COLORSPACE_YUV444
	.comm	_HDMI_COLORSPACE_RGB,4,2        ## @HDMI_COLORSPACE_RGB
	.comm	_HDMI_QUANTIZATION_RANGE_LIMITED,4,2 ## @HDMI_QUANTIZATION_RANGE_LIMITED
	.comm	_HDMI_QUANTIZATION_RANGE_FULL,4,2 ## @HDMI_QUANTIZATION_RANGE_FULL
L_.str.2:                               ## @.str.2
	.asciz	"Failed to pack AVI IF\n"

	.comm	_HDMI_INFOFRAME_TYPE_AVI,4,2    ## @HDMI_INFOFRAME_TYPE_AVI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lspcon_set_infoframes          ; -- Begin function lspcon_set_infoframes
	.p2align	2
_lspcon_set_infoframes:                 ; @lspcon_set_infoframes
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x23, x3
	mov	x19, x2
	mov	x20, x0
	mov	x25, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _VIDEO_DIP_DATA_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VIDEO_DIP_DATA_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w26, [x8]
	lsl	x8, x26, #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	x21, x9, x8
	mov	sp, x21
	bl	_enc_to_dig_port
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x22, x0
	add	x24, x19, #24
	ldr	w1, [x23]
	sub	x0, x29, #80
	mov	x2, x24
	bl	_drm_hdmi_avi_infoframe_from_display_mode
	tbnz	x0, #63, LBB0_6
; %bb.2:
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _INTEL_OUTPUT_FORMAT_YCBCR444@GOTPAGE
Lloh9:
	ldr	x9, [x9, _INTEL_OUTPUT_FORMAT_YCBCR444@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.3:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
; %bb.4:
Lloh11:
	adrp	x8, _HDMI_COLORSPACE_YUV420@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HDMI_COLORSPACE_YUV420@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_12
LBB0_6:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_7:
Lloh17:
	adrp	x8, _HDMI_COLORSPACE_RGB@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HDMI_COLORSPACE_RGB@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh19:
	adrp	x8, _HDMI_COLORSPACE_YUV444@GOTPAGE
Lloh20:
	ldr	x8, [x8, _HDMI_COLORSPACE_YUV444@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	stur	w8, [x29, #-80]
	ldr	w1, [x23]
Lloh21:
	adrp	x8, _HDMI_QUANTIZATION_RANGE_LIMITED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _HDMI_QUANTIZATION_RANGE_LIMITED@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh23:
	adrp	x10, _HDMI_QUANTIZATION_RANGE_FULL@GOTPAGE
Lloh24:
	ldr	x10, [x10, _HDMI_QUANTIZATION_RANGE_FULL@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x10, x8, eq
	ldr	w3, [x8]
	sub	x0, x29, #80
	mov	x2, x24
	bl	_drm_hdmi_avi_infoframe_quant_range
	lsl	w2, w26, #2
	sub	x0, x29, #80
	mov	x1, x21
	bl	_hdmi_infoframe_pack
	tbnz	x0, #63, LBB0_11
; %bb.10:
	mov	x4, x0
	ldr	x8, [x22]
Lloh25:
	adrp	x9, _HDMI_INFOFRAME_TYPE_AVI@GOTPAGE
Lloh26:
	ldr	x9, [x9, _HDMI_INFOFRAME_TYPE_AVI@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x9]
	mov	x0, x20
	mov	x1, x19
	mov	x3, x21
	blr	x8
	b	LBB0_13
LBB0_11:
Lloh28:
	adrp	x0, l_.str.2@PAGE
Lloh29:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_12:
	bl	_DRM_ERROR
LBB0_13:
	mov	sp, x25
	ldur	x8, [x29, #-72]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_VIDEO_DIP_DATA_SIZE,4,2        ; @VIDEO_DIP_DATA_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Writing infoframes while LSPCON disabled ?\n"

l_.str.1:                               ; @.str.1
	.asciz	"couldn't fill AVI infoframe\n"

	.comm	_INTEL_OUTPUT_FORMAT_YCBCR444,8,3 ; @INTEL_OUTPUT_FORMAT_YCBCR444
	.comm	_HDMI_COLORSPACE_YUV420,4,2     ; @HDMI_COLORSPACE_YUV420
	.comm	_HDMI_COLORSPACE_YUV444,4,2     ; @HDMI_COLORSPACE_YUV444
	.comm	_HDMI_COLORSPACE_RGB,4,2        ; @HDMI_COLORSPACE_RGB
	.comm	_HDMI_QUANTIZATION_RANGE_LIMITED,4,2 ; @HDMI_QUANTIZATION_RANGE_LIMITED
	.comm	_HDMI_QUANTIZATION_RANGE_FULL,4,2 ; @HDMI_QUANTIZATION_RANGE_FULL
l_.str.2:                               ; @.str.2
	.asciz	"Failed to pack AVI IF\n"

	.comm	_HDMI_INFOFRAME_TYPE_AVI,4,2    ; @HDMI_INFOFRAME_TYPE_AVI
.subsections_via_symbols
