	.file	"extr_mpeg12.c_ff_mpeg1_find_frame_end.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ff_mpeg1_find_frame_end
	.type	ff_mpeg1_find_frame_end, @function
ff_mpeg1_find_frame_end:
.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
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	edx, DWORD PTR [rdi]
	mov	QWORD PTR 8[rsp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	DWORD PTR 20[rsp], edx
	test	r12d, r12d
	je	.L1
	mov	r13, rdi
	jle	.L3
	movsx	rax, r12d
	mov	rbp, rsi
	lea	r14, 20[rsp]
	xor	ebx, ebx
	lea	r15, [rsi+rax*4]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L38:
	mov	eax, DWORD PTR 20[rsp]
	mov	ecx, DWORD PTR EXT_START_CODE[rip]
	cmp	eax, ecx
	je	.L36
	add	ecx, 2
	cmp	eax, ecx
	jne	.L6
	movsx	rcx, ebx
	add	edx, 1
	mov	ecx, DWORD PTR 0[rbp+rcx*4]
	and	edx, 3
	and	ecx, 3
	cmp	ecx, 3
	mov	ecx, 0
	cmove	edx, ecx
	mov	DWORD PTR 4[r13], edx
.L6:
	add	eax, 1
	mov	DWORD PTR 20[rsp], eax
.L8:
	add	ebx, 1
	cmp	r12d, ebx
	jle	.L37
.L18:
	xor	edi, edi
	cmp	DWORD PTR 4[r13], 4
	setbe	dil
	call	av_assert1@PLT
	mov	edx, DWORD PTR 4[r13]
	test	dl, 1
	jne	.L38
	movsx	rbx, ebx
	mov	rdx, r14
	mov	rsi, r15
	lea	rdi, 0[rbp+rbx*4]
	call	avpriv_find_start_code@PLT
	mov	edx, DWORD PTR 4[r13]
	mov	ecx, DWORD PTR 20[rsp]
	sub	rax, rbp
	sar	rax, 2
	lea	ebx, -1[rax]
	test	edx, edx
	jne	.L9
	cmp	ecx, DWORD PTR SLICE_MIN_START_CODE[rip]
	jl	.L10
	cmp	ecx, DWORD PTR SLICE_MAX_START_CODE[rip]
	jg	.L10
	mov	DWORD PTR 4[r13], 4
	mov	ebx, eax
.L10:
	cmp	ecx, DWORD PTR SEQ_END_CODE[rip]
	je	.L20
	mov	edx, DWORD PTR 4[r13]
.L12:
	cmp	edx, 3
	jle	.L19
.L14:
	cmp	edx, 4
	jne	.L16
	mov	eax, ecx
	xor	al, al
	cmp	eax, 256
	jne	.L8
	cmp	DWORD PTR SLICE_MIN_START_CODE[rip], ecx
	jg	.L17
	cmp	DWORD PTR SLICE_MAX_START_CODE[rip], ecx
	jge	.L8
.L17:
	mov	eax, 4294967295
	mov	QWORD PTR 0[r13], rax
	lea	eax, -3[rbx]
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rsi, QWORD PTR 24[rsp]
	xor	rsi, QWORD PTR fs:40
	jne	.L39
	add	rsp, 40
	.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
.L36:
	.cfi_restore_state
	movsx	rcx, ebx
	mov	ecx, DWORD PTR 0[rbp+rcx*4]
	and	ecx, 240
	cmp	ecx, 128
	je	.L6
	sub	edx, 1
	mov	DWORD PTR 4[r13], edx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	cmp	ecx, DWORD PTR SEQ_END_CODE[rip]
	je	.L20
	cmp	edx, 2
	jne	.L12
	cmp	ecx, DWORD PTR SEQ_START_CODE[rip]
	jne	.L19
	mov	DWORD PTR 4[r13], 0
	xor	edx, edx
.L19:
	cmp	DWORD PTR EXT_START_CODE[rip], ecx
	je	.L40
	mov	edx, DWORD PTR 4[r13]
.L16:
	cmp	QWORD PTR 8[rsp], 0
	je	.L8
	test	edx, edx
	jne	.L8
	cmp	DWORD PTR PICTURE_START_CODE[rip], ecx
	jne	.L8
	xor	ecx, ecx
	mov	rdi, QWORD PTR 8[rsp]
	cmp	ebx, 3
	lea	esi, -3[rbx]
	setg	cl
	mov	edx, 1
	add	ebx, 1
	call	ff_fetch_timestamp@PLT
	cmp	r12d, ebx
	jg	.L18
	.p2align 4,,10
	.p2align 3
.L37:
	mov	edx, DWORD PTR 20[rsp]
.L3:
	mov	DWORD PTR 0[r13], edx
	mov	eax, DWORD PTR END_NOT_FOUND[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L40:
	add	edx, 1
	mov	DWORD PTR 4[r13], edx
	jmp	.L14
.L20:
	mov	eax, 4294967295
	mov	QWORD PTR 0[r13], rax
	lea	eax, 1[rbx]
	jmp	.L1
.L39:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ff_mpeg1_find_frame_end, .-ff_mpeg1_find_frame_end
	.comm	SLICE_MIN_START_CODE,4,4
	.comm	SLICE_MAX_START_CODE,4,4
	.comm	SEQ_START_CODE,4,4
	.comm	SEQ_END_CODE,4,4
	.comm	PICTURE_START_CODE,4,4
	.comm	EXT_START_CODE,4,4
	.comm	END_NOT_FOUND,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_mpeg12.c_ff_mpeg1_find_frame_end.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ff_mpeg1_find_frame_end
	.syntax unified
	.arm
	.fpu softvfp
	.type	ff_mpeg1_find_frame_end, %function
ff_mpeg1_find_frame_end:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #20
	str	r3, [sp, #4]
	mov	r5, r0
	ldr	r3, .L38
	ldr	r0, [r0]
	subs	r6, r2, #0
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	str	r0, [sp, #8]
	moveq	r0, r6
	beq	.L1
	ble	.L3
	mov	r7, r1
	mov	r4, #0
	ldr	r8, .L38+4
	ldr	r10, .L38+8
	add	r9, r1, r6, lsl #2
	b	.L18
.L35:
	ldr	r3, [sp, #8]
	ldr	r1, [r8]
	cmp	r3, r1
	beq	.L33
	add	r1, r1, #2
	cmp	r3, r1
	bne	.L6
	ldr	r1, [r7, r4, lsl #2]
	and	r1, r1, #3
	cmp	r1, #3
	moveq	r2, #0
	addne	r2, r2, #1
	andne	r2, r2, #3
	str	r2, [r5, #4]
.L6:
	add	r3, r3, #1
	str	r3, [sp, #8]
.L8:
	add	r4, r4, #1
	cmp	r6, r4
	ble	.L34
.L18:
	ldr	r0, [r5, #4]
	cmp	r0, #4
	movhi	r0, #0
	movls	r0, #1
	bl	av_assert1
	ldr	r2, [r5, #4]
	ands	fp, r2, #1
	bne	.L35
	mov	r1, r9
	add	r0, r7, r4, lsl #2
	add	r2, sp, #8
	bl	avpriv_find_start_code
	ldr	r2, [r5, #4]
	sub	r1, r0, r7
	asr	r1, r1, #2
	cmp	r2, #0
	mov	r0, r1
	ldr	ip, [sp, #8]
	sub	r4, r1, #1
	bne	.L9
	ldr	r3, .L38+12
	ldr	r3, [r3]
	cmp	ip, r3
	blt	.L10
	ldr	r3, .L38+16
	ldr	r3, [r3]
	cmp	ip, r3
	movle	r3, #4
	movle	r4, r1
	strle	r3, [r5, #4]
.L10:
	ldr	r3, [r10]
	cmp	ip, r3
	beq	.L20
	ldr	r2, [r5, #4]
.L12:
	cmp	r2, #3
	ble	.L19
.L14:
	cmp	r2, #4
	bne	.L16
	bic	r3, ip, #255
	cmp	r3, #256
	bne	.L8
	ldr	r3, .L38+12
	ldr	r3, [r3]
	cmp	r3, ip
	bgt	.L17
	ldr	r3, .L38+16
	ldr	r3, [r3]
	cmp	r3, ip
	bge	.L8
.L17:
	mov	r2, #0
	mvn	r3, #0
	sub	r0, r4, #3
	str	r2, [r5, #4]
	str	r3, [r5]
.L1:
	ldr	r3, .L38
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L36
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L33:
	ldr	r1, [r7, r4, lsl #2]
	and	r1, r1, #240
	cmp	r1, #128
	subne	r2, r2, #1
	strne	r2, [r5, #4]
	b	.L6
.L9:
	ldr	r1, [r10]
	cmp	ip, r1
	beq	.L21
	cmp	r2, #2
	bne	.L12
	ldr	r3, .L38+20
	ldr	r1, [r3]
	cmp	ip, r1
	moveq	r2, fp
	streq	fp, [r5, #4]
.L19:
	ldr	r3, [r8]
	cmp	r3, ip
	ldrne	r2, [r5, #4]
	beq	.L37
.L16:
	clz	r2, r2
	ldr	r3, [sp, #4]
	lsr	r2, r2, #5
	cmp	r3, #0
	moveq	r2, #0
	cmp	r2, #0
	beq	.L8
	ldr	r3, .L38+24
	ldr	r3, [r3]
	cmp	r3, ip
	bne	.L8
	cmp	r4, #3
	movle	r3, #0
	movgt	r3, #1
	sub	r1, r4, #3
	mov	r2, #1
	ldr	r0, [sp, #4]
	add	r4, r4, #1
	bl	ff_fetch_timestamp
	cmp	r6, r4
	bgt	.L18
.L34:
	ldr	r0, [sp, #8]
.L3:
	ldr	r3, .L38+28
	str	r0, [r5]
	ldr	r0, [r3]
	b	.L1
.L37:
	add	r2, r2, #1
	str	r2, [r5, #4]
	b	.L14
.L20:
	add	r0, r4, #1
.L21:
	mvn	r2, #0
	mov	r3, #0
	stm	r5, {r2, r3}
	b	.L1
.L36:
	bl	__stack_chk_fail
.L39:
	.align	2
.L38:
	.word	.LC0
	.word	EXT_START_CODE
	.word	SEQ_END_CODE
	.word	SLICE_MIN_START_CODE
	.word	SLICE_MAX_START_CODE
	.word	SEQ_START_CODE
	.word	PICTURE_START_CODE
	.word	END_NOT_FOUND
	.size	ff_mpeg1_find_frame_end, .-ff_mpeg1_find_frame_end
	.comm	SLICE_MIN_START_CODE,4,4
	.comm	SLICE_MAX_START_CODE,4,4
	.comm	SEQ_START_CODE,4,4
	.comm	SEQ_END_CODE,4,4
	.comm	PICTURE_START_CODE,4,4
	.comm	EXT_START_CODE,4,4
	.comm	END_NOT_FOUND,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
