	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function emulated_link_detect
_emulated_link_detect:                  ## @emulated_link_detect
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -32(%rbp)
	movq	$0, -16(%rbp)
	movq	_dc_connection_none@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rdi)
	movq	16(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_dc_sink_retain
LBB0_2:
	movl	(%rbx), %esi
	leal	-128(%rsi), %eax
	cmpl	$5, %eax
	jae	LBB0_3
LBB0_5:
	movq	%rbx, -24(%rbp)
	movl	%esi, -32(%rbp)
	leaq	-32(%rbp), %rdi
	callq	_dc_sink_create
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, 16(%rbx)
	movq	8(%rbx), %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_dm_helpers_read_local_edid
	movq	_EDID_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_10
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_9
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
LBB0_9:
	xorl	%eax, %eax
	callq	_DC_ERROR
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	cmpl	$133, %esi
	jne	LBB0_11
## %bb.4:
	movq	_SIGNAL_TYPE_VIRTUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_5
LBB0_11:
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_DC_ERROR                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_dc_connection_none,4,2         ## @dc_connection_none
	.comm	_DDC_TRANSACTION_TYPE_I2C,8,3   ## @DDC_TRANSACTION_TYPE_I2C
	.comm	_DDC_TRANSACTION_TYPE_I2C_OVER_AUX,8,3 ## @DDC_TRANSACTION_TYPE_I2C_OVER_AUX
	.comm	_SIGNAL_TYPE_VIRTUAL,4,2        ## @SIGNAL_TYPE_VIRTUAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid connector type! signal:%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to create sink!\n"

	.comm	_EDID_OK,4,2                    ## @EDID_OK
L_.str.2:                               ## @.str.2
	.asciz	"Failed to read EDID"

	.no_dead_strip	_emulated_link_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function emulated_link_detect
_emulated_link_detect:                  ; @emulated_link_detect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp, #24]
Lloh0:
	adrp	x8, _dc_connection_none@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dc_connection_none@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #24]
	ldr	x0, [x0, #16]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_dc_sink_retain
LBB0_2:
	ldr	w8, [x19]
	sub	w9, w8, #128
	cmp	w9, #5
	b.hs	LBB0_7
LBB0_3:
	str	x19, [sp, #16]
	str	w8, [sp, #8]
	add	x0, sp, #8
	bl	_dc_sink_create
	cbz	x0, LBB0_6
; %bb.4:
	mov	x2, x0
	str	x0, [x19, #16]
	ldr	x0, [x19, #8]
	mov	x1, x19
	bl	_dm_helpers_read_local_edid
Lloh3:
	adrp	x8, _EDID_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EDID_OK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_11
; %bb.5:
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_6:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_7:
	cmp	w8, #133
	b.ne	LBB0_9
; %bb.8:
Lloh10:
	adrp	x8, _SIGNAL_TYPE_VIRTUAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SIGNAL_TYPE_VIRTUAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	b	LBB0_3
LBB0_9:
	str	x8, [sp]
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
LBB0_10:
	bl	_DC_ERROR
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_dc_connection_none,4,2         ; @dc_connection_none
	.comm	_DDC_TRANSACTION_TYPE_I2C,8,3   ; @DDC_TRANSACTION_TYPE_I2C
	.comm	_DDC_TRANSACTION_TYPE_I2C_OVER_AUX,8,3 ; @DDC_TRANSACTION_TYPE_I2C_OVER_AUX
	.comm	_SIGNAL_TYPE_VIRTUAL,4,2        ; @SIGNAL_TYPE_VIRTUAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid connector type! signal:%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to create sink!\n"

	.comm	_EDID_OK,4,2                    ; @EDID_OK
l_.str.2:                               ; @.str.2
	.asciz	"Failed to read EDID"

	.no_dead_strip	_emulated_link_detect
.subsections_via_symbols
