	.file	"extr_extract_extradata_bsf.c_extract_extradata_h2645.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	extract_extradata_h2645, @function
extract_extradata_h2645:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	r15, QWORD PTR 8[rdi]
	mov	QWORD PTR 48[rsp], rcx
	mov	ecx, DWORD PTR AV_CODEC_ID_HEVC[rip]
	mov	QWORD PTR 32[rsp], rsi
	mov	QWORD PTR 40[rsp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rdi]
	cmp	DWORD PTR [rax], ecx
	je	.L42
	lea	rdi, extradata_nal_types_h264.1995[rip]
	lea	r13, extradata_nal_types_h264.1995[rip]
	call	FF_ARRAY_ELEMS@PLT
	mov	r12d, eax
.L3:
	mov	rbx, QWORD PTR 32[rsp]
	mov	rax, QWORD PTR 0[rbp]
	sub	rsp, 8
	.cfi_def_cfa_offset 152
	xor	r9d, r9d
	lea	rdi, 8[r15]
	xor	r8d, r8d
	mov	rcx, rbp
	mov	rsi, QWORD PTR 8[rbx]
	push	0
	.cfi_def_cfa_offset 160
	push	1
	.cfi_def_cfa_offset 168
	mov	eax, DWORD PTR [rax]
	push	rax
	.cfi_def_cfa_offset 176
	mov	edx, DWORD PTR [rbx]
	call	ff_h2645_packet_split@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 144
	test	eax, eax
	js	.L1
	mov	edx, DWORD PTR 8[r15]
	test	edx, edx
	jle	.L18
	mov	QWORD PTR 16[rsp], rbp
	xor	r14d, r14d
	xor	ebx, ebx
	mov	rbp, r15
	mov	DWORD PTR 28[rsp], 0
	mov	DWORD PTR 12[rsp], 0
	mov	DWORD PTR 24[rsp], 0
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L45:
	mov	rcx, QWORD PTR 16[rsp]
	add	ebx, 3
	mov	eax, DWORD PTR [r15]
	add	ebx, DWORD PTR 8[r15]
	mov	rdx, QWORD PTR [rcx]
	mov	ecx, DWORD PTR AV_CODEC_ID_HEVC[rip]
	cmp	DWORD PTR [rdx], ecx
	je	.L43
	cmp	eax, 131
	mov	eax, 1
	cmovne	eax, DWORD PTR 12[rsp]
	mov	DWORD PTR 12[rsp], eax
.L8:
	add	r14, 1
	cmp	DWORD PTR 8[rbp], r14d
	jle	.L44
.L5:
	mov	rdx, QWORD PTR 16[rbp]
	lea	rax, [r14+r14*2]
	mov	esi, r12d
	mov	rdi, r13
	lea	r15, [rdx+rax*8]
	mov	edx, DWORD PTR [r15]
	call	val_in_array@PLT
	test	rax, rax
	jne	.L45
	cmp	QWORD PTR 0[rbp], 0
	je	.L8
	mov	eax, DWORD PTR 24[rsp]
	add	r14, 1
	add	eax, 3
	add	eax, DWORD PTR 8[r15]
	mov	DWORD PTR 24[rsp], eax
	cmp	DWORD PTR 8[rbp], r14d
	jg	.L5
.L44:
	mov	r15, rbp
	mov	rbp, QWORD PTR 16[rsp]
	test	ebx, ebx
	je	.L18
	mov	rax, QWORD PTR 0[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, DWORD PTR AV_CODEC_ID_HEVC[rip]
	je	.L46
.L10:
	cmp	DWORD PTR AV_CODEC_ID_H264[rip], eax
	jne	.L18
	test	BYTE PTR 12[rsp], 1
	je	.L18
.L11:
	cmp	QWORD PTR [r15], 0
	mov	rax, QWORD PTR AV_INPUT_BUFFER_PADDING_SIZE[rip]
	je	.L12
	movsx	rbp, DWORD PTR 24[rsp]
	lea	rdi, 0[rbp+rax]
	call	av_buffer_alloc@PLT
	mov	QWORD PTR 64[rsp], rax
	test	rax, rax
	je	.L40
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR AV_INPUT_BUFFER_PADDING_SIZE[rip]
	xor	esi, esi
	lea	rdi, [rax+rbp*4]
	call	memset@PLT
	mov	rax, QWORD PTR 64[rsp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 56[rsp], rax
	mov	rax, QWORD PTR AV_INPUT_BUFFER_PADDING_SIZE[rip]
.L12:
	movsx	r14, ebx
	lea	rdi, [r14+rax]
	call	av_malloc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L47
	mov	rdx, QWORD PTR AV_INPUT_BUFFER_PADDING_SIZE[rip]
	lea	rdi, [rax+r14*4]
	xor	esi, esi
	mov	r14, r15
	call	memset@PLT
	mov	rax, QWORD PTR 40[rsp]
	mov	QWORD PTR [rax], rbp
	mov	rax, QWORD PTR 48[rsp]
	mov	DWORD PTR [rax], ebx
	mov	eax, DWORD PTR 8[r15]
	xor	ebx, ebx
	test	eax, eax
	jg	.L16
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L19:
	cmp	QWORD PTR [r14], 0
	jne	.L48
.L20:
	add	rbx, 1
	cmp	DWORD PTR 8[r14], ebx
	jle	.L49
.L16:
	mov	rdx, QWORD PTR 16[r14]
	lea	rax, [rbx+rbx*2]
	mov	esi, r12d
	mov	rdi, r13
	lea	r15, [rdx+rax*8]
	mov	edx, DWORD PTR [r15]
	call	val_in_array@PLT
	test	rax, rax
	je	.L19
	mov	rdi, rbp
	mov	esi, 1
	call	AV_WB24@PLT
	mov	rdx, QWORD PTR 8[r15]
	mov	esi, DWORD PTR 16[r15]
	lea	rdi, 12[rbp]
	call	memcpy@PLT
	mov	rax, QWORD PTR 8[r15]
	lea	rbp, 12[rbp+rax*4]
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L43:
	cmp	eax, 129
	je	.L24
	cmp	eax, 128
	mov	eax, 1
	cmovne	eax, DWORD PTR 28[rsp]
	mov	DWORD PTR 28[rsp], eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L49:
	mov	r15, r14
.L21:
	cmp	QWORD PTR [r15], 0
	je	.L18
	mov	rbx, QWORD PTR 32[rsp]
	lea	rdi, 16[rbx]
	call	av_buffer_unref@PLT
	mov	rax, QWORD PTR 64[rsp]
	mov	QWORD PTR 16[rbx], rax
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 8[rbx], rax
	mov	eax, DWORD PTR 24[rsp]
	mov	DWORD PTR [rbx], eax
	.p2align 4,,10
	.p2align 3
.L18:
	xor	eax, eax
.L1:
	mov	rdi, QWORD PTR 72[rsp]
	xor	rdi, QWORD PTR fs:40
	jne	.L50
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	mov	DWORD PTR 12[rsp], 1
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L42:
	lea	rdi, extradata_nal_types_hevc.1994[rip]
	lea	r13, extradata_nal_types_hevc.1994[rip]
	call	FF_ARRAY_ELEMS@PLT
	mov	r12d, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L46:
	mov	ecx, DWORD PTR 28[rsp]
	test	DWORD PTR 12[rsp], ecx
	jne	.L11
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L48:
	mov	rdi, QWORD PTR 56[rsp]
	mov	esi, 1
	call	AV_WB24@PLT
	mov	rax, QWORD PTR 56[rsp]
	mov	rdx, QWORD PTR 8[r15]
	mov	esi, DWORD PTR 16[r15]
	lea	rdi, 12[rax]
	call	memcpy@PLT
	mov	rcx, QWORD PTR 56[rsp]
	mov	rax, QWORD PTR 8[r15]
	lea	rax, 12[rcx+rax*4]
	mov	QWORD PTR 56[rsp], rax
	jmp	.L20
.L47:
	lea	rdi, 64[rsp]
	call	av_buffer_unref@PLT
.L40:
	mov	edi, DWORD PTR ENOMEM[rip]
	call	AVERROR@PLT
	jmp	.L1
.L50:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	extract_extradata_h2645, .-extract_extradata_h2645
	.section	.rodata
	.align 8
	.type	extradata_nal_types_h264.1995, @object
	.size	extradata_nal_types_h264.1995, 8
extradata_nal_types_h264.1995:
	.long	131
	.long	132
	.align 8
	.type	extradata_nal_types_hevc.1994, @object
	.size	extradata_nal_types_hevc.1994, 12
extradata_nal_types_hevc.1994:
	.long	128
	.long	129
	.long	130
	.comm	ENOMEM,4,4
	.comm	AV_INPUT_BUFFER_PADDING_SIZE,8,8
	.comm	AV_CODEC_ID_HEVC,4,4
	.comm	AV_CODEC_ID_H264,4,4
	.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_extract_extradata_bsf.c_extract_extradata_h2645.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	extract_extradata_h2645, %function
extract_extradata_h2645:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r0
	ldr	fp, .L54
	ldr	r0, [r0]
	sub	sp, sp, #68
	ldr	ip, [r0]
	ldr	r0, [fp]
	str	r3, [sp, #48]
	ldr	r3, .L54+4
	str	r1, [sp, #40]
	str	r2, [sp, #44]
	cmp	ip, r0
	ldr	r3, [r3]
	str	r3, [sp, #60]
	mov	r3,#0
	ldr	r6, [r7, #4]
	beq	.L46
	ldr	r0, .L54+8
	bl	FF_ARRAY_ELEMS
	mov	r8, r0
	ldr	r9, .L54+8
.L3:
	mov	r4, #0
	mov	r2, #1
	ldr	r3, [r7]
	str	r4, [sp, #16]
	str	r2, [sp, #12]
	ldr	r2, [r3]
	ldr	r1, [sp, #40]
	str	r2, [sp, #8]
	str	r4, [sp, #4]
	str	r4, [sp]
	ldr	r2, [r1]
	mov	r3, r7
	ldr	r1, [r1, #4]
	add	r0, r6, #4
	bl	ff_h2645_packet_split
	cmp	r0, #0
	blt	.L1
	ldr	r3, [r6, #4]
	cmp	r3, r4
	ble	.L18
	mov	r3, r7
	str	r4, [sp, #36]
	mov	r7, r8
	str	r4, [sp, #28]
	mov	r8, r9
	str	r4, [sp, #32]
	mov	r9, r3
	str	r4, [sp, #24]
	b	.L5
.L49:
	ldr	r0, [r9]
	ldr	r2, [r2, #4]
	ldr	ip, [r0]
	ldr	r3, [sp, #24]
	ldr	r0, [fp]
	add	r2, r2, #3
	add	r3, r3, r2
	cmp	ip, r0
	ldr	r2, [r5, r10, lsl #2]
	str	r3, [sp, #24]
	beq	.L47
	cmp	r2, #131
	ldr	r3, [sp, #28]
	moveq	r3, #1
	str	r3, [sp, #28]
.L8:
	ldr	r2, [r6, #4]
	add	r4, r4, #1
	cmp	r2, r4
	ble	.L48
.L5:
	ldr	r5, [r6, #8]
	add	r10, r4, r4, lsl #1
	ldr	r2, [r5, r10, lsl #2]
	mov	r1, r7
	mov	r0, r8
	bl	val_in_array
	cmp	r0, #0
	add	r2, r5, r10, lsl #2
	bne	.L49
	ldr	r0, [r6]
	cmp	r0, #0
	beq	.L8
	ldr	r2, [r2, #4]
	ldr	r3, [sp, #32]
	add	r2, r2, #3
	add	r3, r3, r2
	ldr	r2, [r6, #4]
	add	r4, r4, #1
	cmp	r2, r4
	str	r3, [sp, #32]
	bgt	.L5
.L48:
	mov	r3, r9
	mov	r9, r8
	mov	r8, r7
	mov	r7, r3
	ldr	r3, [sp, #24]
	cmp	r3, #0
	beq	.L18
	ldr	r3, [r7]
	ldr	r2, [fp]
	ldr	r3, [r3]
	cmp	r3, r2
	beq	.L50
.L10:
	ldr	r2, .L54+12
	ldr	r1, [sp, #28]
	ldr	r2, [r2]
	cmp	r2, r3
	movne	r1, #0
	andeq	r1, r1, #1
	cmp	r1, #0
	bne	.L11
.L18:
	mov	r0, #0
.L1:
	ldr	r3, .L54+4
	ldr	r2, [r3]
	ldr	r3, [sp, #60]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L51
	add	sp, sp, #68
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L47:
	cmp	r2, #129
	beq	.L24
	cmp	r2, #128
	ldr	r3, [sp, #36]
	moveq	r3, #1
	str	r3, [sp, #36]
	b	.L8
.L24:
	mov	r3, #1
	str	r3, [sp, #28]
	b	.L8
.L46:
	ldr	r0, .L54+16
	bl	FF_ARRAY_ELEMS
	ldr	r9, .L54+16
	mov	r8, r0
	b	.L3
.L50:
	ldr	r2, [sp, #28]
	ldr	r1, [sp, #36]
	tst	r2, r1
	beq	.L10
.L11:
	ldr	r3, [r6]
	ldr	r5, .L54+20
	cmp	r3, #0
	ldr	r0, [r5]
	beq	.L12
	ldr	r3, [sp, #32]
	add	r0, r0, r3
	bl	av_buffer_alloc
	cmp	r0, #0
	str	r0, [sp, #56]
	beq	.L44
	ldr	r3, [sp, #32]
	ldr	r0, [r0]
	mov	r1, #0
	add	r0, r0, r3, lsl #2
	ldr	r2, [r5]
	bl	memset
	ldr	r3, [sp, #56]
	ldr	r0, [r5]
	ldr	r3, [r3]
	str	r3, [sp, #52]
.L12:
	ldr	r3, [sp, #24]
	add	r0, r3, r0
	bl	av_malloc
	subs	r4, r0, #0
	beq	.L52
	ldr	r2, [r5]
	ldr	r5, [sp, #24]
	mov	r1, #0
	add	r0, r4, r5, lsl #2
	bl	memset
	ldr	r3, [sp, #44]
	str	r4, [r3]
	ldr	r3, [sp, #48]
	str	r5, [r3]
	ldr	r3, [r6, #4]
	cmp	r3, #0
	movgt	r7, #0
	ldrgt	r10, [sp, #52]
	bgt	.L16
	b	.L21
.L19:
	ldr	r3, [r6]
	cmp	r3, #0
	bne	.L53
.L20:
	ldr	r3, [r6, #4]
	add	r7, r7, #1
	cmp	r3, r7
	ble	.L21
.L16:
	ldr	r3, [r6, #8]
	add	r5, r7, r7, lsl #1
	ldr	r2, [r3, r5, lsl #2]
	mov	r1, r8
	mov	r0, r9
	add	r5, r3, r5, lsl #2
	bl	val_in_array
	cmp	r0, #0
	beq	.L19
	mov	r1, #1
	mov	r0, r4
	bl	AV_WB24
	add	r0, r4, #12
	ldr	r2, [r5, #4]
	ldr	r1, [r5, #8]
	bl	memcpy
	ldr	r3, [r5, #4]
	add	r3, r3, #3
	add	r4, r4, r3, lsl #2
	b	.L20
.L53:
	mov	r1, #1
	mov	r0, r10
	bl	AV_WB24
	add	r0, r10, #12
	ldr	r2, [r5, #4]
	ldr	r1, [r5, #8]
	bl	memcpy
	ldr	r3, [r5, #4]
	add	r3, r3, #3
	add	r10, r10, r3, lsl #2
	b	.L20
.L21:
	ldr	r3, [r6]
	cmp	r3, #0
	beq	.L18
	ldr	r4, [sp, #40]
	add	r0, r4, #8
	bl	av_buffer_unref
	ldr	r3, [sp, #56]
	ldr	r2, [r3]
	str	r3, [r4, #8]
	str	r2, [r4, #4]
	ldr	r2, [sp, #32]
	str	r2, [r4]
	b	.L18
.L52:
	add	r0, sp, #56
	bl	av_buffer_unref
.L44:
	ldr	r3, .L54+24
	ldr	r0, [r3]
	bl	AVERROR
	b	.L1
.L51:
	bl	__stack_chk_fail
.L55:
	.align	2
.L54:
	.word	AV_CODEC_ID_HEVC
	.word	.LC0
	.word	.LANCHOR0+12
	.word	AV_CODEC_ID_H264
	.word	.LANCHOR0
	.word	AV_INPUT_BUFFER_PADDING_SIZE
	.word	ENOMEM
	.size	extract_extradata_h2645, .-extract_extradata_h2645
	.comm	ENOMEM,4,4
	.comm	AV_INPUT_BUFFER_PADDING_SIZE,4,4
	.comm	AV_CODEC_ID_HEVC,4,4
	.comm	AV_CODEC_ID_H264,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
	.type	extradata_nal_types_hevc.4278, %object
	.size	extradata_nal_types_hevc.4278, 12
extradata_nal_types_hevc.4278:
	.word	128
	.word	129
	.word	130
	.type	extradata_nal_types_h264.4279, %object
	.size	extradata_nal_types_h264.4279, 8
extradata_nal_types_h264.4279:
	.word	131
	.word	132
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
