	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdn_dp_disable
_cdn_dp_disable:                        ## @cdn_dp_disable
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r15
	cmpl	$0, 4(%rdi)
	jle	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	48(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r15, %rdi
	callq	_cdn_dp_disable_phy
	incq	%rbx
	movslq	4(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_5:
	movq	_GRF_SOC_CON26@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DPTX_HPD_SEL_MASK@GOTPCREL(%rip), %rax
	movq	_DPTX_HPD_DEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r15, %rdi
	callq	_cdn_dp_grf_write
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r14d
	movl	40(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	jmp	LBB0_9
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_7:
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_cdn_dp_set_firmware_active
	movq	%r15, %rdi
	callq	_cdn_dp_clk_disable
	movl	$0, (%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r15)
	cmpl	$0, 16(%r15)
	jne	LBB0_9
## %bb.8:
	movq	8(%r15), %rdi
	callq	_kfree
	movq	$0, 8(%r15)
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GRF_SOC_CON26,4,2              ## @GRF_SOC_CON26
	.comm	_DPTX_HPD_SEL_MASK,4,2          ## @DPTX_HPD_SEL_MASK
	.comm	_DPTX_HPD_DEL,4,2               ## @DPTX_HPD_DEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to clear hpd sel %d\n"

	.no_dead_strip	_cdn_dp_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdn_dp_disable
_cdn_dp_disable:                        ; @cdn_dp_disable
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0, #4]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x20, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #48]
	ldr	w1, [x8, x20, lsl #2]
	mov	x0, x19
	bl	_cdn_dp_disable_phy
	add	x20, x20, #1
	ldrsw	x8, [x19, #4]
	cmp	x20, x8
	b.lt	LBB0_3
LBB0_4:
Lloh0:
	adrp	x8, _GRF_SOC_CON26@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GRF_SOC_CON26@GOTPAGEOFF]
Lloh2:
	adrp	x9, _DPTX_HPD_SEL_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DPTX_HPD_SEL_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, _DPTX_HPD_DEL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DPTX_HPD_DEL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_cdn_dp_grf_write
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.5:
	ldr	w0, [x19, #40]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_DRM_DEV_ERROR
	b	LBB0_9
LBB0_6:
	mov	w20, #0
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	mov	w1, #0
	bl	_cdn_dp_set_firmware_active
	mov	x0, x19
	bl	_cdn_dp_clk_disable
	str	wzr, [x19]
	stp	xzr, xzr, [x19, #24]
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_9
; %bb.8:
	ldr	x0, [x19, #8]
	bl	_kfree
	mov	w20, #0
	str	xzr, [x19, #8]
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GRF_SOC_CON26,4,2              ; @GRF_SOC_CON26
	.comm	_DPTX_HPD_SEL_MASK,4,2          ; @DPTX_HPD_SEL_MASK
	.comm	_DPTX_HPD_DEL,4,2               ; @DPTX_HPD_DEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to clear hpd sel %d\n"

	.no_dead_strip	_cdn_dp_disable
.subsections_via_symbols
