	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_automated_test
_handle_automated_test:                 ## @handle_automated_test
	.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	$64, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	-80(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	leaq	-48(%rbp), %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	_DP_TEST_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	movl	$32, %ecx
	callq	_core_link_read_dpcd
	cmpq	$0, -56(%rbp)
	je	LBB0_2
## %bb.1:
	movl	$1, -48(%rbp)
	movq	_DP_TEST_RESPONSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$32, %ecx
	callq	_core_link_write_dpcd
	movq	%rbx, %rdi
	callq	_dp_test_send_link_training
	movl	$0, -48(%rbp)
LBB0_2:
	cmpq	$0, -64(%rbp)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_dp_test_send_link_test_pattern
	movl	$1, -48(%rbp)
LBB0_4:
	cmpq	$0, -72(%rbp)
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_dp_test_send_phy_test_pattern
	movl	$1, -48(%rbp)
	jmp	LBB0_7
LBB0_6:
	cmpl	$0, -48(%rbp)
	je	LBB0_8
LBB0_7:
	movq	_DP_TEST_RESPONSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$32, %ecx
	callq	_core_link_write_dpcd
LBB0_8:
	addq	$64, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_TEST_REQUEST,4,2            ## @DP_TEST_REQUEST
	.comm	_DP_TEST_RESPONSE,4,2           ## @DP_TEST_RESPONSE
	.no_dead_strip	_handle_automated_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_automated_test
_handle_automated_test:                 ; @handle_automated_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x0, sp, #32
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	mov	x0, sp
	mov	w1, #0
	mov	w2, #32
	bl	_memset
Lloh0:
	adrp	x8, _DP_TEST_REQUEST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DP_TEST_REQUEST@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #32
	mov	x0, x19
	mov	w3, #32
	bl	_core_link_read_dpcd
	ldr	x8, [sp, #56]
Lloh3:
	adrp	x20, _DP_TEST_RESPONSE@GOTPAGE
Lloh4:
	ldr	x20, [x20, _DP_TEST_RESPONSE@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [sp]
	ldr	w1, [x20]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #32
	bl	_core_link_write_dpcd
	mov	x0, x19
	bl	_dp_test_send_link_training
	str	wzr, [sp]
LBB0_2:
	ldr	x8, [sp, #48]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_dp_test_send_link_test_pattern
	mov	w8, #1
	str	w8, [sp]
LBB0_4:
	ldr	x8, [sp, #40]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_dp_test_send_phy_test_pattern
	mov	w8, #1
	str	w8, [sp]
	b	LBB0_7
LBB0_6:
	ldr	w8, [sp]
	cbz	w8, LBB0_8
LBB0_7:
	ldr	w1, [x20]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #32
	bl	_core_link_write_dpcd
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_TEST_REQUEST,4,2            ; @DP_TEST_REQUEST
	.comm	_DP_TEST_RESPONSE,4,2           ; @DP_TEST_RESPONSE
	.no_dead_strip	_handle_automated_test
.subsections_via_symbols
