	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_dp_autotest_edid
_intel_dp_autotest_edid:                ## @intel_dp_autotest_edid
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_DP_TEST_ACK@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	movq	24(%rdi), %rcx
	movq	(%rcx), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	cmpq	$0, 8(%rcx)
	jne	LBB0_3
## %bb.2:
	cmpl	$7, 8(%rbx)
	jl	LBB0_6
LBB0_3:
	movq	16(%rbx), %rsi
	movl	8(%rbx), %edx
	movq	_INTEL_DP_RESOLUTION_FAILSAFE@GOTPCREL(%rip), %r15
	testq	%rsi, %rsi
	jg	LBB0_5
## %bb.4:
	testl	%edx, %edx
	jle	LBB0_9
LBB0_5:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_9
LBB0_6:
	leaq	8(%rbx), %rdi
	movslq	4(%rax), %rcx
	movq	_DP_TEST_EDID_CHECKSUM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	(%rax,%rcx,8), %edx
	callq	_drm_dp_dpcd_writeb
	testq	%rax, %rax
	jg	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_8:
	movq	_DP_TEST_EDID_CHECKSUM_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	orl	(%r15), %r14d
	movq	_INTEL_DP_RESOLUTION_PREFERRED@GOTPCREL(%rip), %r15
LBB0_9:
	movl	(%r15), %eax
	movl	%eax, 4(%rbx)
	movl	$1, (%rbx)
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_TEST_ACK,4,2                ## @DP_TEST_ACK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EDID read had %d NACKs, %d DEFERs\n"

	.comm	_INTEL_DP_RESOLUTION_FAILSAFE,4,2 ## @INTEL_DP_RESOLUTION_FAILSAFE
	.comm	_DP_TEST_EDID_CHECKSUM,4,2      ## @DP_TEST_EDID_CHECKSUM
L_.str.1:                               ## @.str.1
	.asciz	"Failed to write EDID checksum\n"

	.comm	_DP_TEST_EDID_CHECKSUM_WRITE,4,2 ## @DP_TEST_EDID_CHECKSUM_WRITE
	.comm	_INTEL_DP_RESOLUTION_PREFERRED,4,2 ## @INTEL_DP_RESOLUTION_PREFERRED
	.no_dead_strip	_intel_dp_autotest_edid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_dp_autotest_edid
_intel_dp_autotest_edid:                ; @intel_dp_autotest_edid
	.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
Lloh0:
	adrp	x21, _DP_TEST_ACK@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DP_TEST_ACK@GOTPAGEOFF]
	ldr	w20, [x21]
	ldr	x9, [x0, #24]
	ldr	x8, [x9]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x9, [x9, #8]
	cbnz	x9, LBB0_3
; %bb.2:
	mov	x0, x19
	ldr	w9, [x0, #8]!
	cmp	w9, #7
	b.lt	LBB0_7
LBB0_3:
	ldr	x8, [x19, #16]
	ldr	w9, [x19, #8]
	cmp	x8, #0
	ccmp	w9, #1, #0, le
	b.lt	LBB0_5
; %bb.4:
	stp	x8, x9, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_5:
Lloh4:
	adrp	x8, _INTEL_DP_RESOLUTION_FAILSAFE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _INTEL_DP_RESOLUTION_FAILSAFE@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	mov	w9, #1
	stp	w9, w8, [x19]
	mov	x0, x20
	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
LBB0_7:
	ldrsw	x9, [x8, #4]
Lloh6:
	adrp	x10, _DP_TEST_EDID_CHECKSUM@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DP_TEST_EDID_CHECKSUM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x10]
	lsl	x9, x9, #3
	ldr	w2, [x8, x9]
	bl	_drm_dp_dpcd_writeb
	cmp	x0, #0
	b.gt	LBB0_9
; %bb.8:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_9:
	ldr	w8, [x21]
Lloh11:
	adrp	x9, _DP_TEST_EDID_CHECKSUM_WRITE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DP_TEST_EDID_CHECKSUM_WRITE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w20, w9, w8
Lloh14:
	adrp	x8, _INTEL_DP_RESOLUTION_PREFERRED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _INTEL_DP_RESOLUTION_PREFERRED@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_TEST_ACK,4,2                ; @DP_TEST_ACK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EDID read had %d NACKs, %d DEFERs\n"

	.comm	_INTEL_DP_RESOLUTION_FAILSAFE,4,2 ; @INTEL_DP_RESOLUTION_FAILSAFE
	.comm	_DP_TEST_EDID_CHECKSUM,4,2      ; @DP_TEST_EDID_CHECKSUM
l_.str.1:                               ; @.str.1
	.asciz	"Failed to write EDID checksum\n"

	.comm	_DP_TEST_EDID_CHECKSUM_WRITE,4,2 ; @DP_TEST_EDID_CHECKSUM_WRITE
	.comm	_INTEL_DP_RESOLUTION_PREFERRED,4,2 ; @INTEL_DP_RESOLUTION_PREFERRED
	.no_dead_strip	_intel_dp_autotest_edid
.subsections_via_symbols
