	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_dp_hdcp2_read_msg
_intel_dp_hdcp2_read_msg:               ## @intel_dp_hdcp2_read_msg
	.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	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	%rsi, %rdi
	callq	_get_hdcp2_dp_msg_data
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	(%rax), %ebx
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_intel_dp_hdcp2_wait_for_msg
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_HDCP_2_2_REP_SEND_RECVID_LIST@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_7
## %bb.5:
	movq	%r13, %rdi
	callq	_get_receiver_id_list_size
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_13
## %bb.6:
	movl	%r14d, %r14d
LBB0_7:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	%r14d, %r12d
	decl	%r12d
	je	LBB0_12
## %bb.8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	8(%rax), %r15
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	_DP_AUX_MAX_PAYLOAD_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %r12d
	cmovll	%r12d, %ecx
	movq	%r13, %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	callq	_drm_dp_dpcd_read
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	addl	%r14d, %ebx
	movl	%r14d, %eax
	leaq	(%r15,%rax,8), %r15
	subl	%r14d, %r12d
	jne	LBB0_9
LBB0_12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_13
LBB0_3:
	movl	%eax, %r14d
	jmp	LBB0_13
LBB0_10:
	leaq	L_.str(%rip), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_DRM_DEBUG_KMS
                                        ## kill: def $r14d killed $r14d def $r14
LBB0_13:
	movl	%r14d, %eax
	addq	$24, %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_2_2_REP_SEND_RECVID_LIST,8,3 ## @HDCP_2_2_REP_SEND_RECVID_LIST
	.comm	_DP_AUX_MAX_PAYLOAD_BYTES,4,2   ## @DP_AUX_MAX_PAYLOAD_BYTES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"msg_id %d, ret %zd\n"

	.no_dead_strip	_intel_dp_hdcp2_read_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_dp_hdcp2_read_msg
_intel_dp_hdcp2_read_msg:               ; @intel_dp_hdcp2_read_msg
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	mov	x0, x1
	bl	_get_hdcp2_dp_msg_data
	cbz	x0, LBB0_10
; %bb.1:
	mov	x1, x0
	ldr	w23, [x0]
	mov	x0, x22
	bl	_intel_dp_hdcp2_wait_for_msg
	tbnz	w0, #31, LBB0_11
; %bb.2:
Lloh0:
	adrp	x8, _HDCP_2_2_REP_SEND_RECVID_LIST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDCP_2_2_REP_SEND_RECVID_LIST@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x22
	bl	_get_receiver_id_list_size
	mov	x19, x0
	tbnz	w0, #31, LBB0_13
; %bb.4:
	mov	w19, w19
LBB0_5:
	subs	w26, w19, #1
	b.eq	LBB0_9
; %bb.6:
	add	x24, x21, #8
Lloh3:
	adrp	x27, _DP_AUX_MAX_PAYLOAD_BYTES@GOTPAGE
Lloh4:
	ldr	x27, [x27, _DP_AUX_MAX_PAYLOAD_BYTES@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x27]
	cmp	w26, w8
	csel	w3, w26, w8, lt
	mov	x0, x22
	mov	x1, x23
	mov	x2, x24
	bl	_drm_dp_dpcd_read
	mov	x25, x0
	tbnz	w0, #31, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x24, x24, w25, uxtw #3
	add	w23, w25, w23
	subs	w26, w26, w25
	b.ne	LBB0_7
LBB0_9:
	str	x20, [x21]
	b	LBB0_13
LBB0_10:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_13
LBB0_11:
	mov	x19, x0
	b	LBB0_13
LBB0_12:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x25
	bl	_DRM_DEBUG_KMS
	mov	x19, x25
LBB0_13:
	mov	x0, x19
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HDCP_2_2_REP_SEND_RECVID_LIST,8,3 ; @HDCP_2_2_REP_SEND_RECVID_LIST
	.comm	_DP_AUX_MAX_PAYLOAD_BYTES,4,2   ; @DP_AUX_MAX_PAYLOAD_BYTES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"msg_id %d, ret %zd\n"

	.no_dead_strip	_intel_dp_hdcp2_read_msg
.subsections_via_symbols
