	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_hdcp_auth_downstream
_intel_hdcp_auth_downstream:            ## @intel_hdcp_auth_downstream
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_conn_to_dig_port
	movq	%rax, %r14
	movq	(%rbx), %r15
	movq	8(%rbx), %r12
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_intel_hdcp_poll_ksv_fifo
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_7
LBB0_2:
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	callq	*(%r12)
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movl	-56(%rbp), %edi
	callq	_DRM_HDCP_MAX_DEVICE_EXCEEDED
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movl	-52(%rbp), %edi
	callq	_DRM_HDCP_MAX_CASCADE_EXCEEDED
	testq	%rax, %rax
	je	LBB0_9
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_6:
	subl	(%rax), %ebx
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	-56(%rbp), %edi
	callq	_DRM_HDCP_NUM_DOWNSTREAM
	testl	%eax, %eax
	je	LBB0_14
## %bb.10:
	movl	%eax, %r13d
	movq	_DRM_HDCP_KSV_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:
	movq	%rax, %rbx
	movq	%r14, %rdi
	movl	%r13d, %esi
	movq	%rax, %rdx
	callq	*8(%r12)
	movq	%rbx, %rcx
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
## %bb.12:
	movq	%r15, %rdi
	movq	%rcx, %rbx
	movq	%rcx, %rsi
	movl	%r13d, %edx
	callq	_drm_hdcp_check_ksvs_revoked
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	leaq	L_.str.4(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EPERM@GOTPCREL(%rip), %rax
	movq	%rbx, %rcx
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_14:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_15:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_16:
	leaq	-56(%rbp), %r8
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	movl	%r13d, %ecx
	callq	_intel_hdcp_validate_v_prime
	testl	%eax, %eax
	movq	%rbx, %r15
	je	LBB0_20
## %bb.17:
	leaq	-56(%rbp), %r8
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movl	%r13d, %ecx
	callq	_intel_hdcp_validate_v_prime
	testl	%eax, %eax
	je	LBB0_20
## %bb.18:
	leaq	-56(%rbp), %r8
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movl	%r13d, %ecx
	callq	_intel_hdcp_validate_v_prime
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rdi
	movl	%eax, %esi
	jmp	LBB0_21
LBB0_20:
	leaq	L_.str.6(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r13d, %esi
LBB0_21:
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	%r15, %rcx
LBB0_22:
	movq	%rcx, %rdi
	callq	_kfree
	jmp	LBB0_7
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"KSV list failed to become ready (%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Max Topology Limit Exceeded\n"

	.comm	_EPERM,4,2                      ## @EPERM
L_.str.2:                               ## @.str.2
	.asciz	"Repeater with zero downstream devices\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DRM_HDCP_KSV_LEN,4,2           ## @DRM_HDCP_KSV_LEN
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.3:                               ## @.str.3
	.asciz	"Out of mem: ksv_fifo\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.4:                               ## @.str.4
	.asciz	"Revoked Ksv(s) in ksv_fifo\n"

L_.str.5:                               ## @.str.5
	.asciz	"V Prime validation failed.(%d)\n"

L_.str.6:                               ## @.str.6
	.asciz	"HDCP is enabled (%d downstream devices)\n"

	.no_dead_strip	_intel_hdcp_auth_downstream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_hdcp_auth_downstream
_intel_hdcp_auth_downstream:            ; @intel_hdcp_auth_downstream
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_conn_to_dig_port
	mov	x19, x0
	ldp	x23, x20, [x21]
	mov	x1, x20
	bl	_intel_hdcp_poll_ksv_fifo
	cbz	w0, LBB0_2
; %bb.1:
	mov	x24, x0
	str	x24, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	b	LBB0_7
LBB0_2:
	ldr	x8, [x20]
	add	x1, sp, #16
	mov	x0, x19
	blr	x8
	mov	x24, x0
	cbnz	w0, LBB0_7
; %bb.3:
	ldr	w0, [sp, #16]
	bl	_DRM_HDCP_MAX_DEVICE_EXCEEDED
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	w0, [sp, #20]
	bl	_DRM_HDCP_MAX_CASCADE_EXCEEDED
	cbz	x0, LBB0_9
LBB0_5:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh7:
	adrp	x8, _EPERM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_7:
	ldr	x8, [sp, #24]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.8:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_9:
	ldr	w0, [sp, #16]
	bl	_DRM_HDCP_NUM_DOWNSTREAM
	cbz	w0, LBB0_14
; %bb.10:
	mov	x22, x0
Lloh12:
	adrp	x8, _DRM_HDCP_KSV_LEN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DRM_HDCP_KSV_LEN@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x1, x22
	bl	_kcalloc
	cbz	x0, LBB0_15
; %bb.11:
	mov	x21, x0
	ldr	x8, [x20, #8]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	blr	x8
	mov	x24, x0
	cbnz	w0, LBB0_21
; %bb.12:
	mov	x0, x23
	mov	x1, x21
	mov	x2, x22
	bl	_drm_hdcp_check_ksvs_revoked
	cbz	x0, LBB0_16
; %bb.13:
Lloh18:
	adrp	x0, l_.str.4@PAGE
Lloh19:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_ERROR
Lloh20:
	adrp	x8, _EPERM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_21
LBB0_14:
Lloh23:
	adrp	x0, l_.str.2@PAGE
Lloh24:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_15:
Lloh27:
	adrp	x0, l_.str.3@PAGE
Lloh28:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh29:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_16:
	add	x4, sp, #16
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_intel_hdcp_validate_v_prime
	cbz	w0, LBB0_20
; %bb.17:
	add	x4, sp, #16
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_intel_hdcp_validate_v_prime
	cbz	w0, LBB0_20
; %bb.18:
	add	x4, sp, #16
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_intel_hdcp_validate_v_prime
	cbz	w0, LBB0_20
; %bb.19:
	mov	x24, x0
	str	x24, [sp]
Lloh31:
	adrp	x0, l_.str.5@PAGE
Lloh32:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DRM_DEBUG_KMS
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	b	LBB0_21
LBB0_20:
	str	x22, [sp]
Lloh33:
	adrp	x0, l_.str.6@PAGE
Lloh34:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	w24, #0
LBB0_21:
	mov	x0, x21
	bl	_kfree
	b	LBB0_7
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"KSV list failed to become ready (%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Max Topology Limit Exceeded\n"

	.comm	_EPERM,4,2                      ; @EPERM
l_.str.2:                               ; @.str.2
	.asciz	"Repeater with zero downstream devices\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DRM_HDCP_KSV_LEN,4,2           ; @DRM_HDCP_KSV_LEN
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.3:                               ; @.str.3
	.asciz	"Out of mem: ksv_fifo\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.4:                               ; @.str.4
	.asciz	"Revoked Ksv(s) in ksv_fifo\n"

l_.str.5:                               ; @.str.5
	.asciz	"V Prime validation failed.(%d)\n"

l_.str.6:                               ; @.str.6
	.asciz	"HDCP is enabled (%d downstream devices)\n"

	.no_dead_strip	_intel_hdcp_auth_downstream
.subsections_via_symbols
