	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdn_dp_check_sink_connection
_cdn_dp_check_sink_connection:          ## @cdn_dp_check_sink_connection
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_jiffies@GOTPCREL(%rip), %r12
	movq	(%r12), %r15
	movq	_CDN_DPCD_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r14
	movq	$0, -48(%rbp)
	movq	(%rbx), %rax
	cmpq	8(%rbx), %rax
	jae	LBB0_1
## %bb.2:
	addq	%r15, %r14
	movq	24(%rbx), %rcx
	movq	(%rcx,%rax,8), %r13
	movq	(%r12), %rdi
	movq	%r14, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	_EXTCON_DISP_DP@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	movl	(%r15), %esi
	callq	_extcon_get_state
	testl	%eax, %eax
	je	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	leaq	-48(%rbp), %rsi
	callq	_cdn_dp_get_sink_count
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$10000, %esi                    ## imm = 0x2710
	callq	_usleep_range
	movq	(%r12), %rdi
	movq	%r14, %rsi
	callq	_time_before
	testq	%rax, %rax
	jne	LBB0_4
LBB0_8:
	movl	16(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_9
LBB0_1:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
LBB0_9:
	callq	_DRM_DEV_ERROR
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%eax, %eax
	cmpq	$0, -48(%rbp)
	setne	%al
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_CDN_DPCD_TIMEOUT_MS,4,2        ## @CDN_DPCD_TIMEOUT_MS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"active_port is wrong!\n"

	.comm	_EXTCON_DISP_DP,4,2             ## @EXTCON_DISP_DP
L_.str.1:                               ## @.str.1
	.asciz	"Get sink capability timed out\n"

	.no_dead_strip	_cdn_dp_check_sink_connection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdn_dp_check_sink_connection
_cdn_dp_check_sink_connection:          ; @cdn_dp_check_sink_connection
	.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
Lloh0:
	adrp	x21, _jiffies@GOTPAGE
Lloh1:
	ldr	x21, [x21, _jiffies@GOTPAGEOFF]
	ldr	x20, [x21]
Lloh2:
	adrp	x8, _CDN_DPCD_TIMEOUT_MS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CDN_DPCD_TIMEOUT_MS@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	str	xzr, [sp, #8]
	ldp	x8, x9, [x19]
	cmp	x8, x9
	b.hs	LBB0_7
; %bb.1:
	add	x20, x0, x20
	ldr	x9, [x19, #24]
	ldr	x22, [x9, x8, lsl #3]
	ldr	x0, [x21]
	mov	x1, x20
	bl	_time_before
	cbz	x0, LBB0_6
; %bb.2:
Lloh5:
	adrp	x23, _EXTCON_DISP_DP@GOTPAGE
Lloh6:
	ldr	x23, [x23, _EXTCON_DISP_DP@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	ldr	w1, [x23]
	bl	_extcon_get_state
	cbz	w0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, sp, #8
	mov	x0, x19
	bl	_cdn_dp_get_sink_count
	cbz	w0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #5000
	mov	w1, #10000
	bl	_usleep_range
	ldr	x0, [x21]
	mov	x1, x20
	bl	_time_before
	cbnz	x0, LBB0_3
LBB0_6:
	ldr	w0, [x19, #16]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_7:
	ldr	w0, [x19, #16]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
LBB0_8:
	bl	_DRM_DEV_ERROR
	mov	w0, #0
LBB0_9:
	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_10:
	ldr	x8, [sp, #8]
	cmp	x8, #0
	cset	w0, ne
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_CDN_DPCD_TIMEOUT_MS,4,2        ; @CDN_DPCD_TIMEOUT_MS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"active_port is wrong!\n"

	.comm	_EXTCON_DISP_DP,4,2             ; @EXTCON_DISP_DP
l_.str.1:                               ; @.str.1
	.asciz	"Get sink capability timed out\n"

	.no_dead_strip	_cdn_dp_check_sink_connection
.subsections_via_symbols
