	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_add_edid_modes             ## -- Begin function drm_add_edid_modes
	.p2align	4, 0x90
_drm_add_edid_modes:                    ## @drm_add_edid_modes
	.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	%rdi, %r15
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.1:
	movq	%rsi, %rbx
	movq	%rsi, %rdi
	callq	_drm_edid_is_valid
	movq	%r15, %rdi
	testl	%eax, %eax
	je	LBB0_15
## %bb.2:
	movq	%rbx, %rsi
	callq	_drm_edid_to_eld
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_drm_add_display_info
	movl	%eax, %r14d
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_add_detailed_modes
	movq	%rax, %r12
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_add_cvt_modes
	movq	%rax, %r13
	addq	%r12, %r13
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_add_standard_modes
	movq	%rax, %r12
	addq	%r13, %r12
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_add_established_modes
	movq	%rax, %r13
	addq	%r12, %r13
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_add_cea_modes
	movq	%rax, %r12
	addq	%r13, %r12
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_add_alternate_cea_modes
	movq	%rax, %r13
	addq	%r12, %r13
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_add_displayid_detailed_modes
	movq	%rax, %r12
	addq	%r13, %r12
	movq	_DRM_EDID_FEATURE_DEFAULT_GTF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_add_inferred_modes
	addq	%rax, %r12
LBB0_4:
	movq	_EDID_QUIRK_PREFER_LARGE_60@GOTPCREL(%rip), %rax
	movq	_EDID_QUIRK_PREFER_LARGE_75@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%r14d, %ecx
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_edid_fixup_preferred
LBB0_6:
	movq	_EDID_QUIRK_FORCE_6BPC@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_8
## %bb.7:
	movl	$6, (%r15)
LBB0_8:
	movq	_EDID_QUIRK_FORCE_8BPC@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_10
## %bb.9:
	movl	$8, (%r15)
LBB0_10:
	movq	_EDID_QUIRK_FORCE_10BPC@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_12
## %bb.11:
	movl	$10, (%r15)
LBB0_12:
	movq	_EDID_QUIRK_FORCE_12BPC@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_17
## %bb.13:
	movl	$12, (%r15)
	jmp	LBB0_17
LBB0_14:
	movq	%r15, %rdi
	callq	_clear_eld
	jmp	LBB0_16
LBB0_15:
	callq	_clear_eld
	movq	8(%r15), %rax
	movl	(%rax), %edi
	movl	4(%r15), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_16:
	xorl	%r12d, %r12d
LBB0_17:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: EDID invalid.\n"

	.comm	_DRM_EDID_FEATURE_DEFAULT_GTF,4,2 ## @DRM_EDID_FEATURE_DEFAULT_GTF
	.comm	_EDID_QUIRK_PREFER_LARGE_60,4,2 ## @EDID_QUIRK_PREFER_LARGE_60
	.comm	_EDID_QUIRK_PREFER_LARGE_75,4,2 ## @EDID_QUIRK_PREFER_LARGE_75
	.comm	_EDID_QUIRK_FORCE_6BPC,4,2      ## @EDID_QUIRK_FORCE_6BPC
	.comm	_EDID_QUIRK_FORCE_8BPC,4,2      ## @EDID_QUIRK_FORCE_8BPC
	.comm	_EDID_QUIRK_FORCE_10BPC,4,2     ## @EDID_QUIRK_FORCE_10BPC
	.comm	_EDID_QUIRK_FORCE_12BPC,4,2     ## @EDID_QUIRK_FORCE_12BPC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_add_edid_modes             ; -- Begin function drm_add_edid_modes
	.p2align	2
_drm_add_edid_modes:                    ; @drm_add_edid_modes
	.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	x19, x0
	cbz	x1, LBB0_14
; %bb.1:
	mov	x22, x1
	mov	x0, x1
	bl	_drm_edid_is_valid
	cbz	w0, LBB0_15
; %bb.2:
	mov	x0, x19
	mov	x1, x22
	bl	_drm_edid_to_eld
	mov	x0, x19
	mov	x1, x22
	bl	_drm_add_display_info
	mov	x20, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_add_detailed_modes
	mov	x21, x0
	mov	x0, x19
	mov	x1, x22
	bl	_add_cvt_modes
	add	x21, x0, x21
	mov	x0, x19
	mov	x1, x22
	bl	_add_standard_modes
	add	x21, x21, x0
	mov	x0, x19
	mov	x1, x22
	bl	_add_established_modes
	add	x21, x21, x0
	mov	x0, x19
	mov	x1, x22
	bl	_add_cea_modes
	add	x21, x21, x0
	mov	x0, x19
	mov	x1, x22
	bl	_add_alternate_cea_modes
	add	x21, x21, x0
	mov	x0, x19
	mov	x1, x22
	bl	_add_displayid_detailed_modes
	add	x21, x21, x0
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _DRM_EDID_FEATURE_DEFAULT_GTF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DRM_EDID_FEATURE_DEFAULT_GTF@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x22
	bl	_add_inferred_modes
	add	x21, x0, x21
LBB0_4:
Lloh3:
	adrp	x8, _EDID_QUIRK_PREFER_LARGE_60@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EDID_QUIRK_PREFER_LARGE_60@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _EDID_QUIRK_PREFER_LARGE_75@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EDID_QUIRK_PREFER_LARGE_75@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w20
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	mov	x1, x20
	bl	_edid_fixup_preferred
LBB0_6:
Lloh9:
	adrp	x8, _EDID_QUIRK_FORCE_6BPC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EDID_QUIRK_FORCE_6BPC@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_8
; %bb.7:
	mov	w8, #6
	str	w8, [x19]
LBB0_8:
Lloh12:
	adrp	x8, _EDID_QUIRK_FORCE_8BPC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EDID_QUIRK_FORCE_8BPC@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_10
; %bb.9:
	mov	w8, #8
	str	w8, [x19]
LBB0_10:
Lloh15:
	adrp	x8, _EDID_QUIRK_FORCE_10BPC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EDID_QUIRK_FORCE_10BPC@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_12
; %bb.11:
	mov	w8, #10
	str	w8, [x19]
LBB0_12:
Lloh18:
	adrp	x8, _EDID_QUIRK_FORCE_12BPC@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EDID_QUIRK_FORCE_12BPC@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_17
; %bb.13:
	mov	w8, #12
	str	w8, [x19]
	b	LBB0_17
LBB0_14:
	mov	x0, x19
	bl	_clear_eld
	b	LBB0_16
LBB0_15:
	mov	x0, x19
	bl	_clear_eld
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w2, [x19, #4]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_16:
	mov	w21, #0
LBB0_17:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: EDID invalid.\n"

	.comm	_DRM_EDID_FEATURE_DEFAULT_GTF,4,2 ; @DRM_EDID_FEATURE_DEFAULT_GTF
	.comm	_EDID_QUIRK_PREFER_LARGE_60,4,2 ; @EDID_QUIRK_PREFER_LARGE_60
	.comm	_EDID_QUIRK_PREFER_LARGE_75,4,2 ; @EDID_QUIRK_PREFER_LARGE_75
	.comm	_EDID_QUIRK_FORCE_6BPC,4,2      ; @EDID_QUIRK_FORCE_6BPC
	.comm	_EDID_QUIRK_FORCE_8BPC,4,2      ; @EDID_QUIRK_FORCE_8BPC
	.comm	_EDID_QUIRK_FORCE_10BPC,4,2     ; @EDID_QUIRK_FORCE_10BPC
	.comm	_EDID_QUIRK_FORCE_12BPC,4,2     ; @EDID_QUIRK_FORCE_12BPC
.subsections_via_symbols
