	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mei_hdcp_enable_authentication
_mei_hdcp_enable_authentication:        ## @mei_hdcp_enable_authentication
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorps	%xmm0, %xmm0
	movups	%xmm0, -64(%rbp)
	movups	%xmm0, -80(%rbp)
	movq	$0, -48(%rbp)
	movaps	%xmm0, -112(%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, -52(%rbp)
	movq	_WIRED_ENABLE_AUTH@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%eax, -56(%rbp)
	movq	_ME_HDCP_STATUS_SUCCESS@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	%rax, -64(%rbp)
	movq	_WIRED_CMD_BUF_LEN_ENABLE_AUTH_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movl	12(%rbx), %eax
	movl	%eax, -80(%rbp)
	movl	8(%rbx), %edi
	callq	_mei_get_ddi_index
	movl	%eax, -84(%rbp)
	movq	(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	leaq	-88(%rbp), %rsi
	movq	%r15, %rdi
	movl	$48, %edx
	callq	_mei_cldev_send
	testq	%rax, %rax
	js	LBB0_4
## %bb.6:
	leaq	-112(%rbp), %rsi
	movq	%r15, %rdi
	movl	$16, %edx
	callq	_mei_cldev_recv
	testq	%rax, %rax
	js	LBB0_7
## %bb.8:
	movq	-112(%rbp), %rcx
	xorl	%ebx, %ebx
	cmpq	(%r13), %rcx
	je	LBB0_11
## %bb.9:
	movslq	(%r12), %rdx
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_10:
	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
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_11:
	movl	%ebx, %eax
	addq	$72, %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_ENABLE_AUTH,4,2          ## @WIRED_ENABLE_AUTH
	.comm	_ME_HDCP_STATUS_SUCCESS,8,3     ## @ME_HDCP_STATUS_SUCCESS
	.comm	_WIRED_CMD_BUF_LEN_ENABLE_AUTH_IN,4,2 ## @WIRED_CMD_BUF_LEN_ENABLE_AUTH_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	"ME cmd 0x%08X failed. status: 0x%X\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mei_hdcp_enable_authentication
_mei_hdcp_enable_authentication:        ; @mei_hdcp_enable_authentication
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	str	xzr, [sp, #72]
	movi.2d	v0, #0000000000000000
	stur	q0, [sp, #56]
	stur	q0, [sp, #40]
	stp	xzr, xzr, [sp, #16]
	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	x22, _WIRED_ENABLE_AUTH@GOTPAGE
Lloh4:
	ldr	x22, [x22, _WIRED_ENABLE_AUTH@GOTPAGEOFF]
	ldr	w9, [x22]
	stp	w9, w8, [sp, #64]
Lloh5:
	adrp	x23, _ME_HDCP_STATUS_SUCCESS@GOTPAGE
Lloh6:
	ldr	x23, [x23, _ME_HDCP_STATUS_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh7:
	adrp	x9, _WIRED_CMD_BUF_LEN_ENABLE_AUTH_IN@GOTPAGE
Lloh8:
	ldr	x9, [x9, _WIRED_CMD_BUF_LEN_ENABLE_AUTH_IN@GOTPAGEOFF]
	str	x8, [sp, #56]
Lloh9:
	ldr	w8, [x9]
	ldp	w0, w9, [x21, #8]
	str	w8, [sp, #48]
	str	w9, [sp, #40]
	bl	_mei_get_ddi_index
	str	w0, [sp, #36]
	ldr	x8, [x21]
	ldr	w8, [x8]
	str	w8, [sp, #32]
	add	x1, sp, #32
	mov	x0, x20
	mov	w2, #48
	bl	_mei_cldev_send
	tbnz	x0, #63, LBB0_8
; %bb.3:
	add	x1, sp, #16
	mov	x0, x20
	mov	w2, #16
	bl	_mei_cldev_recv
	tbnz	x0, #63, LBB0_9
; %bb.4:
	ldr	x8, [sp, #16]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.5:
	mov	w21, #0
	b	LBB0_10
LBB0_6:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_8:
	mov	x21, x0
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_dbg
	b	LBB0_10
LBB0_9:
	mov	x21, x0
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	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, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_11:
	ldrsw	x2, [x22]
	str	x8, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HDCP_API_VERSION,4,2           ; @HDCP_API_VERSION
	.comm	_WIRED_ENABLE_AUTH,4,2          ; @WIRED_ENABLE_AUTH
	.comm	_ME_HDCP_STATUS_SUCCESS,8,3     ; @ME_HDCP_STATUS_SUCCESS
	.comm	_WIRED_CMD_BUF_LEN_ENABLE_AUTH_IN,4,2 ; @WIRED_CMD_BUF_LEN_ENABLE_AUTH_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	"ME cmd 0x%08X failed. status: 0x%X\n"

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