	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function hdmi_vendor_infoframe_pack
LCPI0_0:
	.long	0                               ## 0x0
	.long	3                               ## 0x3
	.long	12                              ## 0xc
	.long	0                               ## 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_hdmi_vendor_infoframe_pack
	.p2align	4, 0x90
_hdmi_vendor_infoframe_pack:            ## @hdmi_vendor_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	%rdi, %r15
	cmpq	$0, (%rdi)
	movq	%rsi, %r14
	movl	8(%rdi), %eax
	movq	_HDMI_3D_STRUCTURE_INVALID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	je	LBB0_1
## %bb.4:
	cmpl	%ecx, %eax
	jne	LBB0_2
LBB0_5:
	movq	_HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF@GOTPCREL(%rip), %r12
	xorl	%ecx, %ecx
	cmpl	(%r12), %eax
	setl	%cl
	movl	$6, %ebx
	subl	%ecx, %ebx
	movl	%ebx, 12(%r15)
	movq	_HDMI_INFOFRAME_HEADER_SIZE@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	cmpq	%rdx, %rbx
	jbe	LBB0_7
## %bb.6:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	cmpl	%ecx, %eax
	jne	LBB0_5
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
	jmp	LBB0_13
LBB0_7:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_memset
	movl	16(%r15), %eax
	movl	%eax, (%r14)
	movl	20(%r15), %eax
	movl	%eax, 4(%r14)
	movl	12(%r15), %eax
	movl	%eax, 8(%r14)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,3,12,0]
	movups	%xmm0, 12(%r14)
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	$32, 28(%r14)
	movl	$32, %ecx
	jmp	LBB0_11
LBB0_9:
	movl	$64, 28(%r14)
	movl	8(%r15), %eax
	shll	$4, %eax
	movzbl	%al, %eax
	movl	%eax, 32(%r14)
	movl	8(%r15), %eax
	cmpl	(%r12), %eax
	jl	LBB0_12
## %bb.10:
	movl	24(%r15), %eax
	shll	$4, %eax
	movzbl	%al, %eax
	movl	$36, %ecx
LBB0_11:
	movl	%eax, (%r14,%rcx)
LBB0_12:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_hdmi_infoframe_set_checksum
LBB0_13:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDMI_3D_STRUCTURE_INVALID,4,2  ## @HDMI_3D_STRUCTURE_INVALID
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF,4,2 ## @HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF
	.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
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function hdmi_vendor_infoframe_pack
lCPI0_0:
	.long	0                               ; 0x0
	.long	3                               ; 0x3
	.long	12                              ; 0xc
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_hdmi_vendor_infoframe_pack
	.p2align	2
_hdmi_vendor_infoframe_pack:            ; @hdmi_vendor_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
	mov	x19, x1
	mov	x21, x0
	ldr	x10, [x0]
	ldr	w8, [x0, #8]
Lloh0:
	adrp	x9, _HDMI_3D_STRUCTURE_INVALID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HDMI_3D_STRUCTURE_INVALID@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	cbz	x10, LBB0_4
; %bb.1:
	b.ne	LBB0_5
LBB0_2:
Lloh3:
	adrp	x22, _HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF@GOTPAGE
Lloh4:
	ldr	x22, [x22, _HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w8, w9
	mov	w8, #5
	cinc	w8, w8, ge
	str	w8, [x21, #12]
Lloh5:
	adrp	x9, _HDMI_INFOFRAME_HEADER_SIZE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HDMI_INFOFRAME_HEADER_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x20, x9, x8
	cmp	x20, x2
	b.ls	LBB0_7
; %bb.3:
Lloh8:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	b.ne	LBB0_2
LBB0_5:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	x8, [x8]
	neg	x20, x8
	b	LBB0_13
LBB0_7:
	mov	x0, x19
	mov	w1, #0
	bl	_memset
	ldr	w8, [x21, #16]
	str	w8, [x19]
	ldr	w8, [x21, #20]
	str	w8, [x19, #4]
	ldr	w8, [x21, #12]
	str	w8, [x19, #8]
Lloh12:
	adrp	x8, lCPI0_0@PAGE
Lloh13:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	stur	q0, [x19, #12]
	ldr	x8, [x21]
	cbz	x8, LBB0_9
; %bb.8:
	mov	w9, #32
	str	w9, [x19, #28]
	b	LBB0_11
LBB0_9:
	mov	w8, #64
	str	w8, [x19, #28]
	ldr	w8, [x21, #8]
	ubfiz	w8, w8, #4, #4
	str	w8, [x19, #32]
	ldr	w8, [x21, #8]
	ldr	w9, [x22]
	cmp	w8, w9
	b.lt	LBB0_12
; %bb.10:
	ldr	w8, [x21, #24]
	ubfiz	w8, w8, #4, #4
	mov	w9, #36
LBB0_11:
	str	w8, [x19, x9]
LBB0_12:
	mov	x0, x19
	mov	x1, x20
	bl	_hdmi_infoframe_set_checksum
LBB0_13:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdr	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_HDMI_3D_STRUCTURE_INVALID,4,2  ; @HDMI_3D_STRUCTURE_INVALID
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF,4,2 ; @HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF
	.comm	_HDMI_INFOFRAME_HEADER_SIZE,8,3 ; @HDMI_INFOFRAME_HEADER_SIZE
	.comm	_ENOSPC,8,3                     ; @ENOSPC
.subsections_via_symbols
