	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_dp_decode_sideband_msg_hdr
_drm_dp_decode_sideband_msg_hdr:        ## @drm_dp_decode_sideband_msg_hdr
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rsi), %ebx
	xorl	%r15d, %r15d
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.1:
	shrl	$5, %ebx
	andl	$7, %ebx
	leal	3(%rbx), %eax
	cmpl	%edx, %eax
	jg	LBB0_9
## %bb.2:
	movq	%rcx, %r14
	movq	%rsi, %r13
	movq	%rdi, %r12
	leal	(%rax,%rax), %esi
	decl	%esi
	movq	%r13, %rdi
	callq	_drm_dp_msg_header_crc4
	movl	8(%r13,%rbx,4), %edx
	movl	%edx, %ecx
	xorl	%eax, %ecx
	testb	$15, %cl
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_9
LBB0_4:
	movl	(%r13), %ecx
	shrl	$4, %ecx
	andl	$15, %ecx
	movl	%ecx, (%r12)
	movl	(%r13), %eax
	andl	$15, %eax
	movl	%eax, 4(%r12)
	movl	$1, %r15d
	movl	$1, %eax
	cmpl	$2, %ecx
	jb	LBB0_8
## %bb.5:
	movq	8(%r12), %rcx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r13,%rax,4), %edx
	movl	%edx, (%rcx,%rax,4)
	incq	%rax
	movl	(%r12), %edx
	movl	%edx, %esi
	shrl	$31, %esi
	addl	%edx, %esi
	sarl	%esi
	movslq	%esi, %rdx
	cmpq	%rdx, %rax
	jl	LBB0_6
## %bb.7:
	incl	%eax
LBB0_8:
	movl	%eax, %ecx
	movl	(%r13,%rcx,4), %edx
	shrl	$7, %edx
	andl	$1, %edx
	movl	%edx, 16(%r12)
	movl	(%r13,%rcx,4), %edx
	shrl	$6, %edx
	andl	$1, %edx
	movl	%edx, 20(%r12)
	movl	(%r13,%rcx,4), %edx
	andl	$63, %edx
	movl	%edx, 24(%r12)
	movl	4(%r13,%rcx,4), %edx
	shrl	$7, %edx
	andl	$1, %edx
	movl	%edx, 28(%r12)
	movl	4(%r13,%rcx,4), %edx
	shrl	$6, %edx
	andl	$1, %edx
	movl	%edx, 32(%r12)
	movl	4(%r13,%rcx,4), %ecx
	shrl	$4, %ecx
	andl	$1, %ecx
	movl	%ecx, 36(%r12)
	addl	$2, %eax
	movl	%eax, (%r14)
LBB0_9:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"crc4 mismatch 0x%x 0x%x\n"

	.no_dead_strip	_drm_dp_decode_sideband_msg_hdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_dp_decode_sideband_msg_hdr
_drm_dp_decode_sideband_msg_hdr:        ; @drm_dp_decode_sideband_msg_hdr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w8, [x1]
	cbz	w8, LBB0_2
; %bb.1:
	ubfx	x22, x8, #5, #3
	add	w8, w22, #3
	cmp	w8, w2
	b.le	LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_11
LBB0_3:
	mov	x19, x3
	mov	x21, x1
	mov	x20, x0
	lsl	w8, w8, #1
	sub	w1, w8, #1
	mov	x0, x21
	bl	_drm_dp_msg_header_crc4
	add	x8, x21, x22, lsl #2
	ldr	w2, [x8, #8]
	eor	w8, w2, w0
	tst	w8, #0xf
	b.eq	LBB0_5
; %bb.4:
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	w0, #0
	b	LBB0_11
LBB0_5:
	ldr	w8, [x21]
	ubfx	w8, w8, #4, #4
	str	w8, [x20]
	ldr	w9, [x21]
	and	w9, w9, #0xf
	str	w9, [x20, #4]
	cmp	w8, #2
	b.hs	LBB0_7
; %bb.6:
	mov	w8, #1
	b	LBB0_10
LBB0_7:
	mov	x8, #0
	ldr	x9, [x20, #8]
	add	x10, x21, #4
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x11, x8, #2
	ldr	w12, [x10, x11]
	str	w12, [x9, x11]
	add	x8, x8, #1
	ldr	w11, [x20]
	cmp	w11, #0
	cinc	w11, w11, lt
	asr	w11, w11, #1
	cmp	x8, w11, sxtw
	b.lt	LBB0_8
; %bb.9:
	add	w8, w8, #1
LBB0_10:
	mov	w9, w8
	lsl	x9, x9, #2
	ldr	w10, [x21, x9]
	ubfx	w10, w10, #7, #1
	str	w10, [x20, #16]
	ldr	w10, [x21, x9]
	ubfx	w10, w10, #6, #1
	str	w10, [x20, #20]
	ldr	w9, [x21, x9]
	and	w9, w9, #0x3f
	str	w9, [x20, #24]
	add	w9, w8, #1
	lsl	x9, x9, #2
	ldr	w10, [x21, x9]
	ubfx	w10, w10, #7, #1
	str	w10, [x20, #28]
	ldr	w10, [x21, x9]
	ubfx	w10, w10, #6, #1
	str	w10, [x20, #32]
	ldr	w9, [x21, x9]
	ubfx	w9, w9, #4, #1
	str	w9, [x20, #36]
	add	w8, w8, #2
	str	w8, [x19]
	mov	w0, #1
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"crc4 mismatch 0x%x 0x%x\n"

	.no_dead_strip	_drm_dp_decode_sideband_msg_hdr
.subsections_via_symbols
