	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mei_hdcp_close_session
_mei_hdcp_close_session:                ## @mei_hdcp_close_session
	.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
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorps	%xmm0, %xmm0
	movups	%xmm0, -48(%rbp)
	movups	%xmm0, -64(%rbp)
	movaps	%xmm0, -96(%rbp)
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %rbx
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.3:
	movq	%rdi, %r14
	callq	_to_mei_cl_device
	movq	%rax, %r15
	movq	_HDCP_API_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	_WIRED_CLOSE_SESSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_ME_HDCP_STATUS_SUCCESS@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, -56(%rbp)
	movq	_WIRED_CMD_BUF_LEN_CLOSE_SESSION_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movl	4(%rbx), %eax
	movl	%eax, -68(%rbp)
	movl	(%rbx), %edi
	callq	_mei_get_ddi_index
	movl	%eax, -72(%rbp)
	leaq	-72(%rbp), %rsi
	movq	%r15, %rdi
	movl	$40, %edx
	callq	_mei_cldev_send
	testq	%rax, %rax
	js	LBB0_4
## %bb.6:
	leaq	-96(%rbp), %rsi
	movq	%r15, %rdi
	movl	$16, %edx
	callq	_mei_cldev_recv
	testq	%rax, %rax
	js	LBB0_7
## %bb.8:
	movq	-96(%rbp), %rdx
	xorl	%ebx, %ebx
	cmpq	(%r12), %rdx
	je	LBB0_11
## %bb.9:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_4:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_7:
	movq	%rax, %rbx
	leaq	L_.str.1(%rip), %rsi
LBB0_5:
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_dev_dbg
LBB0_11:
	movl	%ebx, %eax
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	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_CLOSE_SESSION,4,2        ## @WIRED_CLOSE_SESSION
	.comm	_ME_HDCP_STATUS_SUCCESS,8,3     ## @ME_HDCP_STATUS_SUCCESS
	.comm	_WIRED_CMD_BUF_LEN_CLOSE_SESSION_IN,4,2 ## @WIRED_CMD_BUF_LEN_CLOSE_SESSION_IN
	.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	"Session Close Failed. status: 0x%X\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_mei_hdcp_close_session
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mei_hdcp_close_session
_mei_hdcp_close_session:                ; @mei_hdcp_close_session
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #32]
	stp	xzr, xzr, [sp, #8]
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x1
	cbz	x1, LBB0_6
; %bb.2:
	mov	x19, x0
	bl	_to_mei_cl_device
	mov	x20, x0
Lloh0:
	adrp	x8, _HDCP_API_VERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDCP_API_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _WIRED_CLOSE_SESSION@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WIRED_CLOSE_SESSION@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #48]
Lloh6:
	adrp	x22, _ME_HDCP_STATUS_SUCCESS@GOTPAGE
Lloh7:
	ldr	x22, [x22, _ME_HDCP_STATUS_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh8:
	adrp	x9, _WIRED_CMD_BUF_LEN_CLOSE_SESSION_IN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _WIRED_CMD_BUF_LEN_CLOSE_SESSION_IN@GOTPAGEOFF]
	str	x8, [sp, #40]
Lloh10:
	ldr	w8, [x9]
	ldp	w0, w9, [x21]
	stp	w9, w8, [sp, #28]
	bl	_mei_get_ddi_index
	str	w0, [sp, #24]
	add	x1, sp, #24
	mov	x0, x20
	mov	w2, #40
	bl	_mei_cldev_send
	tbnz	x0, #63, LBB0_8
; %bb.3:
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #16
	bl	_mei_cldev_recv
	tbnz	x0, #63, LBB0_9
; %bb.4:
	ldr	x2, [sp, #8]
	ldr	x8, [x22]
	cmp	x2, x8
	b.ne	LBB0_11
; %bb.5:
	mov	w21, #0
	b	LBB0_10
LBB0_6:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_8:
	mov	x21, x0
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_dbg
	b	LBB0_10
LBB0_9:
	mov	x21, x0
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_dbg
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_11:
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HDCP_API_VERSION,4,2           ; @HDCP_API_VERSION
	.comm	_WIRED_CLOSE_SESSION,4,2        ; @WIRED_CLOSE_SESSION
	.comm	_ME_HDCP_STATUS_SUCCESS,8,3     ; @ME_HDCP_STATUS_SUCCESS
	.comm	_WIRED_CMD_BUF_LEN_CLOSE_SESSION_IN,4,2 ; @WIRED_CMD_BUF_LEN_CLOSE_SESSION_IN
	.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	"Session Close Failed. status: 0x%X\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_mei_hdcp_close_session
.subsections_via_symbols
