	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mei_hdcp_verify_receiver_cert_prepare_km
_mei_hdcp_verify_receiver_cert_prepare_km: ## @mei_hdcp_verify_receiver_cert_prepare_km
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movq	$0, -64(%rbp)
	movaps	%xmm0, -128(%rbp)
	movaps	%xmm0, -144(%rbp)
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	%rsi, %r15
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.2:
	movq	%rdx, %rbx
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.3:
	movq	%rcx, %r12
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.4:
	testq	%r8, %r8
	je	LBB0_6
## %bb.5:
	testq	%r9, %r9
	je	LBB0_6
## %bb.7:
	movq	%rdi, %r13
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	callq	_to_mei_cl_device
	movq	%rax, %r14
	movq	_HDCP_API_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)
	movq	_WIRED_VERIFY_RECEIVER_CERT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movq	_ME_HDCP_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)
	movq	_WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	movl	4(%r15), %eax
	movl	%eax, -96(%rbp)
	movl	(%r15), %edi
	callq	_mei_get_ddi_index
	movl	%eax, -100(%rbp)
	movl	12(%rbx), %eax
	movl	%eax, -104(%rbp)
	leaq	8(%rbx), %rsi
	movq	_HDCP_2_2_RRX_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	callq	_memcpy
	movq	(%rbx), %rsi
	movq	_HDCP_2_2_RXCAPS_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	callq	_memcpy
	leaq	-112(%rbp), %rsi
	movq	%r14, %rdi
	movl	$56, %edx
	callq	_mei_cldev_send
	testq	%rax, %rax
	js	LBB0_8
## %bb.10:
	leaq	-144(%rbp), %rsi
	movq	%r14, %rdi
	movl	$32, %edx
	callq	_mei_cldev_recv
	testq	%rax, %rax
	js	LBB0_11
## %bb.12:
	movq	-128(%rbp), %rcx
	movq	_ME_HDCP_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_13
## %bb.14:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	cmpq	$0, -136(%rbp)
	setne	%al
	movl	%eax, (%r12)
	sete	%cl
	leaq	4(,%rcx,4), %rax
	jne	LBB0_15
## %bb.16:
	movq	_HDCP_2_2_AKE_NO_STORED_KM@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_8:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_9
LBB0_11:
	movq	%rax, %rbx
	leaq	L_.str.1(%rip), %rsi
LBB0_9:
	movq	%r13, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_18
LBB0_13:
	movq	_WIRED_VERIFY_RECEIVER_CERT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdx
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_15:
	movq	_HDCP_2_2_AKE_STORED_KM@GOTPCREL(%rip), %rcx
LBB0_17:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rdx)
	movq	%rax, (%rsi)
	movl	(%rdx), %edi
	leaq	-144(%rbp), %rsi
	movl	$4, %edx
	callq	_memcpy
	xorl	%ebx, %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HDCP_API_VERSION,4,2           ## @HDCP_API_VERSION
	.comm	_WIRED_VERIFY_RECEIVER_CERT,4,2 ## @WIRED_VERIFY_RECEIVER_CERT
	.comm	_ME_HDCP_STATUS_SUCCESS,8,3     ## @ME_HDCP_STATUS_SUCCESS
	.comm	_WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_IN,4,2 ## @WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_IN
	.comm	_HDCP_2_2_RRX_LEN,4,2           ## @HDCP_2_2_RRX_LEN
	.comm	_HDCP_2_2_RXCAPS_LEN,4,2        ## @HDCP_2_2_RXCAPS_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mei_cldev_send failed: %zd\n"

L_.str.1:                               ## @.str.1
	.asciz	"mei_cldev_recv failed: %zd\n"

L_.str.2:                               ## @.str.2
	.asciz	"ME cmd 0x%08X Failed. Status: 0x%X\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_HDCP_2_2_AKE_STORED_KM,4,2     ## @HDCP_2_2_AKE_STORED_KM
	.comm	_HDCP_2_2_AKE_NO_STORED_KM,4,2  ## @HDCP_2_2_AKE_NO_STORED_KM
	.no_dead_strip	_mei_hdcp_verify_receiver_cert_prepare_km
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mei_hdcp_verify_receiver_cert_prepare_km
_mei_hdcp_verify_receiver_cert_prepare_km: ; @mei_hdcp_verify_receiver_cert_prepare_km
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	xzr, [sp, #96]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #64]
	stp	q0, q0, [sp, #32]
	str	q0, [sp, #16]
	cbz	x0, LBB0_10
; %bb.1:
	mov	x25, x1
	cbz	x1, LBB0_10
; %bb.2:
	mov	x23, x2
	cbz	x2, LBB0_10
; %bb.3:
	mov	x22, x3
	cbz	x3, LBB0_10
; %bb.4:
	mov	x19, x4
	cbz	x4, LBB0_10
; %bb.5:
	mov	x20, x5
	cbz	x5, LBB0_10
; %bb.6:
	mov	x21, x0
	bl	_to_mei_cl_device
	mov	x24, x0
Lloh0:
	adrp	x8, _HDCP_API_VERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDCP_API_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x26, _WIRED_VERIFY_RECEIVER_CERT@GOTPAGE
Lloh4:
	ldr	x26, [x26, _WIRED_VERIFY_RECEIVER_CERT@GOTPAGEOFF]
	ldr	w9, [x26]
	stp	w9, w8, [sp, #88]
Lloh5:
	adrp	x27, _ME_HDCP_STATUS_SUCCESS@GOTPAGE
Lloh6:
	ldr	x27, [x27, _ME_HDCP_STATUS_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x27]
Lloh7:
	adrp	x9, _WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_IN@GOTPAGE
Lloh8:
	ldr	x9, [x9, _WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_IN@GOTPAGEOFF]
	str	x8, [sp, #80]
Lloh9:
	ldr	w8, [x9]
	ldp	w0, w9, [x25]
	str	w8, [sp, #72]
	str	w9, [sp, #64]
	bl	_mei_get_ddi_index
	ldr	w8, [x23, #12]
	stp	w8, w0, [sp, #56]
	add	x1, x23, #8
Lloh10:
	adrp	x8, _HDCP_2_2_RRX_LEN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HDCP_2_2_RRX_LEN@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	w0, #0
	bl	_memcpy
	ldr	x1, [x23]
Lloh13:
	adrp	x8, _HDCP_2_2_RXCAPS_LEN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HDCP_2_2_RXCAPS_LEN@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	w0, #0
	bl	_memcpy
	add	x1, sp, #48
	mov	x0, x24
	mov	w2, #56
	bl	_mei_cldev_send
	tbnz	x0, #63, LBB0_12
; %bb.7:
	add	x1, sp, #16
	mov	x0, x24
	mov	w2, #32
	bl	_mei_cldev_recv
	tbnz	x0, #63, LBB0_13
; %bb.8:
	ldr	x8, [sp, #32]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.9:
	ldr	x8, [sp, #24]
	mov	w9, #4
	mov	w10, #8
	cmp	x8, #0
	csel	x8, x10, x9, eq
	cset	w9, ne
Lloh16:
	adrp	x10, _HDCP_2_2_AKE_NO_STORED_KM@GOTPAGE
Lloh17:
	ldr	x10, [x10, _HDCP_2_2_AKE_NO_STORED_KM@GOTPAGEOFF]
Lloh18:
	adrp	x11, _HDCP_2_2_AKE_STORED_KM@GOTPAGE
Lloh19:
	ldr	x11, [x11, _HDCP_2_2_AKE_STORED_KM@GOTPAGEOFF]
	str	w9, [x22]
	csel	x9, x10, x11, eq
	ldr	w9, [x9]
	str	w9, [x19, #4]
	str	x8, [x20]
	ldr	w0, [x19]
	add	x1, sp, #16
	mov	w2, #4
	bl	_memcpy
	mov	w23, #0
	b	LBB0_14
LBB0_10:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_14
LBB0_12:
	mov	x23, x0
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x23
	bl	_dev_dbg
	b	LBB0_14
LBB0_13:
	mov	x23, x0
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x23
	bl	_dev_dbg
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
LBB0_14:
	mov	x0, x23
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_15:
	ldrsw	x2, [x26]
	str	x8, [sp]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
Lloh28:
	adrp	x8, _EIO@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HDCP_API_VERSION,4,2           ; @HDCP_API_VERSION
	.comm	_WIRED_VERIFY_RECEIVER_CERT,4,2 ; @WIRED_VERIFY_RECEIVER_CERT
	.comm	_ME_HDCP_STATUS_SUCCESS,8,3     ; @ME_HDCP_STATUS_SUCCESS
	.comm	_WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_IN,4,2 ; @WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_IN
	.comm	_HDCP_2_2_RRX_LEN,4,2           ; @HDCP_2_2_RRX_LEN
	.comm	_HDCP_2_2_RXCAPS_LEN,4,2        ; @HDCP_2_2_RXCAPS_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mei_cldev_send failed: %zd\n"

l_.str.1:                               ; @.str.1
	.asciz	"mei_cldev_recv failed: %zd\n"

l_.str.2:                               ; @.str.2
	.asciz	"ME cmd 0x%08X Failed. Status: 0x%X\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_HDCP_2_2_AKE_STORED_KM,4,2     ; @HDCP_2_2_AKE_STORED_KM
	.comm	_HDCP_2_2_AKE_NO_STORED_KM,4,2  ; @HDCP_2_2_AKE_NO_STORED_KM
	.no_dead_strip	_mei_hdcp_verify_receiver_cert_prepare_km
.subsections_via_symbols
