	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fill_stream_properties_from_drm_display_mode
_fill_stream_properties_from_drm_display_mode: ## @fill_stream_properties_from_drm_display_mode
	.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	%r8, %r13
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	addq	$24, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	movl	$144, %edx
	callq	_memset
	xorps	%xmm0, %xmm0
	movups	%xmm0, 136(%rbx)
	movups	%xmm0, 152(%rbx)
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_drm_mode_is_420_only
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	(%rbx), %rax
	movq	_SIGNAL_TYPE_HDMI_TYPE_A@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	_PIXEL_ENCODING_YCBCR420@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	movq	_DRM_COLOR_FORMAT_YCRCB444@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_6
## %bb.4:
	movq	(%rbx), %rax
	movq	_SIGNAL_TYPE_HDMI_TYPE_A@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_PIXEL_ENCODING_YCBCR444@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_PIXEL_ENCODING_RGB@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, 132(%rbx)
	movq	_TIMING_3D_FORMAT_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 128(%rbx)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_convert_color_depth_from_display_info
	movl	%eax, 124(%rbx)
	movq	_SCANNING_TYPE_NODATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 120(%rbx)
	movq	$0, 112(%rbx)
	testq	%r13, %r13
	je	LBB0_9
## %bb.8:
	movl	104(%r13), %eax
	movl	%eax, 104(%rbx)
	movl	96(%r13), %eax
	movl	%eax, 96(%rbx)
	movl	100(%r13), %ecx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_12
LBB0_9:
	movq	%r12, %rdi
	callq	_drm_match_cea_mode
	movl	%eax, 104(%rbx)
	movl	(%r12), %eax
	movq	_DRM_MODE_FLAG_PHSYNC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.10:
	movl	$1, 96(%rbx)
LBB0_11:
	movq	_DRM_MODE_FLAG_PVSYNC@GOTPCREL(%rip), %rdx
	movl	$1, %ecx
	testl	%eax, (%rdx)
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_13
LBB0_12:
	movl	%ecx, 100(%rbx)
LBB0_13:
	movq	40(%r12), %rax
	movq	%rax, 88(%rbx)
	movl	64(%r12), %ecx
	movl	%ecx, 80(%rbx)
	movdqu	48(%r12), %xmm0
	movq	%rax, %xmm1
	punpcklqdq	%xmm0, %xmm1            ## xmm1 = xmm1[0],xmm0[0]
	psubq	%xmm1, %xmm0
	movdqu	%xmm0, 64(%rbx)
	movl	32(%r12), %eax
	movl	%eax, 56(%rbx)
	movq	24(%r12), %rax
	movq	%rax, 48(%rbx)
	movq	8(%r12), %rcx
	movq	%rcx, %rdx
	subq	%rax, %rdx
	movq	%rdx, 40(%rbx)
	movq	16(%r12), %rax
	subq	%rcx, %rax
	movq	%rax, 32(%rbx)
	movl	4(%r12), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	movl	%eax, 24(%rbx)
	movq	%r12, %rdi
	callq	_get_aspect_ratio
	movl	%eax, 28(%rbx)
	movq	%r14, %rdi
	callq	_get_output_color_space
	movl	%eax, 16(%rbx)
	movq	_TF_TYPE_PREDEFINED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rbx), %rcx
	movl	%eax, 4(%rcx)
	movq	_TRANSFER_FUNCTION_SRGB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rcx)
	movq	(%rbx), %rax
	movq	_SIGNAL_TYPE_HDMI_TYPE_A@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.15:
	movq	%r14, %rdi
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_adjust_colour_depth_from_display_info ## TAILCALL
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGNAL_TYPE_HDMI_TYPE_A,8,3    ## @SIGNAL_TYPE_HDMI_TYPE_A
	.comm	_PIXEL_ENCODING_YCBCR420,4,2    ## @PIXEL_ENCODING_YCBCR420
	.comm	_DRM_COLOR_FORMAT_YCRCB444,4,2  ## @DRM_COLOR_FORMAT_YCRCB444
	.comm	_PIXEL_ENCODING_YCBCR444,4,2    ## @PIXEL_ENCODING_YCBCR444
	.comm	_PIXEL_ENCODING_RGB,4,2         ## @PIXEL_ENCODING_RGB
	.comm	_TIMING_3D_FORMAT_NONE,4,2      ## @TIMING_3D_FORMAT_NONE
	.comm	_SCANNING_TYPE_NODATA,4,2       ## @SCANNING_TYPE_NODATA
	.comm	_DRM_MODE_FLAG_PHSYNC,4,2       ## @DRM_MODE_FLAG_PHSYNC
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ## @DRM_MODE_FLAG_PVSYNC
	.comm	_TF_TYPE_PREDEFINED,4,2         ## @TF_TYPE_PREDEFINED
	.comm	_TRANSFER_FUNCTION_SRGB,4,2     ## @TRANSFER_FUNCTION_SRGB
	.no_dead_strip	_fill_stream_properties_from_drm_display_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fill_stream_properties_from_drm_display_mode
_fill_stream_properties_from_drm_display_mode: ; @fill_stream_properties_from_drm_display_mode
	.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
	mov	x23, x4
	mov	x24, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	add	x20, x0, #24
	mov	x0, x20
	mov	w1, #0
	mov	w2, #144
	bl	_memset
	movi.2d	v0, #0000000000000000
	stur	q0, [x21, #136]
	stur	q0, [x21, #152]
	mov	x0, x19
	mov	x1, x22
	bl	_drm_mode_is_420_only
Lloh0:
	adrp	x25, _SIGNAL_TYPE_HDMI_TYPE_A@GOTPAGE
Lloh1:
	ldr	x25, [x25, _SIGNAL_TYPE_HDMI_TYPE_A@GOTPAGEOFF]
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x21]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _PIXEL_ENCODING_YCBCR420@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PIXEL_ENCODING_YCBCR420@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
	ldr	w8, [x19]
Lloh4:
	adrp	x9, _DRM_COLOR_FORMAT_YCRCB444@GOTPAGE
Lloh5:
	ldr	x9, [x9, _DRM_COLOR_FORMAT_YCRCB444@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
	ldr	x8, [x21]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh7:
	adrp	x8, _PIXEL_ENCODING_YCBCR444@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PIXEL_ENCODING_YCBCR444@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh9:
	adrp	x8, _PIXEL_ENCODING_RGB@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PIXEL_ENCODING_RGB@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _TIMING_3D_FORMAT_NONE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _TIMING_3D_FORMAT_NONE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #128]
	mov	x0, x19
	mov	x1, x24
	bl	_convert_color_depth_from_display_info
Lloh14:
	adrp	x8, _SCANNING_TYPE_NODATA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SCANNING_TYPE_NODATA@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	stp	w8, w0, [x21, #120]
	str	xzr, [x21, #112]
	cbz	x23, LBB0_9
; %bb.8:
	ldr	w8, [x23, #104]
	str	w8, [x21, #104]
	ldp	w9, w8, [x23, #96]
	str	w9, [x21, #96]
	b	LBB0_13
LBB0_9:
	mov	x0, x22
	bl	_drm_match_cea_mode
	str	w0, [x21, #104]
	ldr	w8, [x22]
Lloh17:
	adrp	x9, _DRM_MODE_FLAG_PHSYNC@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DRM_MODE_FLAG_PHSYNC@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	mov	w9, #1
	str	w9, [x21, #96]
LBB0_11:
Lloh20:
	adrp	x9, _DRM_MODE_FLAG_PVSYNC@GOTPAGE
Lloh21:
	ldr	x9, [x9, _DRM_MODE_FLAG_PVSYNC@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.12:
	mov	w8, #1
LBB0_13:
	str	w8, [x21, #100]
LBB0_14:
	ldp	x8, x9, [x22, #40]
	str	x8, [x21, #88]
	ldr	w10, [x22, #64]
	str	w10, [x21, #80]
	ldr	x10, [x22, #56]
	sub	x10, x10, x9
	sub	x8, x9, x8
	stp	x8, x10, [x21, #64]
	ldr	w8, [x22, #32]
	str	w8, [x21, #56]
	ldr	x8, [x22, #24]
	str	x8, [x21, #48]
	ldp	x9, x10, [x22, #8]
	sub	x8, x9, x8
	sub	x9, x10, x9
	stp	x9, x8, [x21, #32]
	ldr	w8, [x22, #4]
	add	w8, w8, w8, lsl #2
	lsl	w8, w8, #1
	str	w8, [x21, #24]
	mov	x0, x22
	bl	_get_aspect_ratio
	str	w0, [x21, #28]
	mov	x0, x20
	bl	_get_output_color_space
	str	w0, [x21, #16]
Lloh23:
	adrp	x8, _TF_TYPE_PREDEFINED@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TF_TYPE_PREDEFINED@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _TRANSFER_FUNCTION_SRGB@GOTPAGE
Lloh27:
	ldr	x9, [x9, _TRANSFER_FUNCTION_SRGB@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	ldp	x11, x10, [x21]
	stp	w9, w8, [x10]
	ldr	x8, [x25]
	cmp	x11, x8
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x20
	mov	x1, x19
	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
	b	_adjust_colour_depth_from_display_info
LBB0_16:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGNAL_TYPE_HDMI_TYPE_A,8,3    ; @SIGNAL_TYPE_HDMI_TYPE_A
	.comm	_PIXEL_ENCODING_YCBCR420,4,2    ; @PIXEL_ENCODING_YCBCR420
	.comm	_DRM_COLOR_FORMAT_YCRCB444,4,2  ; @DRM_COLOR_FORMAT_YCRCB444
	.comm	_PIXEL_ENCODING_YCBCR444,4,2    ; @PIXEL_ENCODING_YCBCR444
	.comm	_PIXEL_ENCODING_RGB,4,2         ; @PIXEL_ENCODING_RGB
	.comm	_TIMING_3D_FORMAT_NONE,4,2      ; @TIMING_3D_FORMAT_NONE
	.comm	_SCANNING_TYPE_NODATA,4,2       ; @SCANNING_TYPE_NODATA
	.comm	_DRM_MODE_FLAG_PHSYNC,4,2       ; @DRM_MODE_FLAG_PHSYNC
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ; @DRM_MODE_FLAG_PVSYNC
	.comm	_TF_TYPE_PREDEFINED,4,2         ; @TF_TYPE_PREDEFINED
	.comm	_TRANSFER_FUNCTION_SRGB,4,2     ; @TRANSFER_FUNCTION_SRGB
	.no_dead_strip	_fill_stream_properties_from_drm_display_mode
.subsections_via_symbols
