	.file	"extr_videotoolboxenc.c_find_sei_end.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Unexpected end of SEI NAL Unit parsing size.\n"
	.align 8
.LC1:
	.string	"Unexpected end of SEI NAL Unit parsing type.\n"
	.text
	.p2align 4
	.type	find_sei_end, @function
find_sei_end:
.LFB0:
	.cfi_startproc
	endbr64
	mov	QWORD PTR [rcx], 0
	xor	eax, eax
	test	rdx, rdx
	je	.L26
	mov	r8d, DWORD PTR [rsi]
	and	r8d, 31
	cmp	DWORD PTR H264_NAL_SEI[rip], r8d
	jne	.L26
	cmp	DWORD PTR -4[rsi+rdx*4], 128
	lea	r9, 4[rsi]
	lea	r8, -1[rdx]
	jne	.L3
	lea	r8, -2[rdx]
.L3:
	xor	edx, edx
	mov	eax, 2
	test	r8, r8
	je	.L28
	mov	eax, DWORD PTR [r9]
	test	eax, eax
	jle	.L33
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L34:
	movsx	rax, DWORD PTR [r9]
	cmp	eax, 255
	jne	.L9
.L7:
	add	r9, 4
	sub	r8, 1
	jne	.L34
	mov	esi, DWORD PTR AV_LOG_ERROR[rip]
	lea	rdx, .LC1[rip]
	call	av_log@PLT
	mov	eax, DWORD PTR AVERROR_INVALIDDATA[rip]
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	movsx	rax, DWORD PTR [r9]
	cmp	eax, 255
	jne	.L8
.L9:
	add	rdx, rax
	add	r9, 4
	sub	r8, 1
	jne	.L35
.L8:
	cmp	rdx, r8
	ja	.L36
	lea	r9, [r9+rdx*4]
	sub	r8, rdx
	je	.L31
	mov	r10d, DWORD PTR [r9]
	test	r10d, r10d
	jg	.L7
.L31:
	mov	rax, r9
	mov	QWORD PTR [rcx], r9
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	sub	rax, rsi
	sar	rax, 2
	add	eax, 1
	ret
.L36:
	.cfi_restore_state
	mov	esi, DWORD PTR AV_LOG_ERROR[rip]
	lea	rdx, .LC0[rip]
	call	av_log@PLT
	mov	eax, DWORD PTR AVERROR_INVALIDDATA[rip]
	jmp	.L1
.L33:
	.cfi_def_cfa_offset 8
	mov	rax, r9
	sub	rax, rsi
	sar	rax, 2
	add	eax, 1
.L28:
	mov	QWORD PTR [rcx], r9
.L26:
	ret
	.cfi_endproc
.LFE0:
	.size	find_sei_end, .-find_sei_end
	.comm	H264_NAL_SEI,4,4
	.comm	AV_LOG_ERROR,4,4
	.comm	AVERROR_INVALIDDATA,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_videotoolboxenc.c_find_sei_end.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Unexpected end of SEI NAL Unit parsing size.\012\000"
	.align	2
.LC1:
	.ascii	"Unexpected end of SEI NAL Unit parsing type.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_sei_end, %function
find_sei_end:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	lr, #0
	cmp	r2, #0
	str	lr, [r3]
	beq	.L13
	ldr	r4, .L33
	ldr	ip, [r1]
	ldr	r4, [r4]
	and	ip, ip, #31
	cmp	r4, ip
	bne	.L14
	sub	ip, r2, #-1073741822
	add	r4, r1, #4
	ldr	ip, [r4, ip, lsl #2]
	cmp	ip, #128
	subne	r2, r2, #1
	subeq	r2, r2, #2
	cmp	r2, #0
	moveq	r0, #2
	beq	.L6
	mov	r5, #0
.L5:
	ldr	ip, [r4]
	cmp	ip, #0
	ble	.L27
	add	r4, r4, #4
	b	.L8
.L30:
	ldr	ip, [r4], #4
	cmp	ip, #255
	bne	.L29
.L8:
	subs	r2, r2, #1
	bne	.L30
	ldr	r3, .L33+4
	ldr	r2, .L33+8
	ldr	r1, [r3]
	bl	av_log
	ldr	r3, .L33+12
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L14:
	mov	r0, lr
	pop	{r4, r5, r6, pc}
.L29:
	mov	lr, r4
	b	.L10
.L31:
	ldr	ip, [lr], #4
	cmp	ip, #255
	bne	.L9
.L10:
	subs	r2, r2, #1
	mov	r4, lr
	add	r5, r5, ip
	bne	.L31
.L9:
	cmp	r5, r2
	bhi	.L32
	subs	r2, r2, r5
	add	r4, r4, r5, lsl #2
	bne	.L5
.L27:
	sub	r2, r4, r1
	asr	r2, r2, #2
	add	r0, r2, #1
.L6:
	str	r4, [r3]
	pop	{r4, r5, r6, pc}
.L13:
	mov	r0, r2
	pop	{r4, r5, r6, pc}
.L32:
	ldr	r3, .L33+4
	ldr	r2, .L33+16
	ldr	r1, [r3]
	bl	av_log
	ldr	r3, .L33+12
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L34:
	.align	2
.L33:
	.word	H264_NAL_SEI
	.word	AV_LOG_ERROR
	.word	.LC1
	.word	AVERROR_INVALIDDATA
	.word	.LC0
	.size	find_sei_end, .-find_sei_end
	.comm	H264_NAL_SEI,4,4
	.comm	AV_LOG_ERROR,4,4
	.comm	AVERROR_INVALIDDATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
