	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_dp_autotest_video_pattern
_intel_dp_autotest_video_pattern:       ## @intel_dp_autotest_video_pattern
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	leaq	40(%rdi), %rbx
	movq	_DP_TEST_PATTERN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_drm_dp_dpcd_readb
	testl	%eax, %eax
	jle	LBB0_10
## %bb.1:
	movq	-40(%rbp), %rax
	movq	_DP_COLOR_RAMP@GOTPCREL(%rip), %rcx
	movq	_DP_TEST_NAK@GOTPCREL(%rip), %r15
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.2:
	movq	_DP_TEST_H_WIDTH_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	_drm_dp_dpcd_read
	testl	%eax, %eax
	jle	LBB0_11
## %bb.3:
	movq	_DP_TEST_V_HEIGHT_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	_drm_dp_dpcd_read
	testl	%eax, %eax
	jle	LBB0_12
## %bb.4:
	movq	_DP_TEST_MISC0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_drm_dp_dpcd_readb
	testl	%eax, %eax
	jle	LBB0_13
## %bb.5:
	movq	-48(%rbp), %rax
	movq	_DP_TEST_COLOR_FORMAT_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andq	%rax, %rcx
	movq	_DP_COLOR_FORMAT_RGB@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_15
## %bb.6:
	movq	_DP_TEST_DYNAMIC_RANGE_CEA@GOTPCREL(%rip), %rcx
	testq	%rax, (%rcx)
	jne	LBB0_15
## %bb.7:
	movq	_DP_TEST_BIT_DEPTH_MASK@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rax
	cmpq	$129, %rax
	je	LBB0_16
## %bb.8:
	cmpq	$128, %rax
	jne	LBB0_15
## %bb.9:
	movl	$8, %eax
	jmp	LBB0_17
LBB0_10:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movq	_DP_TEST_NAK@GOTPCREL(%rip), %r15
	jmp	LBB0_15
LBB0_11:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_14
LBB0_12:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str.3(%rip), %rdi
LBB0_14:
	callq	_DRM_DEBUG_KMS
LBB0_15:
	movq	(%r15), %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	$6, %eax
LBB0_17:
	movl	%eax, 8(%r14)
	movq	-40(%rbp), %rax
	movq	%rax, 32(%r14)
	movl	-32(%rbp), %edi
	callq	_be16_to_cpu
	movq	%rax, 24(%r14)
	movl	-28(%rbp), %edi
	callq	_be16_to_cpu
	movq	%rax, 16(%r14)
	movl	$1, (%r14)
	movq	_DP_TEST_ACK@GOTPCREL(%rip), %r15
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_TEST_PATTERN,4,2            ## @DP_TEST_PATTERN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Test pattern read failed\n"

	.comm	_DP_TEST_NAK,8,3                ## @DP_TEST_NAK
	.comm	_DP_COLOR_RAMP,8,3              ## @DP_COLOR_RAMP
	.comm	_DP_TEST_H_WIDTH_HI,4,2         ## @DP_TEST_H_WIDTH_HI
L_.str.1:                               ## @.str.1
	.asciz	"H Width read failed\n"

	.comm	_DP_TEST_V_HEIGHT_HI,4,2        ## @DP_TEST_V_HEIGHT_HI
L_.str.2:                               ## @.str.2
	.asciz	"V Height read failed\n"

	.comm	_DP_TEST_MISC0,4,2              ## @DP_TEST_MISC0
L_.str.3:                               ## @.str.3
	.asciz	"TEST MISC read failed\n"

	.comm	_DP_TEST_COLOR_FORMAT_MASK,8,3  ## @DP_TEST_COLOR_FORMAT_MASK
	.comm	_DP_COLOR_FORMAT_RGB,8,3        ## @DP_COLOR_FORMAT_RGB
	.comm	_DP_TEST_DYNAMIC_RANGE_CEA,8,3  ## @DP_TEST_DYNAMIC_RANGE_CEA
	.comm	_DP_TEST_BIT_DEPTH_MASK,8,3     ## @DP_TEST_BIT_DEPTH_MASK
	.comm	_DP_TEST_ACK,8,3                ## @DP_TEST_ACK
	.no_dead_strip	_intel_dp_autotest_video_pattern
.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_video_pattern
_intel_dp_autotest_video_pattern:       ; @intel_dp_autotest_video_pattern
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
	add	x20, x0, #40
Lloh0:
	adrp	x8, _DP_TEST_PATTERN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DP_TEST_PATTERN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #24
	mov	x0, x20
	bl	_drm_dp_dpcd_readb
	cmp	w0, #0
	b.le	LBB0_10
; %bb.1:
	ldr	x8, [sp, #24]
Lloh3:
	adrp	x9, _DP_COLOR_RAMP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DP_COLOR_RAMP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.2:
Lloh6:
	adrp	x8, _DP_TEST_H_WIDTH_HI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DP_TEST_H_WIDTH_HI@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #2
	bl	_drm_dp_dpcd_read
	cmp	w0, #0
	b.le	LBB0_11
; %bb.3:
Lloh9:
	adrp	x8, _DP_TEST_V_HEIGHT_HI@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DP_TEST_V_HEIGHT_HI@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	mov	w3, #2
	bl	_drm_dp_dpcd_read
	cmp	w0, #0
	b.le	LBB0_12
; %bb.4:
Lloh12:
	adrp	x8, _DP_TEST_MISC0@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DP_TEST_MISC0@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x0, x20
	bl	_drm_dp_dpcd_readb
	cmp	w0, #0
	b.le	LBB0_13
; %bb.5:
	ldr	x8, [sp, #16]
Lloh15:
	adrp	x9, _DP_TEST_COLOR_FORMAT_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DP_TEST_COLOR_FORMAT_MASK@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	and	x9, x9, x8
Lloh18:
	adrp	x10, _DP_COLOR_FORMAT_RGB@GOTPAGE
Lloh19:
	ldr	x10, [x10, _DP_COLOR_FORMAT_RGB@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_15
; %bb.6:
Lloh21:
	adrp	x9, _DP_TEST_DYNAMIC_RANGE_CEA@GOTPAGE
Lloh22:
	ldr	x9, [x9, _DP_TEST_DYNAMIC_RANGE_CEA@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	tst	x9, x8
	b.ne	LBB0_15
; %bb.7:
Lloh24:
	adrp	x9, _DP_TEST_BIT_DEPTH_MASK@GOTPAGE
Lloh25:
	ldr	x9, [x9, _DP_TEST_BIT_DEPTH_MASK@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	and	x8, x9, x8
	cmp	x8, #129
	b.eq	LBB0_17
; %bb.8:
	cmp	x8, #128
	b.ne	LBB0_15
; %bb.9:
	mov	w8, #8
	b	LBB0_18
LBB0_10:
Lloh27:
	adrp	x0, l_.str@PAGE
Lloh28:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_14
LBB0_11:
Lloh29:
	adrp	x0, l_.str.1@PAGE
Lloh30:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_12:
Lloh31:
	adrp	x0, l_.str.2@PAGE
Lloh32:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_13:
Lloh33:
	adrp	x0, l_.str.3@PAGE
Lloh34:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_14:
	bl	_DRM_DEBUG_KMS
LBB0_15:
Lloh35:
	adrp	x8, _DP_TEST_NAK@GOTPAGE
Lloh36:
	ldr	x8, [x8, _DP_TEST_NAK@GOTPAGEOFF]
LBB0_16:
	ldr	x0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_17:
	mov	w8, #6
LBB0_18:
	str	w8, [x19, #8]
	ldr	x8, [sp, #24]
	str	x8, [x19, #32]
	ldr	w0, [sp, #12]
	bl	_be16_to_cpu
	str	x0, [x19, #24]
	ldr	w0, [sp, #8]
	bl	_be16_to_cpu
	str	x0, [x19, #16]
	mov	w8, #1
	str	w8, [x19]
Lloh37:
	adrp	x8, _DP_TEST_ACK@GOTPAGE
Lloh38:
	ldr	x8, [x8, _DP_TEST_ACK@GOTPAGEOFF]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_TEST_PATTERN,4,2            ; @DP_TEST_PATTERN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Test pattern read failed\n"

	.comm	_DP_TEST_NAK,8,3                ; @DP_TEST_NAK
	.comm	_DP_COLOR_RAMP,8,3              ; @DP_COLOR_RAMP
	.comm	_DP_TEST_H_WIDTH_HI,4,2         ; @DP_TEST_H_WIDTH_HI
l_.str.1:                               ; @.str.1
	.asciz	"H Width read failed\n"

	.comm	_DP_TEST_V_HEIGHT_HI,4,2        ; @DP_TEST_V_HEIGHT_HI
l_.str.2:                               ; @.str.2
	.asciz	"V Height read failed\n"

	.comm	_DP_TEST_MISC0,4,2              ; @DP_TEST_MISC0
l_.str.3:                               ; @.str.3
	.asciz	"TEST MISC read failed\n"

	.comm	_DP_TEST_COLOR_FORMAT_MASK,8,3  ; @DP_TEST_COLOR_FORMAT_MASK
	.comm	_DP_COLOR_FORMAT_RGB,8,3        ; @DP_COLOR_FORMAT_RGB
	.comm	_DP_TEST_DYNAMIC_RANGE_CEA,8,3  ; @DP_TEST_DYNAMIC_RANGE_CEA
	.comm	_DP_TEST_BIT_DEPTH_MASK,8,3     ; @DP_TEST_BIT_DEPTH_MASK
	.comm	_DP_TEST_ACK,8,3                ; @DP_TEST_ACK
	.no_dead_strip	_intel_dp_autotest_video_pattern
.subsections_via_symbols
