	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_hdcp_check_link
_intel_hdcp_check_link:                 ## @intel_hdcp_check_link
	.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
	callq	_conn_to_dig_port
	movq	%rax, %r15
	movl	(%rax), %r12d
	leaq	24(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	16(%rbx), %rax
	movq	_DRM_MODE_CONTENT_PROTECTION_ENABLED@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_2
## %bb.1:
	cmpl	$0, 40(%rbx)
	je	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	callq	_intel_hdcp_in_use
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	(%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %r13d
	movl	%r12d, %edi
	callq	_PORT_HDCP_STATUS
	movl	%eax, %edi
	callq	_I915_READ
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%r13d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	_ENXIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_14:
	movq	_DRM_MODE_CONTENT_PROTECTION_DESIRED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_15:
	movq	%rax, 16(%rbx)
	addq	$28, %rbx
	movq	%rbx, %rdi
	callq	_schedule_work
	jmp	LBB0_16
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_16:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	32(%rbx), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	16(%rbx), %rax
	movq	_DRM_MODE_CONTENT_PROTECTION_UNDESIRED@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	je	LBB0_16
## %bb.7:
	movq	(%r13), %rax
	jmp	LBB0_15
LBB0_8:
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movq	%rbx, %rdi
	callq	__intel_hdcp_disable
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_13
LBB0_10:
	movq	%rbx, %rdi
	callq	__intel_hdcp_enable
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rdi
LBB0_13:
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_14
LBB0_11:
	xorl	%r15d, %r15d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_CONTENT_PROTECTION_ENABLED,8,3 ## @DRM_MODE_CONTENT_PROTECTION_ENABLED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s:%d HDCP link stopped encryption,%x\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_DRM_MODE_CONTENT_PROTECTION_DESIRED,8,3 ## @DRM_MODE_CONTENT_PROTECTION_DESIRED
	.comm	_DRM_MODE_CONTENT_PROTECTION_UNDESIRED,8,3 ## @DRM_MODE_CONTENT_PROTECTION_UNDESIRED
L_.str.1:                               ## @.str.1
	.asciz	"[%s:%d] HDCP link failed, retrying authentication\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to disable hdcp (%d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to enable hdcp (%d)\n"

	.no_dead_strip	_intel_hdcp_check_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_hdcp_check_link
_intel_hdcp_check_link:                 ; @intel_hdcp_check_link
	.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	x20, x0
	bl	_conn_to_dig_port
	mov	x21, x0
	ldr	w22, [x0]
	add	x19, x20, #24
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20, #16]
Lloh0:
	adrp	x23, _DRM_MODE_CONTENT_PROTECTION_ENABLED@GOTPAGE
Lloh1:
	ldr	x23, [x23, _DRM_MODE_CONTENT_PROTECTION_ENABLED@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	ldr	w8, [x20, #40]
	cbz	w8, LBB0_5
; %bb.2:
	mov	x0, x20
	bl	_intel_hdcp_in_use
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_7
; %bb.3:
	ldp	w23, w21, [x20]
	mov	x0, x22
	bl	_PORT_HDCP_STATUS
	bl	_I915_READ
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x23, x0, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_DRM_ERROR
Lloh4:
	adrp	x8, _ENXIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_4:
Lloh7:
	adrp	x8, _DRM_MODE_CONTENT_PROTECTION_DESIRED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DRM_MODE_CONTENT_PROTECTION_DESIRED@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	str	x8, [x20, #16]
	add	x0, x20, #28
	bl	_schedule_work
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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_7:
	ldr	x8, [x20, #32]
	ldr	x8, [x8]
	mov	x0, x21
	blr	x8
	cbz	x0, LBB0_10
; %bb.8:
	ldr	x8, [x20, #16]
Lloh13:
	adrp	x9, _DRM_MODE_CONTENT_PROTECTION_UNDESIRED@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DRM_MODE_CONTENT_PROTECTION_UNDESIRED@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.9:
	mov	w21, #0
	b	LBB0_6
LBB0_10:
	ldp	w2, w1, [x20]
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x20
	bl	__intel_hdcp_disable
	cbz	w0, LBB0_13
; %bb.11:
	mov	x21, x0
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_12:
	ldr	x8, [x23]
	str	x8, [x20, #16]
	add	x0, x20, #28
	bl	_schedule_work
	mov	w21, #0
	b	LBB0_6
LBB0_13:
	mov	x0, x20
	bl	__intel_hdcp_enable
	mov	x21, x0
	cbz	w0, LBB0_6
; %bb.14:
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_15:
	mov	x1, x21
	bl	_DRM_ERROR
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_CONTENT_PROTECTION_ENABLED,8,3 ; @DRM_MODE_CONTENT_PROTECTION_ENABLED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s:%d HDCP link stopped encryption,%x\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_DRM_MODE_CONTENT_PROTECTION_DESIRED,8,3 ; @DRM_MODE_CONTENT_PROTECTION_DESIRED
	.comm	_DRM_MODE_CONTENT_PROTECTION_UNDESIRED,8,3 ; @DRM_MODE_CONTENT_PROTECTION_UNDESIRED
l_.str.1:                               ; @.str.1
	.asciz	"[%s:%d] HDCP link failed, retrying authentication\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to disable hdcp (%d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to enable hdcp (%d)\n"

	.no_dead_strip	_intel_hdcp_check_link
.subsections_via_symbols
