	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lspcon_probe
_lspcon_probe:                          ## @lspcon_probe
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_lspcon_to_intel_dp
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_lspcon_wake_native_aux_ch
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	_DRM_LSPCON_MODE_LS@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_DRM_LSPCON_MODE_PCON@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r14d
	movq	%r15, %rdi
	callq	_drm_dp_dual_mode_detect
	movq	_DRM_DP_DUAL_MODE_LSPCON@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	je	LBB0_10
## %bb.4:
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movq	%r15, %rdi
	callq	_drm_dp_dual_mode_detect
	cmpl	(%rbx), %eax
	je	LBB0_10
## %bb.5:
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movq	%r15, %rdi
	callq	_drm_dp_dual_mode_detect
	cmpl	(%rbx), %eax
	je	LBB0_10
## %bb.6:
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movq	%r15, %rdi
	callq	_drm_dp_dual_mode_detect
	cmpl	(%rbx), %eax
	je	LBB0_10
## %bb.7:
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movq	%r15, %rdi
	callq	_drm_dp_dual_mode_detect
	cmpl	(%rbx), %eax
	je	LBB0_10
## %bb.8:
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movq	%r15, %rdi
	callq	_drm_dp_dual_mode_detect
	cmpl	(%rbx), %eax
	jne	LBB0_9
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_lspcon_wait_mode
	movl	%eax, (%r12)
	movq	_DRM_LSPCON_MODE_PCON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	$1, %ebx
	cmpl	%esi, %eax
	je	LBB0_13
## %bb.11:
	movq	%r12, %rdi
	callq	_lspcon_change_mode
	testq	%rax, %rax
	jns	LBB0_13
## %bb.12:
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_ERROR
	xorl	%ebx, %ebx
LBB0_13:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	%eax, %edi
	callq	_drm_dp_get_dual_mode_type_name
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_LSPCON_MODE_PCON,4,2       ## @DRM_LSPCON_MODE_PCON
	.comm	_DRM_LSPCON_MODE_LS,4,2         ## @DRM_LSPCON_MODE_LS
	.comm	_DRM_DP_DUAL_MODE_LSPCON,4,2    ## @DRM_DP_DUAL_MODE_LSPCON
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No LSPCON detected, found %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"LSPCON detected\n"

L_.str.2:                               ## @.str.2
	.asciz	"LSPCON mode change to PCON failed\n"

	.no_dead_strip	_lspcon_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lspcon_probe
_lspcon_probe:                          ; @lspcon_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_lspcon_to_intel_dp
	mov	x21, x0
	mov	x0, x19
	bl	_lspcon_wake_native_aux_ch
Lloh0:
	adrp	x22, _DRM_LSPCON_MODE_PCON@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DRM_LSPCON_MODE_PCON@GOTPAGEOFF]
Lloh2:
	adrp	x8, _DRM_LSPCON_MODE_LS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DRM_LSPCON_MODE_LS@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x22, eq
	ldr	w20, [x8]
	mov	x0, x21
	bl	_drm_dp_dual_mode_detect
Lloh4:
	adrp	x23, _DRM_DP_DUAL_MODE_LSPCON@GOTPAGE
Lloh5:
	ldr	x23, [x23, _DRM_DP_DUAL_MODE_LSPCON@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w0, w8
	b.eq	LBB0_6
; %bb.1:
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	mov	x0, x21
	bl	_drm_dp_dual_mode_detect
	ldr	w8, [x23]
	cmp	w0, w8
	b.eq	LBB0_6
; %bb.2:
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	mov	x0, x21
	bl	_drm_dp_dual_mode_detect
	ldr	w8, [x23]
	cmp	w0, w8
	b.eq	LBB0_6
; %bb.3:
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	mov	x0, x21
	bl	_drm_dp_dual_mode_detect
	ldr	w8, [x23]
	cmp	w0, w8
	b.eq	LBB0_6
; %bb.4:
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	mov	x0, x21
	bl	_drm_dp_dual_mode_detect
	ldr	w8, [x23]
	cmp	w0, w8
	b.eq	LBB0_6
; %bb.5:
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	mov	x0, x21
	bl	_drm_dp_dual_mode_detect
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_12
LBB0_6:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x19
	mov	x1, x20
	bl	_lspcon_wait_mode
	str	w0, [x19]
	ldr	w1, [x22]
	cmp	w0, w1
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_lspcon_change_mode
	tbnz	x0, #63, LBB0_9
LBB0_8:
	mov	w0, #1
	b	LBB0_11
LBB0_9:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_12:
	bl	_drm_dp_get_dual_mode_type_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	b	LBB0_10
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_LSPCON_MODE_PCON,4,2       ; @DRM_LSPCON_MODE_PCON
	.comm	_DRM_LSPCON_MODE_LS,4,2         ; @DRM_LSPCON_MODE_LS
	.comm	_DRM_DP_DUAL_MODE_LSPCON,4,2    ; @DRM_DP_DUAL_MODE_LSPCON
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No LSPCON detected, found %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"LSPCON detected\n"

l_.str.2:                               ; @.str.2
	.asciz	"LSPCON mode change to PCON failed\n"

	.no_dead_strip	_lspcon_probe
.subsections_via_symbols
