	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdn_dp_get_sink_capability
_cdn_dp_get_sink_capability:            ## @cdn_dp_get_sink_capability
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_cdn_dp_check_sink_connection
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_DP_DPCD_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r14), %edx
	movq	_DP_RECEIVER_CAP_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_cdn_dp_dpcd_read
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movl	8(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	jmp	LBB0_5
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_4:
	movl	4(%r14), %edi
	callq	_kfree
	movq	_cdn_dp_get_edid_block@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r14, %rdx
	callq	_drm_do_get_edid
	movl	%eax, 4(%r14)
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_DP_DPCD_REV,4,2                ## @DP_DPCD_REV
	.comm	_DP_RECEIVER_CAP_SIZE,4,2       ## @DP_RECEIVER_CAP_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get caps %d\n"

	.comm	_cdn_dp_get_edid_block,4,2      ## @cdn_dp_get_edid_block
	.no_dead_strip	_cdn_dp_get_sink_capability
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdn_dp_get_sink_capability
_cdn_dp_get_sink_capability:            ; @cdn_dp_get_sink_capability
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_cdn_dp_check_sink_connection
	cbz	w0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _DP_DPCD_REV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DP_DPCD_REV@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x19, #12]
Lloh3:
	adrp	x8, _DP_RECEIVER_CAP_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DP_RECEIVER_CAP_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_cdn_dp_dpcd_read
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x19, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_DRM_DEV_ERROR
	b	LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19, #4]
	bl	_kfree
Lloh11:
	adrp	x8, _cdn_dp_get_edid_block@GOTPAGE
Lloh12:
	ldr	x8, [x8, _cdn_dp_get_edid_block@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x19
	bl	_drm_do_get_edid
	str	w0, [x19, #4]
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_DP_DPCD_REV,4,2                ; @DP_DPCD_REV
	.comm	_DP_RECEIVER_CAP_SIZE,4,2       ; @DP_RECEIVER_CAP_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get caps %d\n"

	.comm	_cdn_dp_get_edid_block,4,2      ; @cdn_dp_get_edid_block
	.no_dead_strip	_cdn_dp_get_sink_capability
.subsections_via_symbols
