	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_dp_handle_test_request
_intel_dp_handle_test_request:          ## @intel_dp_handle_test_request
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_DP_TEST_NAK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$0, -20(%rbp)
	movq	_DP_TEST_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	callq	_drm_dp_dpcd_readb
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	movl	-20(%rbp), %esi
	leal	-128(%rsi), %eax
	cmpl	$3, %eax
	ja	LBB0_5
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	%r14, %rdi
	callq	_intel_dp_autotest_video_pattern
	jmp	LBB0_9
LBB0_4:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_12
LBB0_5:
	leaq	L_.str.5(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_10
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	%r14, %rdi
	callq	_intel_dp_autotest_link_training
	jmp	LBB0_9
LBB0_7:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	%r14, %rdi
	callq	_intel_dp_autotest_phy_pattern
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	%r14, %rdi
	callq	_intel_dp_autotest_edid
LBB0_9:
	movl	%eax, %ebx
LBB0_10:
	movq	_DP_TEST_ACK@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_12
## %bb.11:
	movl	-20(%rbp), %eax
	movl	%eax, 4(%r14)
LBB0_12:
	movq	_DP_TEST_RESPONSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_drm_dp_dpcd_writeb
	testl	%eax, %eax
	jg	LBB0_14
## %bb.13:
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_14:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_8
	.end_data_region
                                        ## -- End function
	.comm	_DP_TEST_NAK,4,2                ## @DP_TEST_NAK
	.comm	_DP_TEST_REQUEST,4,2            ## @DP_TEST_REQUEST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not read test request from sink\n"

L_.str.1:                               ## @.str.1
	.asciz	"LINK_TRAINING test requested\n"

L_.str.2:                               ## @.str.2
	.asciz	"TEST_PATTERN test requested\n"

L_.str.3:                               ## @.str.3
	.asciz	"EDID test requested\n"

L_.str.4:                               ## @.str.4
	.asciz	"PHY_PATTERN test requested\n"

L_.str.5:                               ## @.str.5
	.asciz	"Invalid test request '%02x'\n"

	.comm	_DP_TEST_ACK,4,2                ## @DP_TEST_ACK
	.comm	_DP_TEST_RESPONSE,4,2           ## @DP_TEST_RESPONSE
L_.str.6:                               ## @.str.6
	.asciz	"Could not write test response to sink\n"

	.no_dead_strip	_intel_dp_handle_test_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_dp_handle_test_request
_intel_dp_handle_test_request:          ; @intel_dp_handle_test_request
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _DP_TEST_NAK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DP_TEST_NAK@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	str	wzr, [sp, #12]
Lloh3:
	adrp	x8, _DP_TEST_REQUEST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DP_TEST_REQUEST@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_drm_dp_dpcd_readb
	cmp	w0, #0
	b.le	LBB0_4
; %bb.1:
	ldr	w8, [sp, #12]
	sub	w9, w8, #128
	cmp	w9, #3
	b.hi	LBB0_5
; %bb.2:
Lloh6:
	adrp	x8, lJTI0_0@PAGE
Lloh7:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x19
	bl	_intel_dp_autotest_video_pattern
	b	LBB0_9
LBB0_4:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	b	LBB0_12
LBB0_5:
	str	x8, [sp]
Lloh12:
	adrp	x0, l_.str.5@PAGE
Lloh13:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DRM_DEBUG_KMS
	b	LBB0_10
LBB0_6:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x19
	bl	_intel_dp_autotest_link_training
	b	LBB0_9
LBB0_7:
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x19
	bl	_intel_dp_autotest_phy_pattern
	b	LBB0_9
LBB0_8:
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x19
	bl	_intel_dp_autotest_edid
LBB0_9:
	mov	x20, x0
LBB0_10:
Lloh20:
	adrp	x8, _DP_TEST_ACK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DP_TEST_ACK@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_12
; %bb.11:
	ldr	w8, [sp, #12]
	str	w8, [x19, #4]
LBB0_12:
Lloh23:
	adrp	x8, _DP_TEST_RESPONSE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DP_TEST_RESPONSE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_drm_dp_dpcd_writeb
	cmp	w0, #0
	b.gt	LBB0_14
; %bb.13:
Lloh26:
	adrp	x0, l_.str.6@PAGE
Lloh27:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
                                        ; -- End function
	.comm	_DP_TEST_NAK,4,2                ; @DP_TEST_NAK
	.comm	_DP_TEST_REQUEST,4,2            ; @DP_TEST_REQUEST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not read test request from sink\n"

l_.str.1:                               ; @.str.1
	.asciz	"LINK_TRAINING test requested\n"

l_.str.2:                               ; @.str.2
	.asciz	"TEST_PATTERN test requested\n"

l_.str.3:                               ; @.str.3
	.asciz	"EDID test requested\n"

l_.str.4:                               ; @.str.4
	.asciz	"PHY_PATTERN test requested\n"

l_.str.5:                               ; @.str.5
	.asciz	"Invalid test request '%02x'\n"

	.comm	_DP_TEST_ACK,4,2                ; @DP_TEST_ACK
	.comm	_DP_TEST_RESPONSE,4,2           ; @DP_TEST_RESPONSE
l_.str.6:                               ; @.str.6
	.asciz	"Could not write test response to sink\n"

	.no_dead_strip	_intel_dp_handle_test_request
.subsections_via_symbols
