	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cbs_av1_assemble_fragment
_cbs_av1_assemble_fragment:             ## @cbs_av1_assemble_fragment
	.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
	movq	%rsi, %r14
	movl	(%rsi), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	16(%r14), %rcx
	cmpl	$5, %eax
	jae	LBB0_4
## %bb.3:
	xorl	%edx, %edx
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_9
LBB0_4:
	movl	%eax, %edx
	andl	$3, %edx
	testq	%rdx, %rdx
	movl	$4, %esi
	cmovneq	%rdx, %rsi
	movq	%rax, %rdx
	subq	%rsi, %rdx
	leaq	32(%rcx), %rsi
	pxor	%xmm0, %xmm0
	movq	%rdx, %rdi
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	-32(%rsi), %xmm2
	movdqu	-16(%rsi), %xmm3
	punpcklqdq	%xmm3, %xmm2            ## xmm2 = xmm2[0],xmm3[0]
	paddq	%xmm2, %xmm0
	movdqu	(%rsi), %xmm2
	movdqu	16(%rsi), %xmm3
	punpcklqdq	%xmm3, %xmm2            ## xmm2 = xmm2[0],xmm3[0]
	paddq	%xmm2, %xmm1
	addq	$64, %rsi
	addq	$-4, %rdi
	jne	LBB0_5
## %bb.6:
	paddq	%xmm0, %xmm1
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	paddq	%xmm1, %xmm0
	movq	%xmm0, %r15
LBB0_7:
	subq	%rdx, %rax
	shlq	$4, %rdx
	addq	%rdx, %rcx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	addq	(%rcx), %r15
	addq	$16, %rcx
	decq	%rax
	jne	LBB0_8
LBB0_9:
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	%r15, %rdi
	callq	_av_buffer_alloc
	movq	%rax, 32(%r14)
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:
	movq	(%rax), %rdi
	movq	%rdi, 24(%r14)
	addq	%r15, %rdi
	movq	(%rbx), %rdx
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	callq	_memset
	cmpl	$0, (%r14)
	jle	LBB0_13
## %bb.11:
	movq	16(%r14), %rax
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r14), %rdi
	addq	%r12, %rdi
	movl	8(%rax,%rbx), %esi
	movq	(%rax,%rbx), %rdx
	callq	_memcpy
	movq	16(%r14), %rax
	addq	(%rax,%rbx), %r12
	incq	%r13
	movslq	(%r14), %rcx
	addq	$16, %rbx
	cmpq	%rcx, %r13
	jl	LBB0_12
LBB0_13:
	xorl	%edi, %edi
	cmpq	%r15, %r12
	sete	%dil
	callq	_av_assert0
	movq	%r15, 8(%r14)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,8,3 ## @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_cbs_av1_assemble_fragment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cbs_av1_assemble_fragment
_cbs_av1_assemble_fragment:             ; @cbs_av1_assemble_fragment
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	ldr	w8, [x1]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	ldr	x9, [x19, #16]
	cmp	w8, #9
	b.hs	LBB0_4
; %bb.2:
	mov	x10, #0
	mov	x20, #0
	b	LBB0_7
LBB0_3:
	mov	x20, #0
	b	LBB0_9
LBB0_4:
	ands	x10, x8, #0x7
	mov	w11, #8
	csel	x10, x11, x10, eq
	sub	x10, x8, x10
	add	x12, x9, #64
	movi.2d	v0, #0000000000000000
	mov	x11, x10
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sub	x13, x12, #64
	ld2.2d	{ v4, v5 }, [x13]
	sub	x13, x12, #32
	ld2.2d	{ v6, v7 }, [x13]
	add	x13, x12, #128
	ld2.2d	{ v16, v17 }, [x12], #32
	ld2.2d	{ v18, v19 }, [x12]
	add.2d	v0, v4, v0
	add.2d	v1, v6, v1
	add.2d	v2, v16, v2
	add.2d	v3, v18, v3
	mov	x12, x13
	subs	x11, x11, #8
	b.ne	LBB0_5
; %bb.6:
	add.2d	v0, v1, v0
	add.2d	v0, v2, v0
	add.2d	v0, v3, v0
	addp.2d	d0, v0
	fmov	x20, d0
LBB0_7:
	add	x9, x9, x10, lsl #4
	sub	x8, x8, x10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9], #16
	add	x20, x10, x20
	subs	x8, x8, #1
	b.ne	LBB0_8
LBB0_9:
Lloh0:
	adrp	x21, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x0, x8, x20
	bl	_av_buffer_alloc
	str	x0, [x19, #32]
	cbz	x0, LBB0_13
; %bb.10:
	ldr	x8, [x0]
	str	x8, [x19, #24]
	add	x0, x8, x20
	ldr	x2, [x21]
	mov	w1, #0
	bl	_memset
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.11:
	mov	x22, #0
	mov	x23, #0
	mov	x21, #0
	ldr	x8, [x19, #16]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #24]
	add	x0, x9, x21
	add	x8, x8, x22
	ldr	w1, [x8, #8]
	ldr	x2, [x8]
	bl	_memcpy
	ldr	x8, [x19, #16]
	ldr	x9, [x8, x22]
	add	x21, x9, x21
	add	x23, x23, #1
	ldrsw	x9, [x19]
	add	x22, x22, #16
	cmp	x23, x9
	b.lt	LBB0_12
	b	LBB0_15
LBB0_13:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_14:
	mov	x21, #0
LBB0_15:
	cmp	x21, x20
	cset	w0, eq
	bl	_av_assert0
	str	x20, [x19, #8]
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,8,3 ; @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_cbs_av1_assemble_fragment
.subsections_via_symbols
