	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dp_set_panel_mode              ## -- Begin function dp_set_panel_mode
	.p2align	4, 0x90
_dp_set_panel_mode:                     ## @dp_set_panel_mode
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	leaq	-32(%rbp), %rdi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_DP_PANEL_MODE_DEFAULT@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_3
## %bb.1:
	andl	$-2, %ebx
	xorl	%r15d, %r15d
	cmpl	$128, %ebx
	sete	%r15b
	movq	_DP_EDP_CONFIGURATION_SET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-32(%rbp), %rdx
	movq	%r14, %rdi
	movl	$4, %ecx
	callq	_core_link_read_dpcd
	cmpl	%r15d, -32(%rbp)
	je	LBB0_3
## %bb.2:
	movl	%r15d, -32(%rbp)
	movl	(%rbx), %esi
	leaq	-32(%rbp), %rdx
	movq	%r14, %rdi
	movl	$4, %ecx
	callq	_core_link_write_dpcd
	movq	_DDC_RESULT_SUCESSFULL@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	sete	%dil
	callq	_ASSERT
LBB0_3:
	movl	(%r14), %edx
	movl	4(%r14), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %ecx
	callq	_DC_LOG_DETECTION_DP_CAPS
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_PANEL_MODE_DEFAULT,4,2      ## @DP_PANEL_MODE_DEFAULT
	.comm	_DP_EDP_CONFIGURATION_SET,4,2   ## @DP_EDP_CONFIGURATION_SET
	.comm	_DDC_RESULT_UNKNOWN,4,2         ## @DDC_RESULT_UNKNOWN
	.comm	_DDC_RESULT_SUCESSFULL,4,2      ## @DDC_RESULT_SUCESSFULL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Link: %d eDP panel mode supported: %d eDP panel mode enabled: %d \n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dp_set_panel_mode              ; -- Begin function dp_set_panel_mode
	.p2align	2
_dp_set_panel_mode:                     ; @dp_set_panel_mode
	.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	x21, x1
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	w20, #0
Lloh0:
	adrp	x8, _DP_PANEL_MODE_DEFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DP_PANEL_MODE_DEFAULT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_3
; %bb.1:
	and	w8, w21, #0xfffffffe
	cmp	w8, #128
	cset	w20, eq
Lloh3:
	adrp	x21, _DP_EDP_CONFIGURATION_SET@GOTPAGE
Lloh4:
	ldr	x21, [x21, _DP_EDP_CONFIGURATION_SET@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	mov	w3, #4
	bl	_core_link_read_dpcd
	ldr	w8, [sp, #8]
	cmp	w8, w20
	b.eq	LBB0_3
; %bb.2:
	str	w20, [sp, #8]
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	mov	w3, #4
	bl	_core_link_write_dpcd
Lloh5:
	adrp	x8, _DDC_RESULT_SUCESSFULL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DDC_RESULT_SUCESSFULL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, w8
	cset	w0, eq
	bl	_ASSERT
LBB0_3:
	ldp	w2, w1, [x19]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x3, x20
	bl	_DC_LOG_DETECTION_DP_CAPS
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_PANEL_MODE_DEFAULT,4,2      ; @DP_PANEL_MODE_DEFAULT
	.comm	_DP_EDP_CONFIGURATION_SET,4,2   ; @DP_EDP_CONFIGURATION_SET
	.comm	_DDC_RESULT_UNKNOWN,4,2         ; @DDC_RESULT_UNKNOWN
	.comm	_DDC_RESULT_SUCESSFULL,4,2      ; @DDC_RESULT_SUCESSFULL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Link: %d eDP panel mode supported: %d eDP panel mode enabled: %d \n"

.subsections_via_symbols
