	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_dp_encode_sideband_msg_hdr
_drm_dp_encode_sideband_msg_hdr:        ## @drm_dp_encode_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movl	(%rdi), %eax
	movl	4(%rdi), %ecx
	shll	$4, %eax
	movzbl	%al, %eax
	andl	$15, %ecx
	orl	%eax, %ecx
	movl	%ecx, (%rsi)
	movl	$1, %eax
	cmpl	$2, (%rdi)
	jl	LBB0_4
## %bb.1:
	movq	8(%rdi), %rcx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rax,4), %edx
	movl	%edx, 4(%rbx,%rax,4)
	incq	%rax
	movl	(%rdi), %edx
	movl	%edx, %esi
	shrl	$31, %esi
	addl	%edx, %esi
	sarl	%esi
	movslq	%esi, %rdx
	cmpq	%rdx, %rax
	jl	LBB0_2
## %bb.3:
	incl	%eax
LBB0_4:
	movl	16(%rdi), %ecx
	movl	20(%rdi), %edx
	shll	$7, %ecx
	shll	$6, %edx
	orl	%ecx, %edx
	movl	24(%rdi), %ecx
	andl	$63, %ecx
	orl	%edx, %ecx
	movl	%eax, %r15d
	movl	%ecx, (%rbx,%r15,4)
	movl	28(%rdi), %ecx
	movl	32(%rdi), %edx
	shll	$7, %ecx
	shll	$6, %edx
	orl	%ecx, %edx
	movl	36(%rdi), %ecx
	shll	$4, %ecx
	orl	%edx, %ecx
	movl	%ecx, 4(%rbx,%r15,4)
	movl	%eax, %r12d
	addl	$2, %r12d
	leal	(%rax,%rax), %esi
	addl	$3, %esi
	movq	%rbx, %rdi
	callq	_drm_dp_msg_header_crc4
	andl	$15, %eax
	orl	%eax, 4(%rbx,%r15,4)
	movl	%r12d, (%r14)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_drm_dp_encode_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_encode_sideband_msg_hdr
_drm_dp_encode_sideband_msg_hdr:        ; @drm_dp_encode_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
	mov	x19, x2
	mov	x20, x1
	ldp	w8, w9, [x0]
	and	w9, w9, #0xf
	bfi	w9, w8, #4, #4
	str	w9, [x1]
	ldr	w8, [x0]
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.1:
	mov	x8, #0
	ldr	x9, [x0, #8]
	add	x10, x20, #4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x11, x8, #2
	ldr	w12, [x9, x11]
	str	w12, [x10, x11]
	add	x8, x8, #1
	ldr	w11, [x0]
	cmp	w11, #0
	cinc	w11, w11, lt
	asr	w11, w11, #1
	cmp	x8, w11, sxtw
	b.lt	LBB0_2
; %bb.3:
	add	w8, w8, #1
	b	LBB0_5
LBB0_4:
	mov	w8, #1
LBB0_5:
	ldp	w9, w10, [x0, #16]
	lsl	w10, w10, #6
	orr	w9, w10, w9, lsl #7
	ldr	w10, [x0, #24]
	bfxil	w9, w10, #0, #6
	add	w10, w8, #1
	str	w9, [x20, w8, uxtw #2]
	ldp	w9, w11, [x0, #28]
	lsl	w11, w11, #6
	orr	w9, w11, w9, lsl #7
	ldr	w11, [x0, #36]
	orr	w9, w9, w11, lsl #4
	add	w21, w8, #2
	lsl	x22, x10, #2
	str	w9, [x20, x22]
	lsl	w8, w21, #1
	sub	w1, w8, #1
	mov	x0, x20
	bl	_drm_dp_msg_header_crc4
	and	w8, w0, #0xf
	ldr	w9, [x20, x22]
	orr	w8, w9, w8
	str	w8, [x20, x22]
	str	w21, [x19]
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_drm_dp_encode_sideband_msg_hdr
.subsections_via_symbols
