	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lspcon_init                    ## -- Begin function lspcon_init
	.p2align	4, 0x90
_lspcon_init:                           ## @lspcon_init
	.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
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	callq	_to_i915
	movq	16(%rbx), %r15
	movq	%rax, %rdi
	callq	_HAS_LSPCON
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	leaq	8(%rbx), %r14
	movl	$0, 8(%rbx)
	movq	_DRM_LSPCON_MODE_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	%r14, %rdi
	callq	_lspcon_probe
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_intel_dp_read_dpcd
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	%r14, %rdi
	callq	_lspcon_detect_vendor
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	$1, (%r15)
	movl	$1, (%r14)
	leaq	L_.str.4(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movl	$1, %eax
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
LBB0_2:
	callq	_DRM_ERROR
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"LSPCON is not supported on this platform\n"

	.comm	_DRM_LSPCON_MODE_INVALID,4,2    ## @DRM_LSPCON_MODE_INVALID
L_.str.1:                               ## @.str.1
	.asciz	"Failed to probe lspcon\n"

L_.str.2:                               ## @.str.2
	.asciz	"LSPCON DPCD read failed\n"

L_.str.3:                               ## @.str.3
	.asciz	"LSPCON vendor detection failed\n"

L_.str.4:                               ## @.str.4
	.asciz	"Success: LSPCON init\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lspcon_init                    ; -- Begin function lspcon_init
	.p2align	2
_lspcon_init:                           ; @lspcon_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x0
	ldr	x0, [x0]
	bl	_to_i915
	mov	x20, x21
	ldr	x22, [x20, #16]!
	bl	_HAS_LSPCON
	cbz	w0, LBB0_5
; %bb.1:
	sub	x19, x20, #8
Lloh0:
	adrp	x8, _DRM_LSPCON_MODE_INVALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_LSPCON_MODE_INVALID@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	wzr, w8, [x21, #8]
	mov	x0, x19
	bl	_lspcon_probe
	cbz	w0, LBB0_6
; %bb.2:
	mov	x0, x20
	bl	_intel_dp_read_dpcd
	cbz	w0, LBB0_7
; %bb.3:
	mov	x0, x19
	bl	_lspcon_detect_vendor
	cbz	w0, LBB0_8
; %bb.4:
	mov	w20, #1
	str	w20, [x22]
	str	w20, [x19]
Lloh3:
	adrp	x0, l_.str.4@PAGE
Lloh4:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_DEBUG_KMS
	b	LBB0_10
LBB0_5:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_6:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_7:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_9:
	bl	_DRM_ERROR
	mov	w20, #0
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"LSPCON is not supported on this platform\n"

	.comm	_DRM_LSPCON_MODE_INVALID,4,2    ; @DRM_LSPCON_MODE_INVALID
l_.str.1:                               ; @.str.1
	.asciz	"Failed to probe lspcon\n"

l_.str.2:                               ; @.str.2
	.asciz	"LSPCON DPCD read failed\n"

l_.str.3:                               ; @.str.3
	.asciz	"LSPCON vendor detection failed\n"

l_.str.4:                               ; @.str.4
	.asciz	"Success: LSPCON init\n"

.subsections_via_symbols
