	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hdmi_avi_infoframe_pack        ## -- Begin function hdmi_avi_infoframe_pack
	.p2align	4, 0x90
_hdmi_avi_infoframe_pack:               ## @hdmi_avi_infoframe_pack
	.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	_HDMI_INFOFRAME_HEADER_SIZE@GOTPCREL(%rip), %r12
	movq	(%rdi), %r15
	addq	(%r12), %r15
	cmpq	%rdx, %r15
	jbe	LBB0_2
## %bb.1:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subq	(%rax), %r15
	jmp	LBB0_13
LBB0_2:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	xorl	%esi, %esi
	callq	_memset
	movl	8(%rbx), %eax
	movl	%eax, (%r14)
	movl	12(%rbx), %eax
	movl	%eax, 4(%r14)
	movl	(%rbx), %eax
	movl	%eax, 8(%r14)
	movl	$0, 12(%r14)
	movq	(%r12), %rax
	leaq	(%r14,%rax,4), %r12
	movl	16(%rbx), %ecx
	movl	20(%rbx), %edx
	shll	$5, %ecx
	andl	$96, %ecx
	andl	$3, %edx
	orl	%ecx, %edx
	movl	%edx, (%r14,%rax,4)
	testb	$15, 24(%rbx)
	je	LBB0_4
## %bb.3:
	movl	$4, %edi
	callq	_BIT
	orl	%eax, (%r12)
LBB0_4:
	cmpl	$0, 28(%rbx)
	jne	LBB0_6
## %bb.5:
	cmpl	$0, 32(%rbx)
	je	LBB0_7
LBB0_6:
	movl	$3, %edi
	callq	_BIT
	orl	%eax, (%r12)
LBB0_7:
	cmpl	$0, 36(%rbx)
	jne	LBB0_9
## %bb.8:
	cmpl	$0, 40(%rbx)
	je	LBB0_10
LBB0_9:
	movl	$2, %edi
	callq	_BIT
	orl	%eax, (%r12)
LBB0_10:
	movl	24(%rbx), %eax
	movl	44(%rbx), %ecx
	shll	$6, %ecx
	movzbl	%cl, %ecx
	movl	48(%rbx), %edx
	shll	$4, %edx
	andl	$48, %edx
	orl	%ecx, %edx
	andl	$15, %eax
	orl	%edx, %eax
	movl	%eax, 4(%r12)
	movl	52(%rbx), %eax
	movl	56(%rbx), %ecx
	shll	$4, %eax
	andl	$112, %eax
	andl	$3, %ecx
	leal	(%rax,%rcx,4), %eax
	movl	60(%rbx), %ecx
	andl	$3, %ecx
	orl	%eax, %ecx
	movl	%ecx, 8(%r12)
	cmpq	$0, 80(%rbx)
	je	LBB0_12
## %bb.11:
	movl	$7, %edi
	callq	_BIT
	orl	%eax, 8(%r12)
LBB0_12:
	movl	64(%rbx), %eax
	andl	$127, %eax
	movl	%eax, 12(%r12)
	movl	68(%rbx), %eax
	movl	72(%rbx), %ecx
	shll	$6, %eax
	movzbl	%al, %eax
	shll	$4, %ecx
	andl	$48, %ecx
	orl	%eax, %ecx
	movl	76(%rbx), %eax
	andl	$15, %eax
	orl	%ecx, %eax
	movl	%eax, 16(%r12)
	movzbl	28(%rbx), %eax
	movl	%eax, 20(%r12)
	movzbl	29(%rbx), %eax
	movl	%eax, 24(%r12)
	movzbl	32(%rbx), %eax
	movl	%eax, 28(%r12)
	movzbl	33(%rbx), %eax
	movl	%eax, 32(%r12)
	movzbl	36(%rbx), %eax
	movl	%eax, 36(%r12)
	movzbl	37(%rbx), %eax
	movl	%eax, 40(%r12)
	movzbl	40(%rbx), %eax
	movl	%eax, 44(%r12)
	movzbl	41(%rbx), %eax
	movl	%eax, 48(%r12)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_hdmi_infoframe_set_checksum
LBB0_13:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDMI_INFOFRAME_HEADER_SIZE,8,3 ## @HDMI_INFOFRAME_HEADER_SIZE
	.comm	_ENOSPC,8,3                     ## @ENOSPC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hdmi_avi_infoframe_pack        ; -- Begin function hdmi_avi_infoframe_pack
	.p2align	2
_hdmi_avi_infoframe_pack:               ; @hdmi_avi_infoframe_pack
	.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
Lloh0:
	adrp	x22, _HDMI_INFOFRAME_HEADER_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HDMI_INFOFRAME_HEADER_SIZE@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x9, [x0]
	add	x19, x9, x8
	cmp	x19, x2
	b.ls	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_13
LBB0_2:
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	mov	w1, #0
	bl	_memset
	ldr	w8, [x21, #8]
	str	w8, [x20]
	ldr	w8, [x21, #12]
	ldr	x9, [x21]
	stp	w8, w9, [x20, #4]
	str	wzr, [x20, #12]
	ldr	x8, [x22]
	add	x22, x20, x8, lsl #2
	ldp	w8, w9, [x21, #16]
	and	w9, w9, #0x3
	bfi	w9, w8, #5, #2
	str	w9, [x22]
	ldrb	w8, [x21, #24]
	tst	w8, #0xf
	b.eq	LBB0_4
; %bb.3:
	mov	w0, #4
	bl	_BIT
	ldr	w8, [x22]
	orr	w8, w8, w0
	str	w8, [x22]
LBB0_4:
	ldr	w8, [x21, #28]
	cbnz	w8, LBB0_6
; %bb.5:
	ldr	w8, [x21, #32]
	cbz	w8, LBB0_7
LBB0_6:
	mov	w0, #3
	bl	_BIT
	ldr	w8, [x22]
	orr	w8, w8, w0
	str	w8, [x22]
LBB0_7:
	ldr	w8, [x21, #36]
	cbnz	w8, LBB0_9
; %bb.8:
	ldr	w8, [x21, #40]
	cbz	w8, LBB0_10
LBB0_9:
	mov	w0, #2
	bl	_BIT
	ldr	w8, [x22]
	orr	w8, w8, w0
	str	w8, [x22]
LBB0_10:
	ldp	w8, w9, [x21, #44]
	ubfiz	w8, w8, #6, #2
	bfi	w8, w9, #4, #2
	ldr	w9, [x21, #24]
	bfxil	w8, w9, #0, #4
	str	w8, [x22, #4]
	ldp	w8, w9, [x21, #52]
	ubfiz	w8, w8, #4, #3
	bfi	w8, w9, #2, #2
	ldr	w9, [x21, #60]
	bfxil	w8, w9, #0, #2
	str	w8, [x22, #8]
	ldr	x8, [x21, #80]
	cbz	x8, LBB0_12
; %bb.11:
	mov	w0, #7
	bl	_BIT
	ldr	w8, [x22, #8]
	orr	w8, w8, w0
	str	w8, [x22, #8]
LBB0_12:
	ldr	w8, [x21, #64]
	and	w8, w8, #0x7f
	str	w8, [x22, #12]
	ldp	w8, w9, [x21, #68]
	ubfiz	w8, w8, #6, #2
	bfi	w8, w9, #4, #2
	ldr	w9, [x21, #76]
	bfxil	w8, w9, #0, #4
	str	w8, [x22, #16]
	ldrb	w8, [x21, #28]
	str	w8, [x22, #20]
	ldrb	w8, [x21, #29]
	str	w8, [x22, #24]
	ldrb	w8, [x21, #32]
	str	w8, [x22, #28]
	ldrb	w8, [x21, #33]
	str	w8, [x22, #32]
	ldrb	w8, [x21, #36]
	str	w8, [x22, #36]
	ldrb	w8, [x21, #37]
	str	w8, [x22, #40]
	ldrb	w8, [x21, #40]
	str	w8, [x22, #44]
	ldrb	w8, [x21, #41]
	str	w8, [x22, #48]
	mov	x0, x20
	mov	x1, x19
	bl	_hdmi_infoframe_set_checksum
LBB0_13:
	mov	x0, 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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_HDMI_INFOFRAME_HEADER_SIZE,8,3 ; @HDMI_INFOFRAME_HEADER_SIZE
	.comm	_ENOSPC,8,3                     ; @ENOSPC
.subsections_via_symbols
