	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dc_link_add_remote_sink        ## -- Begin function dc_link_add_remote_sink
	.p2align	4, 0x90
_dc_link_add_remote_sink:               ## @dc_link_add_remote_sink
	.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	_DC_MAX_EDID_BUFFER_SIZE@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jge	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dm_error
	jmp	LBB0_11
LBB0_2:
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.4:
	cmpl	$0, (%rcx)
	je	LBB0_3
## %bb.5:
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	%rcx, %rdi
	callq	_dc_sink_create
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	%rax, %r15
	movl	4(%rax), %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_memmove
	movl	%ebx, (%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_link_add_remote_sink_helper
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	movl	(%r14), %edi
	movq	%r15, %rdx
	addq	$8, %rdx
	movq	%r15, %rsi
	callq	_dm_helpers_parse_edid_caps
	movq	_EDID_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_11
## %bb.8:
	movl	$0, (%r15)
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_dm_error
	jmp	LBB0_11
LBB0_3:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_BREAK_TO_DEBUGGER
	jmp	LBB0_11
LBB0_9:
	movq	%r15, %rdi
	callq	_dc_sink_release
LBB0_10:
	xorl	%r15d, %r15d
LBB0_11:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DC_MAX_EDID_BUFFER_SIZE,4,2    ## @DC_MAX_EDID_BUFFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Max EDID buffer size breached!\n"

	.comm	_EDID_OK,4,2                    ## @EDID_OK
L_.str.1:                               ## @.str.1
	.asciz	"Bad EDID, status%d!\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dc_link_add_remote_sink        ; -- Begin function dc_link_add_remote_sink
	.p2align	2
_dc_link_add_remote_sink:               ; @dc_link_add_remote_sink
	.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
Lloh0:
	adrp	x8, _DC_MAX_EDID_BUFFER_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DC_MAX_EDID_BUFFER_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ge	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dm_error
	b	LBB0_9
LBB0_2:
	cbz	x3, LBB0_8
; %bb.3:
	ldr	w8, [x3]
	cbz	w8, LBB0_8
; %bb.4:
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	mov	x0, x3
	bl	_dc_sink_create
	mov	x19, x0
	cbz	x0, LBB0_10
; %bb.5:
	ldr	w0, [x19, #4]
	mov	x1, x22
	mov	x2, x21
	bl	_memmove
	str	w21, [x19]
	mov	x0, x20
	mov	x1, x19
	bl	_link_add_remote_sink_helper
	cbz	w0, LBB0_11
; %bb.6:
	ldr	w0, [x20]
	add	x2, x19, #8
	mov	x1, x19
	bl	_dm_helpers_parse_edid_caps
                                        ; kill: def $w0 killed $w0 def $x0
Lloh5:
	adrp	x8, _EDID_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EDID_OK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_10
; %bb.7:
	str	wzr, [x19]
	str	x0, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dm_error
	b	LBB0_10
LBB0_8:
	bl	_BREAK_TO_DEBUGGER
LBB0_9:
	mov	x19, #0
LBB0_10:
	mov	x0, x19
	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
LBB0_11:
	mov	x0, x19
	bl	_dc_sink_release
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DC_MAX_EDID_BUFFER_SIZE,4,2    ; @DC_MAX_EDID_BUFFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Max EDID buffer size breached!\n"

	.comm	_EDID_OK,4,2                    ; @EDID_OK
l_.str.1:                               ; @.str.1
	.asciz	"Bad EDID, status%d!\n"

.subsections_via_symbols
