	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdn_dp_enable
_cdn_dp_enable:                         ## @cdn_dp_enable
	.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	%rdi, %r14
	callq	_cdn_dp_connected_port
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	xorl	%r12d, %r12d
	cmpl	$0, (%r14)
	jne	LBB0_14
## %bb.3:
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_cdn_dp_clk_enable
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.4:
	movq	%r14, %rdi
	callq	_cdn_dp_firmware_init
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r12d
	movl	24(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
	jmp	LBB0_13
LBB0_1:
	movl	24(%r14), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_14:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movslq	(%rbx), %rbx
	xorl	%r12d, %r12d
	cmpl	4(%r14), %ebx
	jge	LBB0_13
## %bb.7:
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	movslq	4(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_13
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movq	(%rax,%rbx,8), %r15
	movq	%r15, %rdi
	callq	_cdn_dp_get_port_lanes
	testl	%eax, %eax
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_cdn_dp_enable_phy
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%r14, %rdi
	callq	_cdn_dp_get_sink_capability
	testl	%eax, %eax
	je	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, %r12d
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_cdn_dp_disable_phy
	jmp	LBB0_12
LBB0_13:
	movq	%r14, %rdi
	callq	_cdn_dp_clk_disable
	jmp	LBB0_14
LBB0_15:
	movl	$1, (%r14)
	movl	4(%r15), %eax
	movl	%eax, 8(%r14)
	xorl	%r12d, %r12d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't enable without connection\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"firmware init failed: %d"

	.no_dead_strip	_cdn_dp_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdn_dp_enable
_cdn_dp_enable:                         ; @cdn_dp_enable
	.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
	mov	x19, x0
	bl	_cdn_dp_connected_port
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x19]
	cbz	w8, LBB0_4
; %bb.2:
	mov	w20, #0
	b	LBB0_16
LBB0_3:
	ldr	w0, [x19, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DRM_DEV_ERROR
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_16
LBB0_4:
	mov	x21, x0
	mov	x0, x19
	bl	_cdn_dp_clk_enable
	mov	x20, x0
	cbnz	w0, LBB0_16
; %bb.5:
	mov	x0, x19
	bl	_cdn_dp_firmware_init
	cbz	w0, LBB0_7
; %bb.6:
	mov	x20, x0
	ldr	w0, [x19, #24]
	str	x20, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_DRM_DEV_ERROR
	b	LBB0_15
LBB0_7:
	ldrsw	x22, [x21]
	ldr	w8, [x19, #4]
	cmp	w22, w8
	b.ge	LBB0_14
; %bb.8:
	mov	w20, #0
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x19, #4]
	cmp	x22, x8
	b.ge	LBB0_15
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x21, [x8, x22, lsl #3]
	mov	x0, x21
	bl	_cdn_dp_get_port_lanes
	cbz	w0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_cdn_dp_enable_phy
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	bl	_cdn_dp_get_sink_capability
	mov	x20, x0
	cbz	w0, LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_cdn_dp_disable_phy
	b	LBB0_9
LBB0_14:
	mov	w20, #0
LBB0_15:
	mov	x0, x19
	bl	_cdn_dp_clk_disable
LBB0_16:
	mov	x0, x20
	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_17:
	mov	w8, #1
	str	w8, [x19]
	ldr	w8, [x21, #4]
	str	w8, [x19, #8]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't enable without connection\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"firmware init failed: %d"

	.no_dead_strip	_cdn_dp_enable
.subsections_via_symbols
