	.file	"extr_cbs_av1.c_cbs_av1_assemble_fragment.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cbs_av1_assemble_fragment, @function
cbs_av1_assemble_fragment:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	eax, DWORD PTR [rsi]
	mov	rbx, rsi
	test	eax, eax
	jle	.L7
	mov	rdx, QWORD PTR 16[rsi]
	lea	ecx, -1[rax]
	xor	r13d, r13d
	sal	rcx, 4
	lea	rax, 16[rdx]
	add	rcx, rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	add	rax, 16
.L3:
	add	r13, QWORD PTR [rdx]
	mov	rdx, rax
	cmp	rcx, rax
	jne	.L13
.L2:
	mov	rdi, QWORD PTR AV_INPUT_BUFFER_PADDING_SIZE[rip]
	add	rdi, r13
	call	av_buffer_alloc@PLT
	mov	QWORD PTR 32[rbx], rax
	test	rax, rax
	je	.L14
	mov	rdi, QWORD PTR [rax]
	mov	rdx, QWORD PTR AV_INPUT_BUFFER_PADDING_SIZE[rip]
	xor	esi, esi
	mov	QWORD PTR 24[rbx], rdi
	add	rdi, r13
	call	memset@PLT
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	jle	.L8
	mov	rax, QWORD PTR 16[rbx]
	xor	ebp, ebp
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r14, rbp
	mov	rdi, QWORD PTR 24[rbx]
	add	rbp, 1
	sal	r14, 4
	add	rax, r14
	add	rdi, r12
	mov	esi, DWORD PTR 8[rax]
	mov	rdx, QWORD PTR [rax]
	call	memcpy@PLT
	mov	rax, QWORD PTR 16[rbx]
	add	r12, QWORD PTR [rax+r14]
	cmp	DWORD PTR [rbx], ebp
	jg	.L6
.L5:
	xor	edi, edi
	cmp	r13, r12
	sete	dil
	call	av_assert0@PLT
	mov	QWORD PTR 8[rbx], r13
	xor	eax, eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	edi, DWORD PTR ENOMEM[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	AVERROR@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	xor	r13d, r13d
	jmp	.L2
.L8:
	xor	r12d, r12d
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	cbs_av1_assemble_fragment, .-cbs_av1_assemble_fragment
	.comm	ENOMEM,4,4
	.comm	AV_INPUT_BUFFER_PADDING_SIZE,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_cbs_av1.c_cbs_av1_assemble_fragment.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cbs_av1_assemble_fragment, %function
cbs_av1_assemble_fragment:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	ldr	r1, [r1]
	cmp	r1, #0
	ble	.L7
	mov	r3, #0
	mov	r7, r3
	ldr	r0, [r5, #8]
.L3:
	ldr	r2, [r0, r3, lsl #3]
	add	r3, r3, #1
	cmp	r3, r1
	add	r7, r7, r2
	bne	.L3
.L2:
	ldr	r4, .L14
	ldr	r0, [r4]
	add	r0, r7, r0
	bl	av_buffer_alloc
	cmp	r0, #0
	str	r0, [r5, #16]
	beq	.L13
	ldr	r0, [r0]
	mov	r1, #0
	str	r0, [r5, #12]
	ldr	r2, [r4]
	add	r0, r0, r7
	bl	memset
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L8
	mov	r4, #0
	mov	r6, r4
	ldr	r3, [r5, #8]
.L6:
	ldr	r0, [r5, #12]
	add	r2, r3, r4, lsl #3
	ldr	r1, [r2, #4]
	add	r0, r6, r0
	ldr	r2, [r3, r4, lsl #3]
	bl	memcpy
	ldr	r3, [r5, #8]
	ldr	r1, [r5]
	ldr	r2, [r3, r4, lsl #3]
	add	r4, r4, #1
	cmp	r1, r4
	add	r6, r6, r2
	bgt	.L6
.L5:
	sub	r0, r7, r6
	clz	r0, r0
	lsr	r0, r0, #5
	bl	av_assert0
	mov	r0, #0
	str	r7, [r5, #4]
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	ldr	r3, .L14+4
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r0, [r3]
	b	AVERROR
.L7:
	mov	r7, #0
	b	.L2
.L8:
	mov	r6, #0
	b	.L5
.L15:
	.align	2
.L14:
	.word	AV_INPUT_BUFFER_PADDING_SIZE
	.word	ENOMEM
	.size	cbs_av1_assemble_fragment, .-cbs_av1_assemble_fragment
	.comm	ENOMEM,4,4
	.comm	AV_INPUT_BUFFER_PADDING_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
